Operating Mode of Enable, Active, Done and Error Parameters

The ENABLE, ACTIVE, DONE (or SUCCESS) and ERROR parameters operate as follows:

(1) DONE = 1 if no error, DONE = 0 if error

(2) ERROR = 0 if no error, ERROR = 1 if error

The ENABLE parameter is written by the application.

The ACTIVE, DONE and ERROR parameters are read by the application.

To launch the communication function only once, the ENABLE signal needs to be reset to 0 once the ACTIVE parameter is set to 0. If the ENABLE parameter is maintained to 1 once the ACTIVE parameter is set to 0, the communication function is launched again and the ACTIVE parameter will be set to 1 on the next cycle.

Communicating with Remote Ethernet Drops

When a xxx_QX communication function is used to perform communication exchanges with Ethernet drops, it is highly advisable to test the communication health status of the Ethernet drop before launching the communication function.

A communication function addressed to a faulty drop may take up to 2 minutes to complete, ending with an error status due to the transaction timeout delay (the remote participant has not answered within the timeout delay).

NOTE: The execution of communication functions may be slowed down if all communication ports are already used by communication functions.

Communication health status information:

  • %SW172 to %SW173. Ethernet RIO drop detected communication error status. A bit in those status words is set to 0 when the corresponding connection between the PLC and the drop is not operating properly.

  • DROP_COM_HEALTH. Field in the DDT structure associated with a drop.

Example of Parameters Use in FBD

Below is a FBD diagram example implemented to continuously get the channel 0 status information of:

  • a Modicon X80 module located in rack 0, slot 8 of the drop instance #2 at IP address: 192.168.100.32

  • via a 140 CRP 312 00 I/O head module in slot 4 of the Quantum local rack

Communication sequence description:

Step

Action and Result

1

When the READ_STS_QX_Instance block is not active, it is started if the drop communication health status is set to 1.

2

READ_STS_QX_Instance is called every following scan until operation is completed either with:

  • a success (DONE is set to 1)

  • or a failure (ERROR is set to 1)

3

If the operation is completed with:

  • success, the Modicon X80 module status word can be used in the variable linked to the block STS parameter.

  • failure, the error code can be read in the STATUS parameter.

If the communication link with the drop is broken, DROP_COM_HEALTH falls to 0 and the current active operation is aborted (STATUS = 16#1001).

NOTE: If ABORT parameter is not triggered, the block remains active until the transaction timeout delay is elapsed and the communication ends with an error (STATUS = 16#5303).