F384_Positioning_ReadData

Read positioning parameters

This instruction is used to read 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 reads the number of words specified by n_Number of the data stored in the positioning memory starting with s2_Offset and stores it in the operation memory area starting with d_Start.

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

s1_Area (WORD, INT, UINT)

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)

s2_Offset (WORD, INT, UINT)

Starting offset address of positioning memory areas in the control unit to be read (source address)

n_Number (WORD, INT, UINT)

Number of words to be read

Output

d_Start (WORD)

Starting address of operation memory in the control unit for storing data read (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
		bReadData: BOOL:=FALSE;
		awData: ARRAY [0..9] OF WORD:=[10(0)];
		@'': @'';
	END_VAR

POU body

When the variable bReadData 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 := 7 ;
        NETWORK_BODY
B(B_F,F384_Positioning_ReadData!,,22,0,35,7,,?DEN?Ds1_Channel?Ds1_Area?Ds2_Offset?Dn_Number?AENO?Cd_Start);
B(B_VARIN,,SYS_PMX_CHANNEL_0,20,2,22,4,);
B(B_VARIN,,SYS_POSITIONING_AREA_AXIS_INFORMATION,20,3,22,5,);
B(B_VARIN,,155,20,4,22,6,);
B(B_VARIN,,awData,13,5,15,7,);
B(B_VAROUT,,awData,43,2,45,4,);
B(B_F,Size_Of_Var!,,15,5,22,7,,?D?C);
B(B_F,Adr_Of_Var_O!,,35,2,43,4,,?D?C);
B(B_CONTACT,,bReadData,7,1,9,3,);
L(1,2,7,2);
L(9,2,22,2);
L(1,0,1,7);
        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 (bReadData) then
	F384_Positioning_ReadData(	s1_Channel 	:= SYS_PMX_CHANNEL_0, 
								s1_Area 	:= SYS_POSITIONING_AREA_AXIS_INFORMATION, 
								s2_Offset 	:= 155, 
								n_Number 	:= Size_Of_Var(awData), 
								d_Start 	=> Adr_Of_Var(awData));
end_if;

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