274
14 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES
14.4 Example of On-Demand Data Transmission Program Using User Frames
14.4 Example of On-Demand Data Transmission
Program Using User Frames
The following shows a program example when transmitting on-demand data including user frames.
Configure the settings and perform registration with Engineering tool in advance.
On-demand data transmission program using user frames
■Input/output signal of C24
Install C24 in the position where the I/O signal is X/Y00 to X/Y1F.
■C24 interface used for communication with target device
CH1 side RS-232 interface of C24
■Parameter settings
■Program example
Transmit the on-demand data with the on-demand function, and designate the two-word data to be transmitted with the
ONDEMAND instruction.
The data in the user frame portion of the on-demand data to be transmitted is the registered data of the user frame number
registered with Engineering tool.
For information on the module FB to be used, refer to the following manual.
MELSEC iQ-R Serial Communication Module Function Block Reference
Setting item Setting value
Basic
settings
Various control
specification
Communication protocol setting MC protocol (format 1)
Communication speed setting 19200 bps
Transmission setting Data bit 8 bits
Parity bit None
Odd/even parity Odd
Stop bit 1 bit
Sum check code None
Online change Disable
Setting change Disable
Station number setting (CH1, 2 in common: 0 to 31) 0
Communication control specification Word/byte units designation Word
Send wait time specification Transmission wait time designation 0H
On-demand function specification Buffer memory start address
designation
400H
Data length designation 0H
Application
settings
User frame specification On-demand user frame specification Start frame No. designation (1st) 2H
Start frame No. designation (2nd) 3EBH
Final frame No. designation (1st) 401H
Final frame No. designation (2nd) 0H
Category Label name Description Device
Module label C24_1 Target module
Label to be defined Define the global label as shown below.