Modbus |
The ModbusTCPProtocol type exposes the following members.
Name | Description | |
---|---|---|
ClearAllLatchedDigitalInputs | Clear the INPUT latches | |
ClearAllLatchedInputs | Obsolete. Clear the Digital INPUT latches | |
ClearDigitalInputLineCount | Clears the digital input counter of the specified line. | |
ClearLineCount | Obsolete. Clears the digital input counter of the specified line, | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
GetAllAnalogInputLineStates | Get all analog input values | |
GetAllAnalogOutputLineStates | Get all analog output values | |
GetAllDigitalLineStates | Get the state of all the Digital IOLines of the device as an integer the top 16 bits are the outputs, the bottom 16 bits are the inputs | |
GetAllInputStates | Get the state of the inputs on the device | |
GetAllLatchedHighDigitalInputStates | Get the HIGH LATCH states of all the Digital Inputs | |
GetAllLatchedHighInputStates | Obsolete. Get the HIGH LATCH states of all the Digital Inputs | |
GetAllLatchedLowDigitalInputStates | Get the LOW LATCH state of all the Digital INPUTS | |
GetAllLatchedLowInputStates | Obsolete. Get the LOW LATCH state of all the Digital INPUTS | |
GetAllLineStates | Obsolete. Get the state of all the Digital IOLines of the device as an integer the top 16 bits are the outputs, the bottom 16 bits are the inputs | |
GetAllOutputStates | Get all output line states | |
GetAnalogLineState | Get an individual analog line value | |
GetDeviceConfiguration | Read the device configuration | |
GetDeviceName | Get the name of the Device | |
GetDigitalInputLineCount | Reads the digital input counter of the specified channel | |
GetDigitalLineState | Get the state of a digital IO Line | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetLineCount | Obsolete. Reads the digital input counter of the specified channel | |
GetLineState | Obsolete. Get the state of a digital IO Line | |
GetRequestForTransactionId | Get Modbus TCP Request for a particular TransactionId | |
GetResponseForTransactionId | Get Modbus TCP response for particular TransactionId | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
PrettyPrintModbusADU(Byte) | Take a Modbus Command written in a hex byte array representation and prettifies it. e.g. 0x006600000006ff0100000010 0066 0000 0006 ff 01 0000 0010 TranID|ProtID|Len|UnitID|Func|DATA there is a space every 4 characters, and also a space at the 15 char between the UnitID and the Function code | |
PrettyPrintModbusADU(String) | Take a Modbus Command written in ASCII as a hex representation and prettifies it. e.g. 006600000006ff0100000010 0066 0000 0006 ff 01 0000 0010 TranID|ProtID|Len|UnitID|Func|DATA there is a space every 4 characters, and also a space at the 14 char between the UnitID and the Function code | |
ResetToFactoryDefaultSettings | Reset the ED device to factory default settings | |
Restart | Power Off and the On the ED Device | |
SendCommand(Byte) | Send a ModbusTCP command (ADU) to a Brainboxes Device and return response The MBAP header is handled internally by this class, only the function and data need to be sent as a command Any spacing is ignore, commands as encoded hex byte array e.g. 0x0100000001 Modbus TCP commands are defined as follows: ADU: Application Data Unit, split into: MBAP and PDU MBAP Header - the header contains 4 fields: * transactionId (2 bytes) = id starting at 01 increments by 1 for each new ADU sent * protocol Id (2 bytes) = always 0x00 = modbus for brainboxes devices * Length (2 bytes) = the total length in bytes of rest of the ADU from that point * Unit Id (1 byte) = set by the client in the request the response must contain the same data, always 0xff PDU: Protocol Data Unit, consists of 2 fields: Function Code (2 bytes)- the type of function requested can be: * 0x01 = Read Coils * 0x02 = Read Discrete Inputs * 0x03 = Read Holding Registers * 0x04 = Read Input Registers * 0x05 = Write Single Coil * 0x06 = Write Single Register Data (variable length) - The end of the modbusTCP command, which contains data relevant to the function code The format of the command is hex encoded values in ASCII, | |
SendCommand(String) | Send a ModbusTCP command (ADU) to a Brainboxes Device and return response The MBAP header is handled internally by this class, only the function and data need to be sent as a command Any spacing is ignore, commands are hex encoded ASCII (e.g. "01 0000 0001") Modbus TCP commands are defined as follows: ADU - Application Data Unit, split into: MBAP Header - the header contains 4 fields: * transactionId (2 bytes) = id starting at 01 increments by 1 for each new ADU sent * protocol Id (2 bytes) = always 0x00 = modbus for brainboxes devices * Length (2 bytes) = the total length in bytes of rest of the ADU from that point * Unit Id (1 byte) = set by the client in the request the response must contain the same data, always 0xff * Function Code (2 bytes)- the type of function requested can be: * 0x01 = Read Coils * 0x02 = Read Discrete Inputs * 0x03 = Read Holding Registers * 0x04 = Read Input Registers * 0x05 = Write Single Coil * 0x06 = Write Single Register * Data (variable length) - The end of the modbusTCP command, which contains data relevant to the function code The format of the command is hex encoded values in ASCII, The response is of the format: * transactionId (2 bytes) = is the same transaction ID the PC used in its request * protocol Id (2 bytes) = is the protocol which is always 00 for Modbus TCP * Length (2 bytes): is the number of bytes in the rest of the transaction * Unit Id (1 byte): is the Unit Identifier =0xFF * Function Code (2 bytes): is the Modbus Function code 01= Read Multiple Coils * Byte Code (2 bytes): Is the byte count of data to follow in this case 2 bytes * Data: is the value of data that corresponds to the function code | |
SetAllDigitalOutputLineStates | Set all output lines on the device open (0) or closed (1) The bit position represents the line number | |
SetAllOutputLineStates | Obsolete. Set all output lines on the device open (0) or closed (1) The bit position represents the line number | |
SetAnalogOutputLineState | Set an individual analog output line value | |
SetDeviceConfiguration(Int32, Int32, IOChangeTypes, CounterMode, Boolean) | ||
SetDeviceConfiguration(Int32, Int32, AnalogDataFormat, Boolean, Boolean, Boolean, TemperatureUnit) | ||
SetDigitalOutputLineState | Set an individual output line state open (0) or closed (1) | |
SetOutputLineState | Obsolete. Set an individual output line state open (0) or closed (1) | |
ToString | Returns a string that represents the current object. (Inherited from Object) |