MBMasterParameter (STRUCT) ¶ TYPE MBMasterParameter : STRUCT InOut: Name Type Initial Comment usiTransmission USINT RTU:=0, ASCII:=1 tResponseTimeout TIME Time, in which a Slave has to reply (max 65535ms) tTimeBetweenFrames TIME Delay between Modbus requests (max 65535ms) dwSerialLineNumber DWORD 1 Either 1 or 2
MBPortParameter (STRUCT) ¶ TYPE MBPortParameter : STRUCT InOut: Name Type Initial Comment diBaudrate DINT 19200 1200, 2400, 4800, …, 115000 bps usiMedium USINT 0 RS232:=0, RS485:=1 or ETH:=2 usiParity USINT 0 EVEN:=0, ODD:=1 or NONE:=2 usiDataBits USINT 8 Number of Data Bits usiStopBits USINT 1 Number of Stop Bits xPolarization BOOL FALSE Polarization and Termination Resistors
MBRegister (STRUCT) ¶ TYPE MBRegister : STRUCT InOut: Name Type Initial Comment uiRegister UINT 0 Address offset
MBSlaveParameter (STRUCT) ¶ TYPE MBSlaveParameter : STRUCT InOut: Name Type Initial Comment usiSlaveAddress USINT 1 Slave address in the range between 1 and 247 tSlaveTimeout TIME TIME#1s0ms Time for this Slave to respond. Overrides the Master’s setting, (max 65535ms) dwInstance POINTER TO ModbusSerialSlave 16#0 Stores the instance pointer to this Slave iErrorCounter INT -1 Stores the number of subsequent errors. If Slave never got polled, it is -1
MB_CommCode_M238 (ENUM) ¶ TYPE MB_CommCode_M238 : InOut: Name Initial Comment CommunicationOK 16#0 Exchange is correct TimedOut 16#1 Exchange stopped because timeout expired Canceled 16#2 Exchange stopped on user request (CANCEL) BadAddress 16#3 Address format is incorrect BadRemoteAddr 16#4 Remote address is incorrect BadMgtTable 16#5 Management table format is incorrect BadParameters 16#6 Specific parameters are incorrect ProblemSendingRq 16#7 Problem sending request to destination RecvBufferTooSmall 16#9 Reception buffer size is too small SendBufferTooSmall 16#A Transmission buffer size is too small SystemResourceMissing 16#B System resource is missing BadTransactionNb 16#C Transaction number is incorrect BadLength 16#E Length is incorrect ProtocolSpecificError 16#FE The operation error code contains protocol specific code Refused 16#FF Message has been refused
MB_OpCode_M238 (ENUM) ¶ TYPE MB_OpCode_M238 : InOut: Name Initial Comment OperationOK 16#0 Exchange is correct NotProcessed 16#1 Request has not been processed BadResponse 16#2 Received response is incorrect TargetResourceMissing 16#1 Target system resource is missing BadLength 16#5 Length is incorrect CommChannelErr 16#6 Communication channel is in error BadAddr 16#7 Address is incorrect SystemResourceMissing 16#B System resource is missing TargetCommInactive 16#C Target comm function is not active TargetMissing 16#D Target is absent ChannelNotConfigured 16#F Channel not configured
ModbusCommand (STRUCT) ¶ TYPE ModbusCommand : STRUCT InOut: Name Type Initial uiFunctionCode UINT 3 uiReadOffset UINT 0 uiReadLen UINT 1 uiWriteOffset UINT 0 uiWriteLen UINT 1
PARAM_ACCESS (ENUM) ¶ TYPE PARAM_ACCESS : InOut: Name READWRITE READ WRITE
PARAM_MEDIUM (ENUM) ¶ TYPE PARAM_MEDIUM : InOut: Name RS232 RS485 ETH
PARAM_PARITY (ENUM) ¶ TYPE PARAM_PARITY : InOut: Name EVEN ODD NONE