When data is exchanged between the PLC memory and the module, the module may require several task cycles to acknowledge this information. All 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 doneimmediately on the local PLC Bus and are finished before the end of the executon task, so the READ_STS, for example, is always 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.
The illustration below shows the different significant bits for managing exchanges.
Description of Significant Bits
Each bit of the EXCH_STS (%MWr.m.c.0) and EXCH_RPT (%MWr.m.c.1) words is associated with a type of parameter:
-
Rank 0 bits are associated with the status parameters:
-
Rank 1 bits are associated with the command parameters:
-
The CMD_IN_PROGR bit (%MWr.m.c.0.1) indicates whether command parameters are being sent to the module channel.
-
The CMD_ERR bit (%MWr.m.c.1.1) specifies whether the command parameters are accepted by the module channel.
-
Rank 2 bits are associated with the adjustment parameters:
-
The ADJ_IN_PROGR bit (%MWr.m.c.0.2) indicates whether the adjustment parameters are being exchanged with the module channel (via WRITE_PARAM, READ_PARAM, SAVE_PARAM, RESTORE_PARAM).
-
The ADJ_ERR bit (%MWr.m.c.1.2) specifies whether the adjustment parameters are accepted by the module. If the exchange is correctly executed, the bit is set to 0.
-
Rank 15 bits indicate a reconfiguration on channel c of the module from the console (modification of the configuration parameters and cold start-up of the channel).
-
Bits r, m, and c indicate the following slots:
-
Bit r represents the rack number.
-
Bit m represents the position of the module in the rack.
-
Bit c represents the channel number in the module.
NOTE: Exchange and report words also exist at the level of EXCH_STS (%MWr.m.MOD.0) and EXCH_RPT (%MWr.m.MOD.1) modules, as per T_ANA_IN_BMX, T_ANA_IN_T_BMX and T_ANA_OUT_BMX-type IODDTs.
Phase 1: Sending data by using the WRITE_PARAM instruction:
When the instruction is scanned by the PLC processor, the Exchange in progress bit is set to 1 in %MWr.m.c.
Phase 2: Analysis of the data by the input/output module and report:
When data is exchanged between the PLC memory and the module, acknowledgement by the module is managed by the ADJ_ERR (%MWr.m.c.1.2) bit which, depending on its value, gives the following report:
-
0: correct exchange.
-
1: error in exchange.
NOTE: There is no adjustment parameter at module level.
Explicit Exchange Execution Flag: EXCH_STS
The table below shows the EXCH_STS (%MWr.m.c.0) explicit exchange control bits.
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 presents the EXCH_RPT (%MWr.m.c.1) report bits.
Standard symbol
|
Type
|
Access
|
Meaning
|
Address
|
STS_ERR
|
BOOL
|
R
|
Error reading channel status words
(1 = error)
|
%MWr.m.c.1.0
|
CMD_ERR
|
BOOL
|
R
|
Error during a command parameter exchange
(1 = error)
|
%MWr.m.c.1.1
|
ADJ_ERR
|
BOOL
|
R
|
Error while exchanging adjustment parameters
(1 = error)
|
%MWr.m.c.1.2
|
RECONF_ERR
|
BOOL
|
R
|
Error during reconfiguration of the channel
(1 = error)
|
%MWr.m.c.1.15
|