280
13 SERIAL COMMUNICATION MODULE DEDICATED COMMANDS
13.6 On-demand function
13.6 On-demand function
On-demand function is a function that transmits data to external device using MC protocol after starting up the function from
CPU module.
This function can be used to sent the emergency data that is required to notify to external devices from the CPU module.
The command can only be used for C24 connected to the external device on 1:1 basis. It cannot be used via
network.
If the on-demand function is used with multidrop connection of 1:n station or m:n station, the on-demand data
will be collapsed and proper data is not sent.
Settings for using the on-demand function
The following shows the setting items for the on-demand function.
Settings of serial communication module
Set the following values in the parameter of serial communication module or the buffer memory.
The execution result is stored in the following:
The setting content can be checked and changed by using any of the following Engineering tools.
• GX Works3 (Module parameter)
• GX Works2, GX Configurator-SC
For details on the setting items and buffer memory, refer to the following manuals.
• MELSEC iQ-R Serial Communication Module User's Manual (Application)
• MELSEC-Q/L Serial Communication Module User's Manual (Application)
Specification of interface to be sent and send data
Specify the transmission channel (CH1/CH2) and data equivalent to the response data with the arguments of the following
dedicated instruction. Set the arguments in the program.
• G(P).ONDEMAND
For the dedicated instruction "G(P).ONDEMAND", refer to the following manuals.
• MELSEC iQ-R Programming Manual (Instructions, Standard Functions/Function Blocks)
• MELSEC-Q/L Serial Communication Module User's Manual (Application)
Setting item Description Corresponding buffer
memory
CH1 CH2
Communication protocol setting Set the format of the message format to be used.
• MC protocol (Format 1) to MC protocol (Format 4): Data is sent by 1C frame
• MC protocol (Format 5): Data is send by 4C frame.
Word/byte units designation Set the unit of data length (number of data). 150 (96H) 310 (136H)
Buffer memory start address
designation
Set the start address of the buffer memory to be used for the on-demand
function.
160 (A0H) 320 (140H)
Data length designation Set the data length of the area to which the transmitted data is stored by the on-
demand function.
161 (A1H) 321 (141H)
Execution result Description Corresponding buffer
memory
CH1 CH2
On-demand execution results • Normal completion: 0
• Abnormal completion (error code): Other than 0
598 (256H) 614 (266H)