F175_PulseOutput_Linear

Linear interpolation

Pulses are output from two channels in accordance with the parameters in the specified DUT, so that the path to the target position forms a straight line.Pulses are output from the specified channel when the control flag for this channel is FALSE and the execution condition is TRUE.

Parameters

Input

n_iPulseOutputChannelconstant

Pulse output channel:

FP-XH C30 T/P: 0–3

FP-XH C60 T/P: 0–5

FPS: 0, 2

FP-X R: 0, 1

FP-XC14T: 0, 1, 2

FP-X C30T/C60T: 0, 1, 2, 3

FP0R: 0, 1, 2, 3

For interpolation, channel 0 and 1 or channel 2 and 3 are used as pairs. You may only specify 0 or 2 (for C14T: 0 only).

Input/output

s_dutDataTable (DUT)

Starting address of area containing the data table

FPS, FP-X: F175_PulseOutput_Linear_DUT_0

FP0R: F175_PulseOutput_Linear_DUT_1

Description for FP-Sigma, FP-X

Use the following predefined DUT: F175_PulseOutput_Linear_DUT_0

The following parameters can be specified in the DUT:

  • Control code
  • Initial and final speed
  • Target speed
  • Acceleration/deceleration time
  • X-axis target value
  • Y-axis target value

The following parameters for each axis are calculated upon execution of the instruction and stored in the operation result area of the DUT.

  • X-axis initial and final speed
  • X-axis target speed
  • Y-axis initial and final speed
  • Y-axis target speed
  • X-axis frequency range
  • Y-axis frequency range
  • X-axis number of acceleration/deceleration steps
  • Y-axis number of acceleration/deceleration steps

Pulse output characteristics

X-axis target value (channel 0): 5000

Y-axis target value (channel 2) (FP-X: channel 1): 2000

The two axes are controlled so that a linear path is followed to the target position.

  • The target value for each axis must be within the range of -8388608–8388607. When this instruction is used in combination with other pulse output instructions, e.g. F171_PulseOutput_Trapezoidal, the target value in these instructions must be within the same range.
  • When using in applications requiring precision, test runs with the actual machine are necessary.
  • If both the main program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously.
  • FP-X: When a pulse output instruction is executed and pulses are being output, the pulse output control flag (e.g. sys_bIsPulseChannel0Active) of the corresponding channel is TRUE. No other pulse output instruction can be executed as long as this flag is TRUE.

  • FPS: The high-speed counter control flag (e.g. sys_bIsHscChannel0ControlActive) and the pulse output control flag (e.g. sys_bIsPulseChannel0Active) are assigned to the same special internal flag number (e.g. R903A). Therefore, when a high-speed counter instruction or a pulse output instruction is executed, both the high-speed counter control flag (e.g. sys_bIsHscChannel0ControlActive) and the pulse output control flag (e.g. sys_bIsPulseChannel0Active) for the channel used are TRUE. No other high-speed counter instruction or pulse output instruction can be executed as long as this flag is TRUE.

  • FPS: Executing the circular interpolation control instruction F176_PulseOutput_Center sets the circular interpolation control flag (sys_bIsCircularInterpolationActive) to TRUE. The status of this flag is maintained until the target value is reached (even if the execution condition is no longer TRUE). During this time, other pulse output instructions cannot be executed.

  • FPS: Set any high-speed counter allocated to a pulse output channel to "Unused" in the system registers.

  • FP-X: Set "Pulse output" for the desired channel in the system registers.

  • When programs are being edited in RUN mode, pulse output stops but resumes after the program changes have been downloaded.
  • We strongly recommend that you incorporate a forced stop option in your positioning program.

  • The status of the high-speed counter control flag or pulse output control flag may change while a scan is being carried out. For example, if the number of received bytes is read more than once different statuses may exist within one scan.

Description for FP0R

Use the following predefined DUT: F175_PulseOutput_Linear_DUT_1

The following parameters can be specified in the DUT:

  • Control code
  • Initial and final speed
  • Target speed
  • Acceleration time
  • Deceleration time
  • X-axis target value
  • Y-axis target value

The following parameters for each axis are calculated upon execution of the instruction and stored in the operation result area of the DUT.

  • X-axis initial and final speed
  • X-axis target speed
  • Y-axis initial and final speed
  • Y-axis target speed

Pulse output characteristics

X-axis target value (channel 0): 5000

Y-axis target value (channel 1): 2000

Pulses are output from the X-axis (channel 0) and the Y-axis (channel 1), so that the initial speed is 500Hz, the target speed is 5kHz, and the acceleration time and deceleration time is 300ms. The two axes are controlled so that a linear path is followed to the target position.

Pulses are output using a duty of 25%.With the pulse output method "pulse/direction", pulses are output approx. 300ms after the direction signal has been output; the motor driver characteristics are simultaneously taken into consideration.

  • Pulse output stops when the target value is reached.

  • The target value for each axis must be within the range of -8388608–8388607. When this instruction is used in combination with other pulse output instructions, e.g. F171_PulseOutput_Trapezoidal, the target value in these instructions must be within the same range.
  • When using in applications requiring precision, test runs with the actual machine are necessary.
  • If both the main program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously.
  • When a pulse output instruction is executed and pulses are being output, the pulse output control flag (e.g. sys_bIsPulseChannel0Active) of the corresponding channel is TRUE. No other pulse output instruction can be executed as long as this flag is TRUE.
  • When programs are being edited in RUN mode, pulse output stops but resumes after the program changes have been downloaded.
  • We strongly recommend that you incorporate a forced stop option in your positioning program.

  • The status of the high-speed counter control flag or pulse output control flag may change while a scan is being carried out. For example, if the number of received bytes is read more than once different statuses may exist within one scan.

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
		bTrigger: BOOL:=FALSE;
		dutLinearData: F175_PulseOutput_Linear_DUT_0:=dwControlCode := 16#1000,
diInitialAndFinalSpeed := 500,
diMaximumSpeed := 5000,
diAccelerationAndDecelerationTime := 300,
diTargetValue_X := 5000,
diTargetValue_Y := 2000;
			(*Control code:
Digit 3: 1=Duty ratio 25%
Digit 2: 0=Fixed
Digit 1: 0=Relative value control 
Digit 0: 0=CW/CCW
*)
		@'': @'';
	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 := 6 ;
        NETWORK_BODY
B(B_CONTACT,,bTrigger,4,2,6,4,R);
B(B_VARIN,,dutLinearData,11,4,13,6,);
B(B_VARIN,,0,11,3,13,5,);
B(B_F,F175_PulseOutput_Linear!,Instance,13,1,28,6,,?DEN?Hn_iPulseOutputChannel?Ds_dutDataTable?As_dutDataTable?AENO);
L(1,3,4,3);
L(6,3,13,3);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF DF(bTrigger) then
    F175_PulseOutput_Linear(n_iPulseOutputChannel := 0, 
      s_dutDataTable := dutLinearData);
END_IF;

Modified on: 2022-06-28Feedback on this pagePanasonic hotline