Specifications
Section 13. PakBus Communication Instructions
13-4
Parameter
& Data Type
Enter
ResultCode
Variable
The variable in which a response code for the transmission will be stored.
A negative value indicates that communication was achieved but the
command failed. See table 13.1-2 for a list of failure codes. A positive
value indicates the number of communications failures. A zero indicates
successful communication.
ComPort
Constant
The communications port that will be used to communicate with the
destination device. Enter a numeric or alphanumeric code listed in table
12.1-1.
NeighborAddr
Constant
A static route to the destination datalogger. If 0 is entered, the destination
device is assumed to be a neighbor
PakBusAddr
Integer(1-4094)
The Pakbus address of the destination datalogger with which the host
datalogger is trying to communicate. Valid entries are 1 through 4094.
Each PakBus device in the network must have a unique address.
Security
Integer
The security code of the datalogger to which variables will be sent. 0 is
entered for this parameter if no security is set in the destination datalogger.
TimeOut
Constant or
Variable
The amount of time, in 0.01 seconds, that the datalogger should wait for a
response from the destination device before considering the instruction to
have failed. If 0 is entered for this parameter, then the datalogger will use a
time based on its known route to the destination device.
“TableName”
String
The data table in the destination datalogger from which the value(s) will
be retrieved. TableName must be entered as a string (enclosed in quotes).
“FieldName”
String
The name of the variable which holds the values to be retrieved from the
destination datalogger. FieldName must be entered as a string (enclosed in
quotes). If the variable in the destination datalogger has been assigned an
Alias, the alias must be used for Fieldname.
Variable
Variable or
Variable Array
The array in which the values retrieved from the destination datalogger
will be stored. The Variable parameter must be dimensioned equal to or
greater than the Swath retrieved from the destination datalogger.
Swath
Constant or
Expression
The number of values that will be retrieved from the destination
datalogger.
When retrieving input locations from an Edlog-programmed
PakBus datalogger (CR10XPB, CR510PB, or CR23XPB), the
TableName is "Inlocs" and the FieldName is the input location
label.
GetVariables Example
In the following program, the datalogger will attempt to get 10 values from the
destination datalogger each time Flag1 is high (non zero). The data values
retrieved are from the Temp variable in the TempDat table.
Public RXResponse, CR10XData(10), Flag(1)
BeginProg
Scan (1,sec,0,0)
If Flag(1) Then
GetVariables(RXResponse,ComSDC7,0,1,0000,0,"TempDat","Temp()",CR10XData(),10)
EndIf
NextScan
EndProg
NOTE