F172_PulseOutput_Jog

JOG operation

This instruction is used for JOG operation.The specified number of pulses is output after the position control trigger input has turned to TRUE. A deceleration is performed before the target value is reached and pulse output stops.Pulses are output from the specified channel when the control flag for this channel is FALSE and the execution condition is TRUE.

Parameters

Input

s_dutDataTable

Starting address of area containing the data table

  • FP-S, FP-X:

    F172_PulseOutput_Jog_Type0_DUT_0

    F172_PulseOutput_Jog_Type1_DUT_0

  • FP0R:

    F172_PulseOutput_Jog_Type0_DUT_1

    F172_PulseOutput_Jog_Type1_DUT_1

n_iPulseOutputChannel* (decimal constant)

Pulse output channel:

FP-XH C30 T/P: 0–3

FP-XH C60 T/P: 0–5

FP-S: 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

Description for FP-Sigma, FP-X

Use the following predefined DUT: F172_PulseOutput_Jog_Type0_DUT_0 (Mode with no target value) orF172_PulseOutput_Jog_Type1_DUT_0 (Target value match stop mode)

The following parameters can be specified in the DUT:
  • Control code
  • Frequency
  • Target value

Pulse output characteristics

The frequency and the target value can be changed in each scan. The control code, however, cannot be changed during execution of the instruction.Select one of two different operation modes:

  • Mode with no target value (type 0):

    Pulses are output in accordance with the conditions set in the DUT as long as the execution condition is TRUE.
    1.  (1) Execution condition
    2.  (2) CW pulse output
  • Target value match stop mode (type 1):

    Output stops when the target value is reached. Set this mode in the control code, and specify the target value (an absolute value) in the DUT. (FPSV1.4 or higher, FP-X)

    1.  (1) Execution condition
    2.  (2) CW pulse output
    3.  (3) Target value reached (pulse output stops)

General programming information

As soon as you begin editing a program online (i.e., in RUN mode) using this instruction, pulse output will stop.

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.

  • If the execution of the instruction is started with an invalid frequency value, an operation error occurs. If the frequency is changed to an invalid value during execution of the instruction, the frequency output will be adjusted to either the minimum or the maximum value of the permissible range.

  • Changing the control code during execution of the instruction will have no effect.
  • 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: F172_PulseOutput_Jog_Type0_DUT_1 (Mode with no target value) or F172_PulseOutput_Jog_Type1_DUT_1 (Target value match stop mode)

The following parameters can be specified in the DUT:

  • Control code
  • Initial and final speed
  • Target speed
  • Acceleration time
  • Deceleration time
  • Target value

Pulse output characteristics

  1.  (1) Target speed1
  2.  (2) Target speed2
  3.  (3) Pulse output control flag
  4.  (4) Execution condition
  • The pulse output frequency changes according to the specified acceleration time and the specified deceleration time.
  • The difference between the maximum speed of 50kHz and the initial speed determines the slope of the acceleration ramp.
  • The difference between the maximum speed of 50kHz and the final speed determines the slope of the deceleration ramp.
  • When the execution condition turns to FALSE after starting the instruction, a decelerated stop is performed.
  • When the execution condition turns to TRUE during deceleration, acceleration is performed again.
  • The target speed can be changed during pulse output.
  • 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.
  • When a decelerated stop is requested during acceleration, deceleration is performed with the same slope as deceleration from the target speed.
  • Acceleration time and deceleration time have priority over initial speed and final speed. This means that the values for acceleration time and deceleration time will not be changed whereas the values for initial speed and final speed may be corrected by the pulse output instruction to enable acceleration and deceleration within the specified time. The modified values are written to data registers which can be accessed using the system variables sys_iPulseChannelxCorrectedInitialSpeed and sys_iPulseChannelxCorrectedFinalSpeed (where x=channel number

Select one of two different operation modes:

  • Mode with no target value (type 0):

    Pulses are output in accordance with the conditions set in the DUT as long as the execution condition is TRUE.A decelerated stop begins whenever the execution condition is FALSE.

    1.  (1) Initial and final speed
    2.  (2) Change of target speed
    3.  (3) Execution condition
    4.  (4) Pulse output control flag
    5.  (5) Decelerated stop
  • Target value match stop mode (type 1):

    Output stops when the target value is reached. Set this mode in the control code, and specify the target value (an absolute value) in the DUT.A decelerated stop is performed when the target value has been reached. Deceleration is performed within the specified deceleration time.

    1.  (1) Initial and final speed
    2.  (2) Change of target speed
    3.  (3) Execution condition
    4.  (4) Pulse output control flag
    5.  (5) Target value
    6.  (6) Deceleration time

Changing the target speed during pulse output

  • If the elapsed value crosses over the acceleration forbidden area starting position (e.g. sys_diPulseChannel0AccelerationForbiddenAreaStartingPosition) during acceleration, acceleration cannot be performed.
  • The deceleration speed cannot be lower than the corrected final speed.

General programming information

As soon as you begin editing a program online (i.e., in RUN mode) using this instruction, pulse output will stop.

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.
  • Changing the control code during execution of the instruction will have no effect.
  • 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_EXTERNAL
		bActivateJog: BOOL:=FALSE;
	END_VAR
	VAR 
		dutJog: F172_PulseOutput_Jog_Type0_DUT_0:=dwControlCode := 16#1110;
			(*Control code:
Digit 3: 1=Duty ratio 25%
Digit 2: 1=Frequency range 48Hz-100kHz
Digit 1: 1=Incremental counting
Digit 0: 0=CW*)
		diSpeed: DINT:=300;
		@'': @'';
	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 := 4 ;
        NETWORK_BODY
B(B_CONTACT,,bActivateJog,4,1,6,3,);
B(B_F,E_MOVE!,Instance,16,0,22,4,,?DEN?D?AENO?C);
B(B_VARIN,,diSpeed,14,2,16,4,);
B(B_VAROUT,,dutJog.diSpeed,22,2,24,4,);
L(1,2,4,2);
L(6,2,16,2);
L(1,0,1,4);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_CONTACT,,bActivateJog,4,1,6,3,);
B(B_VARIN,,dutJog,14,2,16,4,);
B(B_VARIN,,0,14,3,16,5,);
B(B_F,F172_PulseOutput_Jog!,Instance,16,0,29,5,,?DEN?Ds_dutDataTable?Hn_iPulseOutputChannel?AENO);
L(1,2,4,2);
L(6,2,16,2);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

 (bActivateJog) then
  dutJog.diSpeed:=diSpeed;
END_IF;
IF (bActivateJog) then
  F172_PulseOutput_Jog(s_dutDataTable := dutJog, 0);
END_IF;

Modified on: 2022-03-02Feedback on this pagePanasonic hotline