TM3_GetModuleInternalStatus: Get TM3 Module Internal Status
This function fills the pStatusBuffer with the status table of the module ModuleIndex.
To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.
|
UNINTENDED EQUIPMENT OPERATION |
Ensure that the pStatusBuffer is allocated. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
The following table describes the input variables:
Input |
Type |
Comment |
---|---|---|
ModuleIndex |
BYTE |
Index of the module (0 for the first expansion, 1 for the second, and so on). |
StatusOffset |
BYTE |
Offset of the first status to be read in the status table. |
StatusSize |
BYTE |
Number of bytes to be read in the status table. |
pStatusBuffer |
POINTER TO BYTE |
Buffer containing the read status table. |
The following table describes the output variable:
Output |
Type |
Comment |
---|---|---|
TM3_GetModuleInternalStatus |
Returns TM3_OK (00 hex) if command is correct otherwise returns the ID code of the error. |
The following example describes how to get the module internal status:
VAR
AMM3HT_Channel1_Input_Status: BYTE;
END_VAR
TM3_GetModuleInternalStatus(0, 1, 1, ADR(AMM3HT_Channel1_Input_Status));