MbusMasterFunctionsreadDeviceIdentification Method |
Namespace: FieldTalk.Modbus.Master
public int readDeviceIdentification( int slaveAddr, int accessType, ref int objId, out MbusMasterFunctionsDeviceIdObject[] objArr )
Public Function readDeviceIdentification ( slaveAddr As Integer, accessType As Integer, ByRef objId As Integer, <OutAttribute> ByRef objArr As MbusMasterFunctionsDeviceIdObject() ) As Integer
public: int readDeviceIdentification( int slaveAddr, int accessType, int% objId, [OutAttribute] array<MbusMasterFunctionsDeviceIdObject^>^% objArr )
Object Id | Object Name / Description |
0x00 | VendorName |
0x01 | ProductCode |
0x02 | MajorMinorRevision |
0x03 | VendorUrl |
0x04 | ProductName |
0x05 | ModelName |
0x06 | UserApplicationName |
0x07 - 0x7F | Reserved |
0x80 - 0xFF | Vendor specific private objects |
Note |
---|
No broadcast supported |
MbusMasterFunctions.DeviceIdObject[] objs = null; int objId = 0; // Start with object 0 Console.WriteLine("Read Device Identification Object List:"); do { result = mbusProtocol.readDeviceIdentification(1, 1, ref objId, out objs); if (result != FTALK_SUCCESS) { Console.WriteLine(BusProtocolErrors.getBusProtocolErrorText(result) + "!"); } else { foreach (MbusMasterFunctions.DeviceIdObject item in objs) { Console.WriteLine(" [{0}]: {1}", item.id, item.data); } } } while (objId > 0);