RS-232/485 Communication
The CT1820 has two RS-232 serial ports and one RS-485 serial port.
Note: It is recommended to not analyze the data from the serial port as it's being received because the
CT1820 can process data much faster than the serial port can receive it. Rather, it would be best to
leverage the CT1820's built-in Modbus RTU protocol. The Modbus RTU protocol will handle the data
processing so the user doesn't have to.
OpenCom
OpenCom channel, baudRate, settings, receiveSize, sendSize
channel
: The RS-232 channel to use
baudRate
: The baud rate
settings
: Serial settings (data bits, parity, and stop bits)
receiveSize
: Receive buffer size (Maximum 1024 bytes)
sendSize
: Send buffer size (Maximum 1024 bytes)
Opens a serial port for use. This command called before any data can be read from or written to the
serial port.
Opencom 1,115200,3,80,80
' Open Channel 1
By
#include "CT18XX",
channel 3 can be used for RS-485 for communicating with RS-485 peripherals
such as Comfile Technology's ModPort field I/O controller. Be sure to use
Set RS485
to set pin 71 as the
transmit enable pin.
' Configure the serial port at the beginning of the source file
Opencom 3,57600,3,50,50
Set Rs485 3,71
' Set Pin 71 as the transmit enable pin
The Set RS232 command can be used to change the serial settings
#include "CT18XX"
Set Rs232 3,115200,3
' Change channel 3's serial settings
Comfile Technology, Inc
CT1820 User's Manual
39 Of 93
Содержание CUTOUCH CT1820
Страница 4: ...Chapter 1 Overview Comfile Technology Inc CT1820 User s Manual 4 Of 93 ...
Страница 7: ...The CT1820 s Appearance Comfile Technology Inc CT1820 User s Manual 7 Of 93 ...
Страница 8: ...Comfile Technology Inc CT1820 User s Manual 8 Of 93 ...
Страница 9: ...Comfile Technology Inc CT1820 User s Manual 9 Of 93 ...
Страница 12: ...Comfile Technology Inc CT1820 User s Manual 12 Of 93 ...
Страница 17: ...Comfile Technology Inc CT1820 User s Manual 17 Of 93 ...
Страница 19: ...Chapter 2 I O Comfile Technology Inc CT1820 User s Manual 19 Of 93 ...
Страница 29: ...Comfile Technology Inc CT1820 User s Manual 29 Of 93 ...
Страница 32: ...Chapter 3 Command Reference Comfile Technology Inc CT1820 User s Manual 32 Of 93 ...
Страница 41: ...Chapter 4 Touch Input Comfile Technology Inc CT1820 User s Manual 41 Of 93 ...
Страница 52: ...Chapter 5 ModPort I O Expansion Comfile Technology Inc CT1820 User s Manual 52 Of 93 ...
Страница 61: ...Chapter 6 Sample Programs Comfile Technology Inc CT1820 User s Manual 61 Of 93 ...
Страница 87: ...Chapter 7 Panel Mounting Comfile Technology Inc CT1820 User s Manual 87 Of 93 ...
Страница 88: ...Dimensions Comfile Technology Inc CT1820 User s Manual 88 Of 93 ...
Страница 89: ...Comfile Technology Inc CT1820 User s Manual 89 Of 93 ...
Страница 90: ...Panel Cutout Comfile Technology Inc CT1820 User s Manual 90 Of 93 ...