F140_STC

Carry-flag set

The system variable sys_bIsCarry (carry-flag) goes ON if the trigger EN is in the ON-state. This instruction can be used to control data using carry-flag R9009 (e.g.F122_RCR and F123_RCL instructions).

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
		start: BOOL:=FALSE;
			(*activates the function;
result after a leading edge
from start: carry-flag (R9009)
will be set ON*)
	END_VAR

POU body

When the variable start is set to TRUE, the function is carried out.

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 6 ;
        NETWORK_BODY
B(B_CONTACT,,start,6,1,8,3,);
B(B_F,F140_STC,,10,0,18,3,,?DEN?AENO);
L(1,2,6,2);
L(8,2,10,2);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF start then
    F140_STC();
END_IF;

Modified on: 2019-01-26Feedback on this pagePanasonic hotline