READ_STS_MX: Reading the Status Parameters on EIO Bus
Original instructions
Description of the function
The READ_STS_MX function block is used to read the status words of an (e)X80 local rack or Ethernet RIO module, by performing an explicit exchange with the CPU memory.
These status words contain data on the operating mode of the module, and may be used to perform program-based diagnostics.
The additional parameters EN and ENO may also be configured.
FBD representation
LD representation
IL representation
CAL READ_STS_MX_Instance (ENABLE:=EnableREAD_STS, ABORT:=AbortREAD_STS, ADDR:=DataStructureAddress, CHANNEL:=StringChannel, DONE=>ReadStsSuccessful, ACTIVE=>ReadStsActiv, ERROR=>ReadStsFaulty, STATUS=>ErrorCode, STS_LEN=>NumberOfSTSWords, STS=>DataStructureChannelStatus)
ST representation
READ_STS_MX_Instance (ENABLE:=EnableREAD_STS, ABORT:=AbortREAD_STS, ADDR:=DataStructureAddress, CHANNEL:=StringChannel, DONE=>ReadStsSuccessful, ACTIVE=>ReadStsActiv, ERROR=>ReadStsFaulty, STATUS=>ErrorCode, STS_LEN=>NumberOfSTSWords, STS=>DataStructureChannelStatus);
Description of parameters
The following table describes the input parameters:
Parameter
Type
Comment
EnableREAD_STS
Set to 1 to enable the operation.
AbortREAD_STS
BOOL
Set to 1 to abort the currently active operation.
DataStructureAddress
Identifies the (e)X80 drop which the module belongs to, result of ADDMX function (1).
StringChannel
Identifies the channel to work upon. Contains the rack, slot and channel numbers as follows: ‘r.s.c’. If the channel is omitted, then the module server is addressed.
(1) To address a module in the local rack, enter 0.0.10 (CPU main server address).
The following table describes the output parameters:
Parameter
Type
Comment
ReadStsSuccessful
BOOL
Operation completed indication. Set to 1 when the execution of the operation is completed successfully.
ReadStsActiv
BOOL
Operation in progress indication. Set to 1 when the execution of the operation is in progress.
ReadStsFaulty
BOOL
Set to 1 if an error is detected by the function block.
ErrorCode
Code providing the detected error identification.
NumberOfSTSWords
Number of status registers/words read.
DataStructureChannelStatus
Channel status register/word. A DDDT-type variable may be used.
The status register/word description is provided in each EIO device manual.