FP_POS_UNIT_SET_TABLE

Set positioning table

This FP instruction starts positioning for the positioning unit in the slot specified by s1_Slot and for the axis specified by s2_Axis according to the positioning table set at s3_Table if the trigger EN is TRUE. Configure the positioning table in the Configurator PM7.

Parameters

Input

s1_Slot (WORD, INT, UINT)

Slot number

s2_Axis (WORD, INT, UINT)

Axis number

Values: 1–4, 8 (virtual axis)

s3_Table (WORD, INT, UINT)

Number of positioning table

Values: 1–600, 10001–10025

Error flags

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

  • if the slot and/or axis number is out of range

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

  • if the slot and/or axis number is out of range

Example

Global variables

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

DUT

  • Input

  • Output

    Copy the DUT to the clipboard and paste the DUT directly into the DUT pool of the navigator to use this DUT in your program.

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.

POU body

When the variable bStart changes from FALSE to TRUE, the function is carried out.

	VAR_EXTERNAL
		g_dutPositioningInputs: FP_POS_UNIT_INPUT_DUT;
		g_dutPositioningOutputs: FP_POS_UNIT_OUTPUT_DUT;
	END_VAR
	VAR_EXTERNAL CONSTANT
		g_iPositioningUnitSlotNumber: INT:=1;
		g_iPositioningUnitAxisNumber: INT:=1;
	END_VAR
	VAR
		bAxisReady: BOOL:=FALSE;
		bStartPositioning: BOOL:=FALSE;
		iTableNumber: INT:=1;
		@'': @'';
	END_VAR

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_VARIN,,g_dutPositioningInputs.b00_ReadyPositioning,21,1,23,3,);
B(B_VARIN,,g_dutPositioningInputs.b04_ToolOperation,21,2,23,4,);
B(B_F,@AND-3!,,28,1,33,5,,?D?D?D?C);
B(B_VARIN,,g_dutPositioningInputs.b60_ErrorAxis1,21,3,23,5,);
B(B_F,NOT!,,23,2,28,4,,?D?C);
B(B_F,NOT!,,23,3,28,5,,?D?C);
B(B_COIL,,bAxisReady,43,1,45,3,);
L(23,2,28,2);
L(33,2,43,2);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 6 ;
        NETWORK_BODY
B(B_CONTACT,,bStartPositioning,5,1,7,3,R);
B(B_F,FP_POS_UNIT_SET_TABLE!,,25,0,38,6,,?DEN?Ds1_Slot?Ds2_Axis?Ds3_Table?AENO);
B(B_VARIN,,g_iPositioningUnitSlotNumber,23,2,25,4,);
B(B_VARIN,,g_iPositioningUnitAxisNumber,23,3,25,5,);
B(B_VARIN,,iTableNumber,23,4,25,6,);
L(1,2,5,2);
L(7,2,25,2);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_VARIN,,bStartPositioning,21,1,23,3,);
B(B_VARIN,,bAxisReady,21,2,23,4,);
B(B_F,@AND-3!,,28,1,33,5,,?D?D?D?C);
B(B_VARIN,,g_dutPositioningInputs.b18_BusyAxis1,21,3,23,5,);
B(B_F,NOT!,,23,3,28,5,,?D?C);
B(B_COIL,,g_dutPositioningOutputs.b10_PositioningStartAxis1,43,1,45,3,);
B(B_F,DF!,,23,0,28,3,,?Di?Co);
L(23,3,28,3);
L(33,2,43,2);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

If (g_dutPositioningInputs.b00_ReadyPositioning AND NOT g_dutPositioningInputs.b04_ToolOperation
    AND NOT g_dutPositioningInputs.b60_ErrorAxis1) then
    bAxisReady:=TRUE;
End_if;
If (bStart) then
    FP_POS_UNIT_SET_TABLE(s1_Slot := g_iPositioningUnitSlotNumber,
                          s2_Axis := g_iPositioningUnitAxisNumber,
                          s3_Table := iTableNumber);
End_if;
If DF((bStart) AND bAxisReady Then AND NOT g_dutPositioningInputs.b18_BusyAxis1) then
    g_dutPositioningOutputs.b10_PositioningStartAxis1:=TRUE;
End_if;

Modified on: 2022-05-13Feedback on this pagePanasonic hotline