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.
Input
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
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
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: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):
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)
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.
We strongly recommend that you incorporate a forced stop option in your positioning program.
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:
Pulse output characteristics
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.
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.
Changing the target speed during pulse output
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.
We strongly recommend that you incorporate a forced stop option in your positioning program.
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
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
(bActivateJog) then
dutJog.diSpeed:=diSpeed;
END_IF;
IF (bActivateJog) then
F172_PulseOutput_Jog(s_dutDataTable := dutJog, 0);
END_IF;