Specifications

Section 13. PakBus Communication Instructions
13-15
Public Flag(1), SetResult
BeginProg
Scan (1,Sec,3,0)
If Flag(1) Then
SetSettings (SetResult,ComSDC7,0,10,0000,0,"PortStatus(1)=True")
EndIf
NextScan
EndProg
TimeUntilTransmit
The TimeUntilTransmit instruction returns the time remaining, in seconds,
before communication with the host datalogger.
Syntax
TimeUntilTransmit
Remarks
The TimeUntilTransmit value is derived from the time slot information that is
sent by the host datalogger. If the host datalogger has not yet sent time slot
information, this instruction will use a random time interval between 0 and 60
seconds until communication with the host is made.
A typical use of this instruction is to trigger the execution of the
SendGetVariables instruction when the datalogger's communication time slot
occurs (e.g., If TimeUntilTransmit = 0 Then SendGetVariables).
TimeUntilTransmit Example
In this example, a datalogger with Pakbus address 109 is programmed to send
three variables to a datalogger with an address of 1 using the
TimeUntilTransmit and SendGetVariables instructions. Three variables are
sent to address 1 when the TimeUntilTransmit = 0. The variables are sent out
the CS I/O port configured as SDC7 with MD-485 modems.
Note that the scan rate in this program must be 1 second. For the program that
is run in the host datalogger (address 1), see the Network example.