Omron CQM1H-SCB41 Computer Hardware User Manual


 
5-1SectionUsing Protocol Macros
58
5-1 Overview of the Protocol Macro Functions
5-1-1 Protocol Macros
The protocol macro function is used to control devices by using the PMCR(––)
instruction in the ladder program to execute the data communications se-
quences (protocols) with the various communications devices, such as general-
purpose devices, connected to the RS-232C or RS-422A/485 port.
Standard system protocols are provided in the Serial Communications Board for
controlling OMRON devices (such as Digital Controllers and Temperature Con-
trollers).
Using the Protocol Support Tool called the CX-Protocol, the protocol macro
function can be used to create new protocols for commercially available mea-
suring instruments and devices, and to create protocols by modifying one of the
standard system protocols. The standard system protocols are also provided
with the CX-Protocol.
For details on the use of the CX-Protocol and the protocol macro function, refer
to the CX-Protocol Operation Manual (W344).
5-1-2 Features
The main features of the protocol macro functions are described below. For de-
tails, refer to the CX-Protocol Operation Manual (W344).
Communications are possible with virtually any general-purpose external de-
vice, provided it has an RS-232C or RS-422A/485 port, supports half-duplex
communications, and supports start-stop synchronization.
Send frames (command + data and other send frames) and receive frames (re-
sponse and other frames) can be created and registered according to the com-
munications frame specifications of the external device.
Error check code calculations, frame length calculations during sending, and
ASCIIHexadecimal conversion of numeric data are supported.
Receive wait monitoring, receive completion monitoring, and send completion
monitoring are supported. If monitoring times are exceeded, either send/receive
processing can be terminated or retry processing can be performed.
Send/receive retry processing can be automatically executed when an error oc-
curs, simply by setting the number of retries.
Variables for reading PC memory can be included in the send frames. These can
be used as destination addresses or data when reading PC data. Variables for
writing to PC memory can be also included in the actual receive frames. These
can be used to write the contents of destination addresses or data to the PC dur-
ing reception.
Repeat processing (repeat counters) for send/receive processing can be speci-
fied in communications sequences. This enables the same data to be sent by
switching destination addresses during communications 1:N (N = 32 max. due
to restrictions in the physical layer) or by switching the PC memory write destina-
tion addresses during data reception.
An interrupt can be created in the PCs CPU Unit during data reception, and an
interrupt program can be executed in the CPU Unit.
The contents of up to 15 expected receive messages can be compared with the
message actually received to determine the next process.
Wide Range of
Communications
Protocols
Customized Send and
Receive Frames
Communications-related
Functions
Send/Receive Monitoring
Retry Processing
PC Read/Write Variables
in Send Frames and
Receive Frames
Switch 1:N
Communications or the
Data Write Destinations
Using Repeat Processing
PC Interrupts During
Data Reception
Next Process Switching
According to Receive
Messages