Name :Jog pulse output
Symbol:PTO_JOG
Illustrate:
When the function block is enabled, the control pulse output frequency starts from 0 to accelerate to the target output frequency with a specified acceleration, and maintains the pulse output of the target frequency (when the function block remains enabled), and after the function block is disabled, the deceleration has been specified, and the pulse output is stopped after deceleration to 0, and the function block stops running.
Image:
Parameter:
| Parameter | Statement | IN/OUT | Parameter role | Illustrate | Default value |
|---|---|---|---|---|---|
| OUTPORT | UDINT | IN | Pulse output port | 0-7 | not |
| ENABLE | BOOL | IN | The function block is enabled | TRUE:The function block is enabled;FALSE:Functional block incapacitated | Yes/FALSE |
| FREQ | DINT | IN | Target pulse frequency + direction | 1-200KHz(Positive - Forward Motion; Negative - Backward Motion) 0: Default value runs (loaded when enabled) | Yes/100 |
| ACC | UDINT | IN | Acceleration/deceleration rate:Hz/ms | ACC = 0:No acceleration and deceleration (low-speed joging: if the target frequency > maximum acceleration, the default acceleration rate is used, otherwise there is no acceleration); ACC > 0: there is acceleration and deceleration (high-speed joging) | Yes/100 |
| DONE | BOOL | OUT | The target frequency reaches the mark | TRUE:Target frequency reached; FALSE: Target frequency not reached | Yes/FALSE |
| BUSY | BOOL | OUT | Pulse output status | TRUE:The pulse is in normal output;FALSE:The pulse output stops | Yes/FALSE |
| ERROR | BOOL | OUT | Error flags | TRUE:There was an error with the function block call | Yes/FALSE |
| ERRORID | DINT | OUT | Error codes | 0:Normal, Other: Error code value | Yes/0 |
Error codes:
| Error codes | Illustrate |
|---|---|
| 0 | Inerrancy |
| 1 | Invalid pulse port |
| 2 | The pulse port is busy/pre> |
| 3 | The pulse port is performing a stop action |
| 7 | The frequency exceeds the maximum allowable range |
| 10 | Acceleration exceeds the maximum allowable value |
Example:
LD:
ST:
Interpretation:
OUTPORT IS 0, WHICH MEANS THAT THE OPERATION PORT HAS 0 PULSE OUTPUT; If ENABLE is TRUE, this function block is executed. FREQ is 10000, positive, forward motion, the target pulse frequency is 10000Hz, and the port finally continuously outputs pulses at a rate of 10000Hz to move forward; If ACC is 100, the output pulse frequency will change with an acceleration of 100Hz/ms, and finally accelerate to a frequency of 10,000Hz. If DoneOut is TRUE, it means that the pulse output reaches the target frequency; If BusyOut is TRUE, it means that port 0 is performing JOG pulse output, and if it is FALSE, it means that JOG pulse output has stopped; If ErrorOut is TURE, it means that there is an error in the function block, and the JOG pulse output cannot be executed, and the error code is ErrorIDOut.