.

Average: 0
Rating Count: 0

Development status: Released, Release: release_3_7_2
Information status: Updated
Repository: http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/Communication/Modbus
Contact:



Class Description


A Class to handle the modbus protocol over TCP/IP or Serial (RTU).

Families: Communication

Key words:

Platform: All Platforms

Language: Cpp

License: GPL

Contact:

Hardware


Manufacturer: none

Bus: Modbus

Class interface


Attributes:

Commands:

Name Description
ReadExceptionStatusInput: DevVoid
Output: DevShort
Exception status
Read exception status (usually a predefined range of 8 bits
PresetSingleRegisterBroadcastInput: DevVarShortArray
argin[0] = Register address argin[1] = Register value
Output: DevVoid
Write single 16bits register at node 0 (Node reserved for broadcast for RTU protocol on RS485 line) Does not wait for the equipment response.
ReadWriteRegisterInput: DevVarShortArray
argin[0] = Read start address argin[1] = Number of registers to read argin[2] = Write start address argin[3] = Number of registers to write argin[4..n+3] = Register values
Output: DevVarShortArray
argout[0..n-1] = Register values
Read and Write multiple 16bits registers.
MaskWriteRegisterInput: DevVarShortArray
argin[0] = Register address argin[1] = AND mask argin[2] = OR mask
Output: DevVoid
Mask write a 16bits register.
PresetMultipleRegistersInput: DevVarShortArray
argin[0] = Register start address argin[1] = Number of register argin[2..n+1] = Register values
Output: DevVoid
Write multiple 16bits registers.
ReadMultipleCoilsStatusInput: DevVarShortArray
argin[0] = Coil start address argin[1] = Number of coils
Output: DevVarShortArray
argout[0..n-1] = Coil values
Read multiple coil (digital I/O) status.
ForceMultipleCoilsInput: DevVarShortArray
argin[0] = Coil start address argin[1] = Number of coil argin[2..n+1] = Coil values
Output: DevVoid
FetchCommEventCtrInput: DevVoid
Output: DevVarShortArray
argout[0] = Status argout[1] = Event count
Fetch communications event counter.
PresetSingleRegisterInput: DevVarShortArray
argin[0] = Register address argin[1] = Register value
Output: DevVoid
Write single 16bits register.
ReadInputRegistersInput: DevVarShortArray
argin[0] = Register start address argin[1] = Number of registers
Output: DevVarShortArray
argout[0..n-1] = Input 16bits registers
Read Multiple 16bits input registers.
ReadHoldingRegistersInput: DevVarShortArray
aring[0] = Register start address argin[1] = Number of registers
Output: DevVarShortArray
argout[0..n-1] Holding 16bits registers.
Read multiple 16bits registers.
ReadInputStatusInput: DevVarShortArray
argin[0] = Input address argin[1] = number of inputs
Output: DevVarCharArray
argout[0..n-1] = Input status (0/1)
Read discrete input status. Return one boolean per array element.
ReadCoilStatusInput: DevShort
Coil address
Output: DevShort
Coil status (0/1)
Read coil (digital I/O) status
ForceSingleCoilInput: DevVarShortArray
aring[0] = coil address argin[1] = coil value (0/1)
Output: DevVoid
Write single coil (digital I/O) state.
StatusInput: DevVoid
Output: ConstDevString
Device status
This command gets the device status (stored in its device_status data member) and returns it to the caller.
StateInput: DevVoid
Output: State
Device state
This command gets the device state (stored in its device_state data member) and returns it to the caller.

Pipes:

Properties:

Name Description
SleepBetweenRetryDevShort Sleep Between Retry in Miliseconds
NumberOfRetryDevShort Number Of Retry for all command in case failed.
TCPQuickAckDevBoolean Set this property to true to enable TCP quick acknowledgements
TCPNoDelayDevBoolean Disable or enable Nagle`s algorithm.
LogFileDevString Name of the file where are stored invalid frame
TCPTimeoutDevDouble Timeout used when the TCP protocol is used (in sec)
TCPConnectTimeoutDevDouble TCP connection timeout (in sec)
CacheSleepDevLong Cache update thread main loop sleeping time (in ms)CacheSleep
CacheConfigArray of DevString Describe which data has to be cached. Each set of cached data is described by 3 parameters which are: 1 - Command to be used to read data (ReadHoldingRegisters, ReadInputStatus ReadInutRegisters or ReadMultipleCoilStatus) 2 - First address to be read 3 - Number of data to read
AddressDevShort Node index used with the RTU or TCP protocol
SeriallineDevString The name of the serial line device used with RTU protocol
IphostDevString The host IP address used with the TCP protocol
ProtocolDevString RTU => Binary serial communication. TCP => Communication over ethernet.


Please log in to comment.

June 29, 2019, DS Admin
Updated:
The device class has been updated.
You can see previous version here .



March 23, 2019, DS Admin
Updated:
The device class has been updated.
You can see previous version here .



Feb. 23, 2017, Piotr Goryl
Updated:
The device class has been updated.
You can see previous version here .



Jan. 19, 2017, Piotr Goryl
Updated:
The device server has been updated.
You can see previous version here .



Jan. 3, 2017, Piotr Goryl
Created:
The device server has been added to catalogue.
Added by:pgoryl2 on:3 Jan 2017, 2:49 p.m.