User`s manual
251
CHAPTER 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES
10
10.5 Example of an On-Demand Data Transmission Program Using User Frames
(3) Program example
The following program example shows the transmission of on-demand data using the on-demand function.
Designate two words of transmission data with the ONDEMAND instruction.
The data for the user frame section of on-demand data to be sent is the registered data for the user frame No.
that was registered with GX Configurator-SC.
● The SPBUSY instruction can be used to read the communication status by the dedicated instruction.
● For details on the dedicated instructions, refer to the User's Manual (Basic).
● Designate the storage capacity for transmission data (stored in D10 to D11 in the above program example) and data
length (stored in D2 in the above program example) so that they do not exceed the range of buffer memory assigned by
the user for the on-demand function.
On-demand transmission
instruction
Sets the transmitting data
in D10 to D11
Resets the normal completion
flag
Executes on-demand
transmission
Normal completion
Resets the abnormal completion
flag
Abnormal completion
Sets the transmission channel
to the CH1 side
Sets the transmission data count
to two words
Sets the transmission
preparation completion flag
Resets the transmission
preparation completion flag