FP_COM_GET_PLCLINK_ERROR_OCCURRENCY

Get PLC link error frequency

This FP instruction reads the PLC link error frequency information for the communication port specified by s_Port of the CPU unit and stores the result in the DUT d_dutPlcLinkErrorOccurrency.

Parameters

Input

s_Port (WORD, INT, UINT)

Specifies the communication ports depending on the PLC type:

  • COM port e.g. SYS_COM0_PORT

  • MCU/SCU e.g. 16#xx01 (xx = slot number) in COM01

Output

d_dutPlcLinkErrorOccurrency (FP_COM_PLCLINK_ERROR_OCCURRENCY_DUT)

Stores the number of occurrences in the FP_COM_PLCLINK_ERROR_OCCURRENCY_DUT

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if the area specified using the index modifier exceeds the limit.
sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if the area specified using the index modifier exceeds the limit.

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		dutPlcLinkErrorOccurrency: FP_COM_PLCLINK_ERROR_OCCURRENCY_DUT;
	END_VAR

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 4 ;
        NETWORK_BODY
B(B_F,FP_COM_GET_PLCLINK_ERROR_OCCURRENCY!,,15,0,36,4,,?DEN?Ds_Port?AENO?Cd_dutPlcLinkErrorOccurrency);
B(B_VARIN,,SYS_COM0_PORT,13,2,15,4,);
B(B_VAROUT,,dutPlcLinkErrorOccurrency,36,2,38,4,);
L(1,0,1,4);
L(1,2,15,2);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

FP_COM_GET_PLCLINK_ERROR_OCCURRENCY(s_Port := SYS_COM0_PORT,
                          d_dutPlcLinkErrorOccurrency => dutPlcLinkErrorOccurrency);

Modified on: 2022-01-18Feedback on this pagePanasonic hotline