mycnc:independent_pulse_generator
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mycnc:independent_pulse_generator [2019/10/04 09:36] – ivan | mycnc:independent_pulse_generator [2022/02/11 15:45] (current) – ivan | ||
---|---|---|---|
Line 6: | Line 6: | ||
< | < | ||
Independent Pulse Generator was added to firmware dated July 20, 2018. | Independent Pulse Generator was added to firmware dated July 20, 2018. | ||
- | At the moment the firmware is available as the | ||
- | " | ||
</ | </ | ||
Line 23: | Line 21: | ||
- | Originally the Pulse generator was supposed | + | Originally the Pulse generator was meant to be used as Coolant control. |
Global register GVAR_PLC_COOLANT_STATE (#7372) is used to detect the Current State of the Pulse generator. | Global register GVAR_PLC_COOLANT_STATE (#7372) is used to detect the Current State of the Pulse generator. | ||
Line 37: | Line 35: | ||
Global variable registers can be written in either Hardware or Software PLC. | Global variable registers can be written in either Hardware or Software PLC. | ||
- | < | + | < |
- | A: Internal frequency | + | A: Internal frequency |
- | to set up the ratio and has the Frequency value in a unit usable for a user. | + | to set up the ratio and has the Frequency value in a unit that would be usable for a user. |
- | Depends | + | Depending |
- | It can be [1Hz] if you need a simple frequency generator, | + | It may be [1Hz] if you need a simple frequency generator, |
or [ml/hour] for Coolant control | or [ml/hour] for Coolant control | ||
or [rpm] for Spindle speed through pulse-dir servo controller. | or [rpm] for Spindle speed through pulse-dir servo controller. | ||
Line 51: | Line 49: | ||
The first application we used the Pulse Generator was a Coolant control base on a stepper driver. | The first application we used the Pulse Generator was a Coolant control base on a stepper driver. | ||
- | |||
- | |||
- | === Pulse Generator settings in User Widget === | ||
- | We added Pulse generator settings to a User Widget of " | ||
- | |||
- | |||
- | {{mycnc: | ||
- | |||
- | The programming of Pulse the Coolant widget is shown below. | ||
- | |||
- | " | ||
- | |||
- | <code XML> | ||
- | < | ||
- | | ||
- | | ||
- | |||
- | < | ||
- | </ | ||
- | | ||
- | The lines contain " | ||
- | |||
- | " | ||
- | |||
- | <code XML user-coolant.xml> | ||
- | < | ||
- | <gitem where=" | ||
- | | ||
- | | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | |||
- | <gitem where=" | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | < | ||
- | < | ||
- | </ | ||
- | |||
- | <gitem where=" | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | < | ||
- | < | ||
- | </ | ||
- | |||
- | </ | ||
- | </ | ||
- | |||
- | The code contains 3 parts | ||
- | * the widget label set up | ||
- | * the frequency setup | ||
- | * the Ratio set up | ||
- | |||
- | It's supposed operator no need to change frequency acceleration and this setting is hidden from an operator. | ||
- | The acceleration can be set up in the Software or Hardware PLC for example. | ||
- | |||
=== Pulse Generator settings in the Software PLC === | === Pulse Generator settings in the Software PLC === | ||
- | The rate, ratio and acceleration can be set up in the Software PLC as well. | + | The rate, ratio and acceleration can be set up in the Software PLC, as well as in the User Settings widget (the Step-Dir Coolant Control section). |
- | " | + | " |
<code C HANDLER_INIT.plc> | <code C HANDLER_INIT.plc> | ||
Line 134: | Line 69: | ||
- | ==== (Coolant) Pulse Generator control through Hardware PLC ==== | + | ==== MQL (Coolant) Pulse Generator control through Hardware PLC ==== |
- | Function coolant_motor_start() is addaed | + | Function |
<code C mill-func.h> | <code C mill-func.h> | ||
Line 155: | Line 90: | ||
</ | </ | ||
- | M08.plc procedure which starts the coolant motor would be | + | '' |
<code C M08.plc> | <code C M08.plc> | ||
Line 171: | Line 106: | ||
- | A procedure M09.plc to stop a coolant motor is simpler. Just need to write " | + | A procedure |
<code C M09.plc> | <code C M09.plc> | ||
Line 240: | Line 175: | ||
<code C> | <code C> | ||
// Send generator frequency value | // Send generator frequency value | ||
- | gvarset (8130.0); timer = 30; do {timer -;} while (timer> 0); // Delay for 30ms | + | gvarset(8130,0); timer = 30; do {timer -;} while (timer> 0); // Delay for 30ms |
exit (99); // normal exit | exit (99); // normal exit | ||
</ | </ | ||
Line 379: | Line 314: | ||
* stepper motor based coolant system. | * stepper motor based coolant system. | ||
+ | |||
+ | ==== Additional Notes ==== | ||
+ | |||
+ | ++++ Synchronization | | ||
+ | |||
+ | When using the spindle as a rotary B/C axis, synchronization will be performed automatically, | ||
+ | |||
+ | ++++ | ||
mycnc/independent_pulse_generator.1570196182.txt.gz · Last modified: 2019/10/04 09:36 by ivan