Example Of Polling - Renesas R-IN32 Series User Manual

Cc-link remote device station
Table of Contents

Advertisement

R-IN32 Series CC-Link Remote device station
12.3.2

Example of Polling

The following shows an example of transmission/reception processing in CC-Link Version 2 that performs polling
processing at an interval of 1ms or less using a timer. The processing in the two areas enclosed by dotted lines are
identical. In this example, "transmission SQ" and "loopback SQ" can be transmitted/received without fail by polling
before and after the polling interval, assuming that the processing time within the unit is constant.
Polling condition:
When using polling, execute the processing so that incompletion does not occur even with the shortest link scan time.
The shortest link scan time is the time required for one remote device station (1 occupied station) to be connected to
the master station (transmission speed 10Mbps). Since the fastest link scan time at this point is approx. 1.1ms, polling
must be done at intervals of 1ms or less.
ITIM (1ms interrupt)
Save registers, etc.
CCS_MWRENL_RCEX
Transmission/Reception processing
(Refer to Section 12.4.)
Reception complete flag ON
CC20_RECEIVE ← 1
CCS_REFSTB falling
100 s
or less
CCS transmission complete flag ON
CCS_M3SDOK_RDRQ.WPFLAG ← 1
(Data written into CCS becomes ready
for transmission)
Reception complete flag OFF
CC20_RECEIVE ← 0
CCS_REFSTB falling detection flag
Unit internal processing for
1ms interrupt
(Application processing)
Figure 12.3 Transmission/Reception Using Polling
R18UZ0056EJ0102
Dec. 28, 2018
.DCHANG != 0
CC-Link update?
Yes
No
ICCV20
Has the receive
Yes
data been read?
CC20_RECEIVE != 0
No
detected?
Yes
No
OFF
Execution time
400 to 750
12. Sample Flowchart for CC-Link Version 2
CHK20DONE
Application work area transfer
processing (see Section 12.5.)
M3RCEX & 0x01 != 0
CC-Link update?
Transmission/Reception processing
(Refer to Section 12.4.)
Reception complete flag ON
CC20_RECEIVE ← 1
CCS_REFSTB
falling detected?
100
s
or less
CCS transmission complete flag ON
CCS_M3SDOK_RDRQ.WPFLAG ← 1
(Data written into CCS becomes ready
for transmission)
Reception complete flag OFF
CC20_RECEIVE ← 0
CCS_REFSTB falling detection flag
CHK20DONE
Application work area transfer
processing (see Section 12.5.)
s
After recovering the
registers, IRET
Yes
No
ICCV20
Has the receive
data been read?
Yes
CC20_RECEIVE != 0
No
Yes
No
OFF
Page 60 of 83

Advertisement

Table of Contents
loading

This manual is also suitable for:

R-in32m4-cl2R-in32m3-ecR-in32m3-cl

Table of Contents