The high-speed counter and pulse output instructions can be used with the following FP Series PLCs: FP0, FP-e, FPS, FP-X, FP0R.
FP-X, Relay types: The pulse output function is only available if the pulse I/O cassette (AFPX-PLS) has been installed.
Use the high-speed counter instructions to count input pulses from sensors or encoders, and to turn outputs to TRUE or FALSE once a specified target value has been reached.
When used with a motor driver, the pulse output instructions enable typical positioning operations such as trapezoidal control, home return, and JOG operation.
The number of channels for the built-in high-speed counter and for pulse output, the counting range, the input and output numbers, as well as performance specifications differ depending on the PLC type. For details, please refer to the corresponding hardware manual.
When using a high-speed counter instruction: Select the high-speed counter input for the desired channel in the system registers.
The position control mode is specified by means of the variables used with the positioning command.
The pulse output method is specified by means of the variables used with the positioning command.
CW/CCW
Control is carried out using two pulses: a positive or clockwise rotation pulse (CW) and a negative or counterclockwise rotation pulse (CCW pulse).
Pulse/direction
Forward FALSE
In this mode, forward rotation is carried out when the rotation direction signal is FALSE.
Forward TRUE
In this mode, forward rotation is carried out when the rotation direction signal is TRUE.
Control codes are used to perform special counter operations.
When programming with F instructions:
Use a MOVE instruction to write or read the control code to or from the special data register reserved for this code (DT90052 or DT9052, depending on the PLC type).The special data register where the high-speed counter and pulse output control code are stored can be accessed with the system variable sys_wHscOrPulseControlCode.
When programming with tool instructions:
Use universal high-speed counter control instructions and pulse output control instructions which apply to all PLC types to make control code settings. Use the high-speed counter information instructions and pulse output information instructions to monitor control code settings.
The elapsed value is stored as a double word in the special data registers.
When programming with F instructions:
Access the special data registers using the system variable sys_diHscChannelxElapsedValue (where x=channel number).
The channel number is an input parameter of the high-speed counter or pulse output instruction. Most of the other parameters, e.g. speed and target value, can be specified using predefined DUTs. These DUTs can be found in the FP Library.
When programming with tool instructions:
Use universal high-speed counter information and control instructions and pulse information and control instructions which apply to all PLC types to read and write the elapsed value.
The channel number and control code settings, e.g. CW/CCW, absolute or relative value control, or duty ratio are specified in a channel configuration DUT common to all PLC types. Other parameters, e.g. speed and target value can be applied directly to the instruction.
The high-speed counter and pulse output status is stored in special internal flags. To access the special internal flags, use the PLC-independent system variables.
When a high-speed counter instruction is executed, the high-speed counter control flag (e.g. sys_bIsHscChannel0ControlActive) for the channel used turns to TRUE. No other high-speed counter instruction using the same channel can be executed as long as the control flag is TRUE.
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.
FP-X, FP0R:
The high-speed counter control flag (e.g. sys_bIsHscChannel0ControlActive) and the pulse output control flag (e.g. sys_bIsPulseChannel0Active) are assigned to different special internal flags.
FP-Sigma, FP0, FP-e:
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. 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.
To access special data registers and special internal flags, use the PLC-independent system variables.
We strongly recommend that you incorporate a forced stop option in your positioning program.