Management of Exchanges and Reports with Explicit Objects
(Original Document)
At a Glance
When data is exchanged between the PLC memory and the module, the module may require several task cycles to acknowledge this information. IODDTs use two words to manage exchanges:
NOTE:
Depending on the localization of the module, the management of the explicit exchanges (%MW0.0.MOD.0.0 for example) will not be detected by the application:
  • For in-rack modules, explicit exchanges are done immediately on the local PLC Bus and are finished before the end of the execution task. So, the READ_STS, for example, is finished when the %MW0.0.mod.0.0 bit is checked by the application.
  • For remote bus (Fipio for example), explicit exchanges are not synchronous with the execution task, so the detection is possible by the application.
Illustration
The illustration below shows the different significant bits for managing exchanges:
Description of Significant Bits
Each bit of the words EXCH_STS (%MWr.m.c.0) and EXCH_RPT (%MWr.m.c.1) is associated with a type of parameter:
NOTE: r represents the rack number, m the position of the module in the rack, while c represents the channel number in the module.
NOTE: Exchange and report words also exist at module level EXCH_STS (%MWr.m.MOD) and EXCH_RPT (%MWr.m.MOD.1) as per IODDT type T_GEN_MOD.
Example
Phase 1: Sending data by using the WRITE_PARAM instruction
When the instruction is scanned by the PLC, the Exchange in progress bit is set to 1 in %MWr.m.c.
Phase 2: Analysis of the data by the I/O module and report.
When the data is exchanged between the PLC memory and the module, acknowledgement by the module is managed by the ADJ_ERR bit (%MWr.m.c.1.2).
This bit makes the following reports:
NOTE: There is no adjustment parameter at module level.
Execution Indicators for an Explicit Exchange: EXCH_STS
The table below shows the control bits of the explicit exchanges: EXCH_STS (%MWr.m.c.0)
Standard Symbol
Type
Access
Meaning
Address
STS_IN_PROGR
BOOL
R
Reading of channel status words in progress
%MWr.m.c.0.0
CMD_IN_PROGR
BOOL
R
Command parameters exchange in progress
%MWr.m.c.0.1
ADJ_IN_PROGR
BOOL
R
Adjust parameters exchange in progress
%MWr.m.c.0.2
RECONF_IN_PROGR
BOOL
R
Reconfiguration of the module in progress
%MWr.m.c.0.15
NOTE: If the module is not present or is disconnected, explicit exchange objects (READ_STS for example) are not sent to the module (STS_IN_PROG (%MWr.m.c.0.0) = 0), but the words are refreshed.
Explicit Exchange Report: EXCH_RPT
The table below shows the report bits: EXCH_RPT (%MWr.m.c.1)
Standard Symbol
Type
Access
Meaning
Address
STS_ERR
BOOL
R
Error detected while reading channel status words
(1 = detected error)
%MWr.m.c.1.0
CMD_ERR
BOOL
R
Error detected during a command parameter exchange
(1 = detected error)
%MWr.m.c.1.1
ADJ_ERR
BOOL
R
Error dectected during an adjust parameter exchange
(1 = detected error)
%MWr.m.c.1.2
RECONF_ERR
BOOL
R
Error detected during reconfiguration of the channel
(1 = detected error)
%MWr.m.c.1.15
Counting Module Use
The following table describes the steps realized between a couting module and the system after a power-on.
Step
Action
1
Power on.
2
The system sends the configuration parameters.
3
The system sends the adjust parameters by WRITE_PARAM method.
Note: When the operation is finished, the bit %MWr.m.c.0.2 switches to 0.
If, in the begining of your application, you use a WRITE_PARAM command, wait until the bit %MWr.m.c.0.2 switches to 0.