FP_DIRECT_OUT

Write direct output flag

This instruction writes the value of an output flag (Y) using a direct execution command. The Output_Y will be written asynchronously within the current PLC cycle.

Input

Value FP0H, FP-XH: (BOOL); FP7: (BOOL, WORD, DWORD)

Value written directly to Output_Y

Output

Output_Y FP0H, FP-XH: (BOOL); FP7: (BOOL, WORD, DWORD)

Global variable with FP address or explicit user address to be written directly.

FP0H, FP-XH only: Valid range for FP address is Y0–Y109F to which a real output pin is assigned. Otherwise the PLC goes into operation error.

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

Global variables

In the global variable list you define variables that can be accessed by all POUs in the project.

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
		bWriteOutput: BOOL:=FALSE;
	END_VAR

LD bodyCopy code to clipboard

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

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_CONTACT,,bWriteOutput,5,1,7,3,);
B(B_F,E_FP_DIRECT_OUT!,,15,0,24,4,,?DEN?DValue?AENO?COutput_Y);
B(B_VARIN,,bValue,13,2,15,4,);
B(B_VAROUT,,g_bDirectOut_Y1,24,2,26,4,);
L(1,0,1,5);
L(1,2,5,2);
L(7,2,15,2);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST bodyCopy code to clipboard

if (bWriteOutput) then
    g_bDirectOut_Y1:=FP_DIRECT_OUT(bValue);
end_if;

Modified on: 2023-03-13Feedback on this pagePanasonic hotline