Section 7. Installation
Term. MSB
M
ost
s
ignificant
b
it (the leading bit). See the appendix
Endianness
(p. 643).
Term. RS-232C
Refers to the standard used to define the hardware signals and voltage levels.
The CR1000 supports several options of serial logic and voltage levels
including RS-232 logic at TTL levels and TTL logic at TTL levels.
Term. RX
Receive
Term. SP
Space
Term. start bit
Is the bit used to indicate the beginning of data.
Term. stop bit
Is the end of the data bits. The stop bit can be 1, 1.5 or 2.
Term. TX
Transmit
7.9.17.5 Serial I/O CRBasic Programming
To transmit or receive RS-232 or TTL signals, a serial port (see table
CR1000
Serial Ports
(p. 247))
must be opened and configured through CRBasic with the
SerialOpen()
instruction. The
SerialClose()
instruction can be used to close the
serial port. Below is practical advice regarding the use of
SerialOpen()
and
SerialClose()
. Program CRBasic example
Receiving an RS-232 String
(p. 254)
shows the use of
SerialOpen()
. Consult
CRBasic Editor Help
for more
information.
SerialOpen
(COMPort,BaudRate,Format,TXDelay,BufferSize)
•
COMPort
— Refer to
CRBasic Editor Help
for a complete list of COM ports
available for use by
SerialOpen()
.
•
BaudRate
— Baud rate mismatch is frequently a problem when developing a
new application. Check for matching baud rates. Some developers prefer to
use a fixed baud rate during initial development. When set to
-nnnn
(where
nnnn is the baud rate) or
0
, auto baud-rate detect is enabled. Autobaud is
useful when using the CS I/O and RS-232 ports since it allows ports to be
simultaneously used for sensor and PC telecommunications.
•
Format
— Determines data type and if PakBus
®
communications can occur
on the COM port. If the port is expected to read sensor data and support
normal PakBus
®
telemetry operations, use an auto-baud rate argument (
0
or
-
nnnn
) and ensure this option supports PakBus
®
in the specific application.
•
BufferSize
— The buffer holds received data until it is removed.
SerialIn()
,
SerialInRecord()
, and
SerialInBlock()
instructions are used to read data
249
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......