FP_DIRECT_OUTPUT

Direct output refresh

This FP instruction sets the direct output memory specified by Slot and Offset independently from any IO refresh. Additionally, it sets also the corresponding output flag or flags.

Parameters

Input

Slot (WORD, INT, UINT)

Slot number

Offset (WORD, INT, UINT)

Offset

Value (BOOL, WORD, DWORD)

Value of the direct output

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 headerCopy code to clipboard

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
		bTestBool: BOOL:=FALSE;
		bTestWord: BOOL:=FALSE;
		bTestDWord: BOOL:=FALSE;
		iSlot1: INT:=1;
		iOffset21: INT:=21;
	END_VAR

LD bodyCopy code to clipboard

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_VARIN,,iSlot1,23,2,25,4,);
B(B_VARIN,,iOffset21,23,3,25,5,);
B(B_VARIN,,TRUE,23,4,25,6,);
B(B_F,E_FP_DIRECT_OUTPUT!,,25,0,36,6,,?DEN?DSlot?DOffset?DValue?AENO);
B(B_CONTACT,,bTestBool,5,1,7,3,);
B(B_CONTACT,,bTestWord,11,1,13,3,N);
B(B_CONTACT,,bTestDWord,17,1,19,3,N);
L(1,2,5,2);
L(7,2,11,2);
L(13,2,17,2);
L(19,2,25,2);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST bodyCopy code to clipboard

IF (bTestBool AND NOT bTestWord AND NOT bTestDWord) then
    FP_DIRECT_OUTPUT(Slot := iSlot1, Offset := iOffset21, Value := TRUE);
END_IF;

Modified on: 2019-05-15Feedback on this pagePanasonic hotline