Communication via Function Blocks
6.4 Using the Function Blocks with the RK 512 Computer Connection
CP 341 Point-to-Point Communication, Installation and Parameter Assignment
156
Manual, 09/2008, A5E02191071-01
Special features for (expanded) data blocks
Note the following special features with regard to fetching data from data blocks and
expanded data blocks:
●
RK 512 allows only an even-numbered amount of data to be fetched. If you specify an
odd-numbered amount for the length (LEN), an extra byte is always transmitted. In the
destination DB, however, the correct amount of data is entered.
●
RK 512 allows only an even-numbered offset. If you specify an odd-numbered offset, the
data is fetched from the partner starting from the next lower even-numbered offset.
Example: Offset is 7, data is fetched as of byte 6.
Special features for timers and counters
If you fetch timers or counters from the communication partner, remember that 2 bytes are
fetched for each timer or counter. For example, if you want to fetch 10 counters, you must
enter 20 as the length.
What is to be done?
Block call
STL representation
LAD representation
CALL
P_SND_RK, I_SND_RK
SF:
=
REQ:
=
R:
=
LADDR:
=
DB_NO:
=
DBB_NO:
=
LEN:
=
R_CPU_NO:
=
R_TYP:
=
R_NO:
=
R_OFFSET:
=
R_CF_BYT
=
R_CF_BIT
=
DONE:
=
ERROR:
=
STATUS:
=
,B61'B5.
3B61'B5.
(1
(12
6)
'21(
5(4 (5525
5
67$786
/$''5
'%B12
'%%B12
/(1
5B&38B12
5B7<3
5B12
5B2))6(7
5B&)B%<7
5B&)B%,7
Note
The parameters EN and ENO are only present in the graphical representation (LAD or FBD).
To process these parameters, the compiler uses the binary result BR. The binary result is set
to signal state "1" if the block was terminated without errors. If there was an error, the BR is
set to "0".
长沙工控帮教育科技有限公司
www.gkbpx.com