TM3_GetModuleInternalStatus: Get TM3 Module Internal Status

Function Description

This function fills the pStatusBuffer with the status table of the module ModuleIndex.

Graphical Representation

G-SE-0029804.2.jpg

 

 

IL and ST Representation

To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.

I/O Variable Description

Warning_Color.gifWARNING

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

TM3_ERR_CODE

Returns TM3_OK (00 hex) if command is correct otherwise returns the ID code of the error.

Example

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));