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.
Input
Channel number
Configurator PMX: SYS_PMX_CHANNEL_0–SYS_PMX_CHANNEL_3
Configurator PM7: SYS_PM7_AXIS_1–SYS_PM7_AXIS_8
Starting address of operation memory areas in the control unit to be written (source address)
Number of words to be written
Positioning memory area:
0: SYS_POSITIONING_AREA_COMMON_DATA
1: SYS_POSITIONING_AREA_AXIS_INFORMATION
2: SYS_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)
4: SYS_POSITIONING_AREA_SYNCRONOUS_CONTROL (FP-XH M4T16T, FP-XH M8N16T only)
5: SYS_POSITIONING_AREA_OPERATION_CHANGE (FP-XH M4T16T, FP-XH M8N16T only)
6: SYS_POSITIONING_AREA_RTEX_PARAMETER (FP-XH M4T16T, FP-XH M8N16T only)
Starting offset address of the positioning memory in control unit for storing data written (destination address)
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
When the variable bWriteData is set to TRUE, the function is carried out.
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
(*
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;