User Tools

Site Tools


mycnc:independent_pulse_generator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mycnc:independent_pulse_generator [2019/10/04 09:36]
ivan
mycnc:independent_pulse_generator [2020/02/20 08:58] (current)
ivan
Line 6: Line 6:
 <​code>​ <​code>​
 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 
-"​Testing"​ version at the "​Support"​ widget. 
 </​code>​ </​code>​
  
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.
  
-<​code>​Q:​ Why the Frequency Ratio need+<​code>​Q:​ Why is the Frequency Ratio needed
-A: Internal frequency ​unit has no sense for a normal user. It is convenient  +A: Internal frequency ​units do not make sense for a normal user. It is convenient  
-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 ​on Frequency generator application the unit might be very different.+Depending ​on the Frequency generator applicationthe unit might be very different.
  
-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 "​1280M5"​ profile. We are going to test it and distribute these settings for other profiles and other applications as well later. 
- 
- 
-{{mycnc:​generator:​mycnc-pulse-coolant-001.png}} 
- 
-The programming of Pulse the Coolant widget is shown below. 
- 
-"​user-m5.xml"​ configuration file contains a code for the User Widget. There are lines to add Coolant widget itself and include a xml file with Coolant widget content 
- 
-<code XML> 
-<​gitem ​ where="​user-widget"​ name="​coolant-widget" ​ 
- ​bgColor="##​b-widget" ​ type="​myitems"​ 
- ​position="​590;​300"​ width="​490"​ height="​150"​ /> 
- 
- <​include>​user-coolant.xml</​include>​ 
-</​code>​ 
-  ​ 
-The lines contain "​coolant-widget"​ definition (a background color, position on the parent widget, a widget size and a widget type (myitems). 
- 
-"​user-coolant.xml code is shown below 
- 
-<code XML user-coolant.xml>​ 
-<​mycnc-configuration version="​1.0">​ 
-<gitem where="​coolant-widget"​ 
- ​position="​0;​0"​ width="​490"​ height="​30"​ labelWidth="​490"​ type="​label" ​ 
- ​labelFgColor="​white"​ labelBgColor="##​f-display"​ labelFontSize="​18"​ labelFontStyle="​bold"​ > 
-  <​message>​Coolant</​message>​ 
-  <​message_ru>​Охлаждение</​message_ru>​ 
-  <​message_vn>​Chất làm mát</​message_vn>​ 
-</​gitem>​ 
- 
-<gitem where="​coolant-widget"​ 
- ​position="​10;​40"​ width="​220"​ height="​60"​ displayWidth="​90"​ labelWidth="​130"​ 
- ​type="​bdisplay"​ action="​item:​cnc-gvariable-8133"​ name="​display-cnc-gvariable-8133"​ 
- ​bgColor="##​b-display"​ fgColor="##​f-display"​ fontSize="​18"​ fontStyle="​bold"​ format="​%5.1f" ​ 
- ​K="​1"​ labelFontSize="​16"​ labelFontStyle="​bold"​ labelFgColor="​white"​ > 
-  <​message>​Rate,​ ml/​hour</​message>​ 
-  <​message_ru>​Расход,​ мл/​час</​message_ru>​ 
-</​gitem>​ 
- 
-<gitem where="​coolant-widget"​ 
- ​position="​280;​40"​ width="​180"​ height="​60"​ displayWidth="​90"​ labelWidth="​90"​ 
- ​type="​bdisplay"​ action="​item:​cnc-gvariable-8132"​ name="​display-cnc-gvariable-8132"​ 
- ​bgColor="##​b-display"​ fgColor="##​f-display"​ fontSize="​14"​ fontStyle="​bold" ​ 
- ​format="​%d"​ K="​1"​ labelFontSize="​16"​ labelFontStyle="​bold"​ labelFgColor="​white"​ > 
-  <​message>​Ratio</​message>​ 
-  <​message_ru>​Коэффициент</​message_ru>​ 
-</​gitem>​ 
- 
-</​screen>​ 
-</​code>​ 
- 
-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 PLCas well as in the User Settings widget (the Step-Dir Coolant Control section)
  
-"​HANDLER_INIT.plc"​ procedure is started just after the configuration is sent to the myCNC controller. A few lines to set the Frequency generator can be added there.+"​HANDLER_INIT.plc"​ procedure is started just after the configuration is sent to the myCNC controller. A few lines to set up the Frequency generator can be added there.
  
 <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 ​to "mill-func.h" include ​file+Function ​''​coolant_motor_start()'' ​is added to the ''​mill-func.h'' ​file
  
 <code C mill-func.h>​ <code C mill-func.h>​
Line 155: Line 90:
 </​code>​ </​code>​
  
-M08.plc procedure which starts the coolant motor would be +''​M08.plc'' ​procedure which starts the coolant motor would be the following (//note the inclusion of mill-func.h at the beginning of the code//):
  
 <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 "​0"​ to the raw frequency register.+A procedure ​''​M09.plc'' ​to stop a coolant motor is simpler ​- we simply ​need to write "​0"​ to the raw frequency register.
  
 <code C M09.plc> <code C M09.plc>
mycnc/independent_pulse_generator.1570196182.txt.gz · Last modified: 2019/10/04 09:36 by ivan