
12-1
Section 12. Serial Input and Output
Functions
This set of instructions and functions are meant to be used with (non-PakBus)
serial sensors and controllers and for purposes of dialing and paging through
generic text based devices. They cover the functionality of the traditional P15
and P97 instructions with additional flexibility.
DialModem (ComPort, BaudRate, DialString, ResponseString)
The DialModem instruction is used to send a modem dial string out one of the
datalogger's ports.
Syntax
DialModem ( ComPort, BaudRate, DialString, ResponseString )
or
variable = DialModem ( ComPort, BaudRate, DialString, ResponseString )
Remarks
The DialModem instruction performs a SerialOpen, multiple SerialOuts, and a
SerialClose. If this instruction is set equal to a variable, a -1 will be returned if
the ResponseString is successfully received or a 0 will be returned if it isn't.
DialModem can be used within the DialSequence/EndDialSequence commands
to specify a communication route to be used for a PakBus datalogger, or it can
be used within the BeginProg/EndProg statements to send the dial string any
time the instruction is executed. When used within the
DialSequence/EndDialSequence commands, set DialModem equal to a variable
that will be used as the DialSuccess parameter for EndDialSequence. The
variable will be monitored by the EndDialSequence instruction. If the call is
unsuccessful, the link will be closed.
See the CRBasic Editor help for parameter details.
This instruction runs sequentially from the processing task sequencer,
regardless of whether the datalogger is in pipeline or sequential mode.
DialSequence (PakBusAddr)
The DialSequence/EndDialSequence instructions are used to define the code
necessary to route packets to a PakBus datalogger.
Syntax
DialSequence ( PakBusAddr )
dialing instructions; e.g., DialSuccess = DialModem (ComPort, DialString,
ResponseString)
EndDialSequence (DialSuccess )
Komentarze do niniejszej Instrukcji