mycnc:independent_pulse_generator
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mycnc:independent_pulse_generator [2018/09/02 09:54] – skirillov | mycnc:independent_pulse_generator [2018/09/02 11:05] – skirillov | ||
---|---|---|---|
Line 3: | Line 3: | ||
myCNC controllers Axis B can be switched to independent pulse generator output. | myCNC controllers Axis B can be switched to independent pulse generator output. | ||
+ | |||
+ | < | ||
+ | Independent Pulse Generator was added to firmware dated July 20, 2018. | ||
+ | At the moment the firmware is available as the | ||
+ | " | ||
+ | </ | ||
Line 22: | Line 28: | ||
If Generator Frequency register (#8133) is changed - | If Generator Frequency register (#8133) is changed - | ||
* RAW value is calculated and stored in the RAW register #8130 | * RAW value is calculated and stored in the RAW register #8130 | ||
- | * If Coolant Register is NOT zero, the RAW value is sent to the myCNC controller to update current frequency. Changing the RAW register in myCNC controller takes affect | + | * If Coolant Register is NOT zero, the RAW value is sent to the myCNC controller to update current frequency. Changing the RAW register in myCNC controller takes effect |
* If the RAW value is zero, the generator is stopped (with given acceleration). | * If the RAW value is zero, the generator is stopped (with given acceleration). | ||
* If the RAW value is not zero, the generator is started (or current frequency changed accordingly) with given acceleration. | * If the RAW value is not zero, the generator is started (or current frequency changed accordingly) with given acceleration. | ||
Line 65: | Line 71: | ||
</ | </ | ||
| | ||
- | The lines contain " | + | The lines contain " |
+ | " | ||
+ | <code XML user-coolant.xml> | ||
+ | < | ||
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <gitem where=" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | </ | ||
- | === Pulse Generator | + | </ |
+ | </ | ||
+ | |||
+ | 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 | ||
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. | ||
Line 89: | Line 133: | ||
</ | </ | ||
+ | |||
+ | ==== (Coolant) Pulse Generator control through Hardware PLC ==== | ||
+ | |||
+ | Function coolant_motor_start() is addaed to " | ||
+ | |||
+ | <code C mill-func.h> | ||
+ | coolant_motor_start() | ||
+ | { | ||
+ | timer=10; | ||
+ | |||
+ | gvarset(8131, | ||
+ | timer=10; | ||
+ | |||
+ | x=gvarget(8133);// | ||
+ | k=gvarget(8132);// | ||
+ | |||
+ | x=x*k; //calculate the RAW frequency | ||
+ | gvarset(8130, | ||
+ | timer=30; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | M08.plc procedure which starts the coolant motor would be | ||
+ | |||
+ | <code C M08.plc> | ||
+ | #include pins.h | ||
+ | #include mill-func.h | ||
+ | |||
+ | main() | ||
+ | { | ||
+ | gvarset(7372, | ||
+ | portset(OUTPUT_FLOOD); | ||
+ | coolant_motor_start(); | ||
+ | exit(99); | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | |||
+ | A procedure M09.plc to stop a coolant motor is simpler. Just need to write " | ||
+ | |||
+ | <code C M09.plc> | ||
+ | #include pins.h | ||
+ | main() | ||
+ | { | ||
+ | gvarset(7373, | ||
+ | gvarset(7372, | ||
+ | |||
+ | portclr(OUTPUT_FLOOD); | ||
+ | portclr(OUTPUT_MIST); | ||
+ | |||
+ | gvarset(8130, | ||
+ | timer=30; | ||
+ | exit(99); | ||
+ | }; | ||
+ | |||
+ | </ | ||
mycnc/independent_pulse_generator.txt · Last modified: 2022/02/11 15:45 by ivan