Specifications
Section 13. PakBus Communication Instructions
13-5
Network (ResultCode, Reps, BeginAddr, TimeIntoInterval, Interval, Gap,
GetSwath, GetVariable, SendSwath, SendVariable )
Used in conjunction with the SendGetVariables instruction to configure
destination dataloggers in a PakBus network to send data to (and receive data
from) the host.
Syntax
Network (ResultCode, Reps, BeginAddr, TimeIntoInterval, Interval, Gap,
GetSwath, GetVariable, SendSwath, SendVariable )
Remarks
The Network instruction is used in the host datalogger; the SendGetVariables
instruction is used in the destination dataloggers. The Network instruction
assigns a time slot to all the destination devices during which they should
respond with their data. The time slot assigned to each of the destination
devices is based on the number of destination devices (Reps), the
Interval/TimeIntoInterval, and the Gap, so that all destination devices respond
by the time the Interval/TimeIntoInterval occurs.
Parameter
& Data Type
Enter
ResultCode
Variable or
Variable Array
The variable in which a response code for the transmission will be
stored. Each time the Network instruction is executed, the ResultCode
for each destination device is incremented by 1. When a response is
received back from a destination device, a the ResultCode is set to -1.
If the Reps parameter (the number of destination devices) is greater than
one, then ResultCode should be dimensioned as an array large enough to
accommodate a result from each of the destination devices.
Reps
Constant
The number of destination dataloggers with which the host datalogger
will be communicating.
BeginAddr
Integer(1-4094)
The PakBus address of the first destination datalogger. Addresses for the
destination devices must be in sequential order.
TimeIntoInterval
Constant
Used along with the Interval parameter to provide a time to the
destination dataloggers during which they will communicate. The
TimeIntoInterval is essentially an offset for the interval parameter (e.g.,
if the interval is 60 seconds and the TimeIntoInterval is 15,
communication will take place at 15 seconds after the top of the minute,
each minute). This value is entered in seconds.
Interval
Constant
How often the destination dataloggers should send data back to the host.
This value is entered in seconds.
Gap
Constant
Delay, in seconds, between communication from each of the destination
devices. If 0 is entered, the default value, based on the host datalogger's
routing table, will be used. If a negative number is entered, no delay will
occur between the data transmission by each of the destination devices.
GetSwath
Constant or
Variable
The number of values that will be received from the destination
datalogger. If values are being received from multiple destination
devices, this is the number from each destination device.