Campbell CR800 Specifikace Strana 276

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 324
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 275
Section 12. Serial Input and Output Functions
12-6
instruction, 0 will be returned by the instruction. This instruction can be used
as the expression for the NumberBytes parameter in the SerialOutBlock
instruction.
ComPort The ComPort parameter specifies the communication port and mode
that will be used when receiving the binary data.
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.
SerialOpen (ComPort, BaudRate, Format, TXDelay, BufferSize)
The SerialOpen instruction is used to set up one of the datalogger's ports for
communication with a non-PakBus device.
Syntax
SerialOpen ( ComPort, BaudRate, Format, TXDelay, BufferSize )
Remarks
When the SerialOpen instruction is executed, the serial port is "opened" and
subsequent textual messages will flow in and out of the port in between
PakBus packets. The data will be redirected away from the terminal mode
input based on subsequent SerialIn and SerialOut instructions.
See the CRBasic Editor help for parameter details.
Note: SerialFlush is used to clear the buffer.
For PakBus communication, BufferSize can normally be left at 0. However,
during communication with some devices it may be necessary to limit the
packet size (BufferSize) and add a delay (TXDelay) for communication to be
successful. For example, PakBus packets are 1000 bytes. The largest packet
that an RF95 can accommodate is 248 bytes. Setting the buffer to 240 would
limit the packet size and ensure that the RF95's buffer was not exceeded. A
delay (e.g., 500,000 ms) would ensure that each packet has sufficient time to
arrive at its destination before the next packet is transmitted.
This instruction runs sequentially from the processing task sequencer,
regardless of whether the datalogger is in pipeline or sequential mode.
SerialOut (ComPort, OutString, WaitString, NumberTries, TimeOut)
The SerialOut instruction is used to transmit a string over one of the
datalogger's communication ports.
Syntax
SerialOut ( ComPort, OutString, WaitString, NumberTries, TimeOut )
Remarks
If this instruction is set equal to a variable, the number of characters output is
returned. If a delay is needed before outputting the string, it should be entered
in the TXDelay parameter of the SerialOpen instruction. If the OutString and
WaitString variables are not formatted as a string, they will be converted to a
string by the datalogger.
Zobrazit stránku 275
1 2 ... 271 272 273 274 275 276 277 278 279 280 281 ... 323 324

Komentáře k této Příručce

Žádné komentáře