- Posts: 18115
- Thank you received: 5334
Laser PWM und entsprechend.hal verändern
- PCW
- Offline
- Moderator
-
Less
More
4 years 8 months ago - 4 years 8 months ago #234957
by PCW
Replied by PCW on topic Laser PWM und entsprechend.hal verändern
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")
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.
- tracer
- Offline
- Senior Member
-
Less
More
- Posts: 50
- Thank you received: 8
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
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.
- PCW
- Offline
- Moderator
-
Less
More
- Posts: 18115
- Thank you received: 5334
4 years 8 months ago - 4 years 8 months ago #234973
by PCW
Replied by PCW on topic Laser PWM und entsprechend.hal verändern
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.
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.
- tracer
- Offline
- Senior Member
-
Less
More
- Posts: 50
- Thank you received: 8
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
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.
- tracer
- Offline
- Senior Member
-
Less
More
- Posts: 50
- Thank you received: 8
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?
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?
Last edit: 4 years 8 months ago by tracer.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
-
Less
More
- Posts: 18115
- Thank you received: 5334
4 years 8 months ago - 4 years 8 months ago #235084
by PCW
Replied by PCW on topic Laser PWM und entsprechend.hal verändern
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.
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