
Chapter 8 Exercising program
8-17
C) GMWIN programming : After frame edit is completed, prepare program via GMWIN to allow TX/RX in
sequence as in [Figure 8.6]. Use SND_MSG/RCV_MSG Function Blocks to allow Cnet 1,2,3 stations in user
defined mode to communicate with Cnet station 4 which is dedicated communication slave station, with library
insertion selected from project menu prior to programming to insert COMMUNI.4FB. User defined TX/RX
programs shall be set respectively for 1,2,3 stations. Data mapping is all identical for 3 stations, thus, the same
program may be used.
[Figure 8.7] shows program for data writing and its response frame receiving.
[Figure 8.7] Function Block program for data writing
Use SND_MSG Function Block in the figure to send 40 bytes of TX data to ‘GM_WR’ frame via RS-232C
channel. TX point of time is controlled through ‘WR_START’. In case of normal response after GM_WR
frame is sent, execute RCV_MSG Function Block if ‘GM_WR_ACK’ frame is received with ‘_RCV0_232[1]’
flag turned ‘ON’ among received flags in RS-232C channel. TX data is saved in SD1 area of SND_MSG
Function Block, while 40 bytes data in variable area of ‘SD_SAVE’ is transmitted as in [Figure 8.7].
Function Block for
receiving of response
frame to Write request
Function Block for
Write request TX.
RX flag monitoring
the receiving of Write
response frame
Controlling flag of TX point of Write
request frame(initial value:1)