Specifications

Section 13. PakBus Communication Instructions
13-8
Routes (Dest)
The Routes instruction returns a list of known dynamic routes for a PakBus
datalogger.
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 plus one for the termination character (4*routes + 1).
Routes Example Program
The following example shows the use of the Routes instruction. The
destination variable for the PakBus routes is dimensioned to 21, which will
accommodate up to 5 PakBus routes for this datalogger.
Public MyRoute(21)
BeginProg
Scan (1,Sec,3,0)
Routes (MyRoute())
NextScan
EndProg
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.
Parameter
& Data Type
Enter
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.
DataTable
Name
The name of the table from which the last record should be sent.