Laser PWM und entsprechend.hal verändern

More
4 years 8 months ago - 4 years 8 months ago #234957 by PCW
The enable is controlled here:

net halui.program.is-running => hm2_7i76e.0.pwmgen.00.enable

"laser_pwm motion.analog-out-00 => hm2_7i76e.0.pwmgen.00.enable"

 is illegal because you are linking two pins of different types (a float to a bit)

If you want to control the PWM enable via gcode, you would use M62..M65 and the digital output hal pins
(which are of type "bit")
 
Last edit: 4 years 8 months ago by PCW.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #234969 by tracer
Replied by tracer on topic Laser PWM und entsprechend.hal verändern
Ah ok.
in the forum i always read to use M67 GCode for PWM control for Laser.
Little bit confusing.
but if i want to control the value of laser intensity i do need the float value. Bit just got on and off or 0 and full power
Last edit: 4 years 8 months ago by tracer.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #234973 by PCW
M67 _is_ used for setting the PWM value:

net laser_pwm motion.analog-out-00 => hm2_7i76e.0.pwmgen.00.value

but its not appropriate for controlling the PWM enable.
Last edit: 4 years 8 months ago by PCW.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #234981 by tracer
Replied by tracer on topic Laser PWM und entsprechend.hal verändern
So if in understood i need both GCode  M62 with bit an M67 with float
m62 switch enable => laser on
M67 Q100 => power up laser to 100% by using pwmgen.00.value

this means in my case:
net 
net laser_pwm motion.analog-out-00 => hm2_7i76e.0.pwmgen.00.value   ->GCode M67 float
net halui.program.is-running => hm2_7i76e.0.pwmgen.00.enable ->GCode M62

But how is linuxcnc knowing , that halui.program.is-running means GCode M62?
And how to net the value and enable to the real connector on the Mesa? 

TB3 Pin 3 Step+ ->PWM Enable
TB3 Pin 5 Dir+ PWM Value



 
Last edit: 4 years 8 months ago by tracer.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #235075 by tracer
Replied by tracer on topic Laser PWM und entsprechend.hal verändern
Hello PCW again,

If i start the Linuxcnc Program i get an error message

./CNC_Neu.hal:38: Signal name 'halui.program.is-running' must not be the same as a pin.  Did you omit the signal name?


An if i do # this line and Linux cnc starts, i go to halt Configuration to show the pin pwmgen and tries to work with M67 ord M62 but get other error Messages, see Screenshot
Can you please help me with this?






 
Attachments:
Last edit: 4 years 8 months ago by tracer.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #235084 by PCW
If you want the PWM enable to be controlled by a M62 etc command,
you would do something like:

net laser_pwm motion.analog-out-00 => hm2_7i76e.0.pwmgen.00.value
net laser_pwm_enable motion.digital-out-00 => hm2_7i76e.0.pwmgen.00.enable

And yes, the halui line is missing the signal name, but it was designed to
simply enable PWM when the program is running.
 If you want to do this, this line  would be appropriate:

net laser_pwm_enable halui.program.is-running => hm2_7i76e.0.pwmgen.00.enable

Note that this will fail if the pin: halui.program.is-running is already connected
to another signal

Also these statements should be removed:

loadrt pwmgen output_type=1
addf pwmgen.update servo-thread
addf pwmgen.make-pulses servo-thread

Since you are not using software PWM.
Last edit: 4 years 8 months ago by PCW. Reason: copy-paste error

Please Log in or Create an account to join the conversation.

Moderators: Muecke
Time to create page: 2.257 seconds
Powered by Kunena Forum