
Section 13. PakBus Communication Instructions
13-3
Syntax
Routes ( Dest )
Remarks
This instruction stores four values for each known route into the Dest
parameter. The four values for each route are: ComPort used for
communication, neighbor PakBus address, destination PakBus address, and
expected response time (in milliseconds). The list of routes is terminated with
a -1. Dest must be an array dimensioned large enough to accommodate the
number of routes (4*routes), plus one for the termination character.
SendData (ComPort, RouterAddr, PakBusAddr, DataTable)
The SendData instruction is used to send the most recent record from a data
table to a remote PakBus device.
Syntax
SendData ( ComPort, RouterAddr, PakBusAddr, DataTable )
Remarks
This instruction can be used to send data to a PC running the LoggerNet server.
When received, LoggerNet will store the data in a file under a name that
follows its naming convention, as specified in the Setup window of the
software.
See the CRBasic Editor help for parameter details.
Note: By default, LoggerNet uses PakBus address 4094 and PC400 uses 4093.
DataTable The DataTable parameter is the name of the table from
which the last record should be sent.
SendGetVariables (ResultCode, ComPort, RouterAddr, PakBusAddr,
Security, TimeOut, SendVariable, SendSwath, GetVariable,
GetSwath)
The SendGetVariables instruction is used in a remote datalogger to send an
array of values to the host datalogger, and/or retrieve an array of data from the
host datalogger.
Syntax
SendGetVariables ( ResultCode, ComPort, RouterAddr, PakBusAddr, Security,
TimeOut, SendVariable, SendSwath, GetVariable, GetSwath )
Remarks
When the SendGetVariables instruction is used in a datalogger, data
transmission times are controlled by a host datalogger. Most often, this
instruction is preceded by the TimeUntilTransmit instruction to trigger the
execution of the SendGetVariables instruction. The program in the host
datalogger must contain the NetWork instruction, which sets the times that the
remote dataloggers should respond.
If security is enabled in the host datalogger, it must be unlocked to level 2 for
this instruction to be successful.
Comentários a estes Manuais