F385_Positioning_WriteData

Write positioning parameters

This instruction is used to write the following positioning parameters and positioning table data with user programs:

  • General information such as channels/axes used, repetition numbers, and error codes

  • Axis information such as current execution status and current repetition number

  • Axis setting information such as pulse output control codes, home return settings, and speed, acceleration and deceleration settings

  • Positioning table data such as control codes and patterns, speed, acceleration and deceleration settings

This instruction writes the number of words (n_Number) of the data stored in the operation memory area starting with s2_Start and stores it in the positioning memory area starting with d_Offset.

Parameters

Input

s1_Channel (WORD, INT, UINT)

Channel number

Configurator PMX: SYS_PMX_CHANNEL_0SYS_PMX_CHANNEL_3

Configurator PM7: SYS_PM7_AXIS_1SYS_PM7_AXIS_8

s2_Start (WORD, INT, UINT)

Starting address of operation memory areas in the control unit to be written (source address)

n_Number (WORD, INT, UINT)

Number of words to be written

s1_Area (WORD, INT, UINT)

Positioning memory area:

  • 0SYS_POSITIONING_AREA_COMMON_DATA

  • 1SYS_POSITIONING_AREA_AXIS_INFORMATION

  • 2SYS_POSITIONING_AREA_AXIS_SETTING

  • 3:

    • SYS_POSITIONING_AREA_TABLE_DATA (FP-XH standard types)

    • SYS_POSITIONING_AREA_CAM_PATTERN (FP-XH M4T16T, FP-XH M8N16T only)

  • 4SYS_POSITIONING_AREA_SYNCRONOUS_CONTROL (FP-XH M4T16T, FP-XH M8N16T only)

  • 5SYS_POSITIONING_AREA_OPERATION_CHANGE (FP-XH M4T16T, FP-XH M8N16T only)

  • 6: SYS_POSITIONING_AREA_RTEX_PARAMETER (FP-XH M4T16T, FP-XH M8N16T only)

d_Offset (WORD, INT, UINT)

Starting offset address of the positioning memory in control unit for storing data written (destination address)

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
		bWriteData: BOOL:=FALSE;
		awData: ARRAY [0..9] OF WORD:=[10(0)];
	END_VAR

POU body

When the variable bWriteData 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 := 7 ;
        NETWORK_BODY
B(B_COMMENT,,ø^Settings for s1_Channel:ø^	PMX-Configurator:  SYS_PMX_CHANNEL_0 ... SYS_PMX_CHANNEL_3ø^	PM7-Configurator: 	SYS_PM7_AXIS_1 ... SYS_PM7_AXIS_8ø^,2,1,49,6,);
L(1,0,1,7);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 8 ;
        NETWORK_BODY
B(B_F,F385_Positioning_WriteData!,,20,0,33,8,,?DEN?Ds1_Channel?Ds2_Start?Dn_Number?Ds1_Area?Dd_Offset?AENO);
B(B_VARIN,,SYS_PMX_CHANNEL_0,18,2,20,4,);
B(B_VARIN,,awData,11,3,13,5,);
B(B_VARIN,,SYS_POSITIONING_AREA_AXIS_SETTING,18,5,20,7,);
B(B_VARIN,,155,18,6,20,8,);
B(B_CONTACT,,bWriteData,9,1,11,3,R);
B(B_F,Adr_Of_Var_I!,,13,3,20,5,,?D?C);
B(B_F,Size_Of_Var!,,13,4,20,6,,?D?C);
L(1,2,9,2);
L(11,2,20,2);
L(13,4,13,5);
L(1,0,1,8);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

(*
	Settings for s1_Channel:
		PMX-Configurator: 	SYS_PMX_CHANNEL_0 ... SYS_PMX_CHANNEL_3
		PM7-Configurator: 	SYS_PM7_AXIS_1 ... SYS_PM7_AXIS_8
*)

if (DF(bWriteData)) then
	F385_Positioning_WriteData(	s1_Channel 	:= SYS_PMX_CHANNEL_0, 
								s2_Start 	:= Adr_Of_Var(awData), 
								n_Number 	:= Size_Of_Var(awData), 
								s1_Area 	:= SYS_POSITIONING_AREA_AXIS_SETTING, 
							   	d_Offset 	:= 155);
end_if;

Modified on: 2022-10-17Feedback on this pagePanasonic hotline