Cycle time for data exchange with the bus coupler – BECKHOFF CP-Link3 User Manual
Page 69
Page 69
NETID := netId,
PORT := port,
IDXGRP := idxGrp,
IDXOFFS := idxOffs,
SRCADDR := ADR(data),
LEN := dataLen,
WRITE := TRUE,
TMOUT := T#1s
);
IF fbAdsWrite.ERR THEN
state := 2;
ELSE
state := 1;
END_IF
1:
fbAdsWrite(WRITE := FALSE);
IF fbAdsWrite.ERR THEN
state := 2;
ELSE
IF NOT fbAdsWrite.BUSY THEN
state := 2;
END_IF
END_IF
2:
fbAdsWrite(WRITE := FALSE);
state := 0;
END_CASE
4.b ADS access via RT Ethernet
When an RT Ethernet connection is used for the ADS communication, the data is exchanged in deterministic cycle
times, and this allows the I/O channels of the CPx8xx to be read and written deterministically. The recommended cycle
time for data exchange with the terminals at the Bus Coupler is still between 50 and 80 ms (see also cycle time for data
exchange ). .
Setting up RT Ethernet:
One network adapter of both the host PC and the client must be configured as an RT Ethernet device and added
to the I/O configuration (also see Configuration of RT Ethernet Devices ).
"Routing" must be switched on for this RT Ethernet device on both on host PC as well as on the client. In addition
the NetIds of each of the RT Ethernet devices must be entered respectively in the "Routes" tables (also see
Configuration of RT Ethernet Devices ).
Further configuration is carried out as described in 4.a with the exception that in the PLC program the NetId for the client
RT Ethernet devices is entered as the NetId for ADS communication (this differs from the normal NetId).
Cycle time for data exchange with the Bus Coupler
The recommended cycle time for data exchange with the terminals of the Bus Coupler is between 50 and 80 ms. In order
to meet the cycle time for data exchange with the Coupler there are the following options:
The tasks, whose variables are linked with the I/O channels of the Bus Coupler, have to be configured with a cycle
time of > 50 ms.
The tasks, whose variables are linked with the I/O channels of the Bus Coupler, could be configured with a cycle
time of < 50 ms. In this case it is necessary to activate the so-called Async Mode for the Bus Coupler: