Get MBLogic at SourceForge.net. Fast, secure and Free Open Source 
	software downloads

Help Topics

Topic Details for Communications

Help - SBus Generic Client Protocol


Overview

Generic client support is experiment at this time and is subject to change.


SAIA Ether-SBus

SAIA Ether-SBus (referred to here simply as "SBus") is the Ethernet version of the SBus protocol used by SAIA. The SBus client provides the ability to use the following SBus commands as a client:

The client is implemented in the following files:


Standard Parameters

The following are the standard generic client parameters for this generic client.

Item Value Description
protocol sbusudp Selects SBus protocol
type genericclient Selects genericclient
clientfile sbusudpclient.py -d 1 Specifies the name of the file used to implement the client. The parameter "-d" will specify a start-up delay in seconds.

Example:


	type = genericclient
	protocol = sbusudp
	clientfile = sbusudpclient.py


Client Parameters

Item Description Valid Values
host The name or IP address of the SBus server (PLC or field device). Any valid host name or IP address (e.g. localhost, 127.0.0.1, etc.
port The UDP port number of the SBus server. This is normally 5050.
cmdtime This is the delay time in milli-seconds between commands. An integer greater than or equal to 0.
repeattime This is the delay time in milli-seconds between repeating sets of commands. An integer greater than or equal to 0.
retrytime This is the delay time in milli-seconds between retrying commands in the event of an error. An integer greater than or equal to 0.
timeout This is the communications time-out milli-seconds. An integer greater than or equal to 0.

Example:


	host = localhost
	port = 5050
	repeattime = 500
	retrytime = 2000
	cmdtime = 500
	timeout = 1000


Commands

Item Description Valid Values
action This is reserved for future use. Must always be "poll".
stn The SBus "station" parameter. 0 to 255
cmd The SBus command code. Any of the supported SBus commands.
remoteaddr The server (field device) data table address to read from or write to. 0 to 65,535
qty The number of data elements to transfer. 1 to 128 for boolean addresses, 1 to 32 for register addresses.
datatype The system data table memory type to read from or write to. 'coil', 'inp', 'holdingreg', 'inpreg'
dataoffset Data offset index. Greater than or equal to 0. Must be less than the maximum address transferred for the selected datatype.

Example:


	&readflag = action=poll, stn=1, cmd=2, remoteaddr=10, qty=10, datatype=coil, dataoffset=0
	&writeflag = action=poll, stn=1, cmd=11, remoteaddr=0, qty=10, datatype=coil, dataoffset=0
	&readreg = action=poll, stn=1, cmd=6, remoteaddr=0, qty=4, datatype=holdingreg, dataoffset=0
	&readinp = action=poll, stn=1, cmd=3, remoteaddr=0, qty=10, datatype=coil, dataoffset=10
	&writeoutp = action=poll, stn=1, cmd=13, remoteaddr=20, qty=10, datatype=coil, dataoffset=10
	&writereg = action=poll, stn=1, cmd=14, remoteaddr=19, qty=10, datatype=holdingreg, dataoffset=10
	&readoutp = action=poll, stn=1, cmd=5, remoteaddr=0, qty=10, datatype=coil, dataoffset=20