Laser PWM und entsprechend.hal verändern

More
15 Feb 2022 16:55 #234953 by PCW
Its connected in this line:

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

(the deleted lines are invalid)

There is no PWM pin connection involved, that's done in the firmware
The following user(s) said Thank You: tracer

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

More
15 Feb 2022 17:13 #234956 by tracer
Ok understood that.But another maybe stupid question.

M67 ist to enable the analog-out-00 but how to link the Q  value to the pwm.value for Laser intensity?
is it automaticly linked when i write the M67 to enable? laser_pwm motion.analog-out-00 => hm2_7i76e.0.pwmgen.00.enable

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

More
15 Feb 2022 17:30 - 15 Feb 2022 17:35 #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: 15 Feb 2022 17:35 by PCW.

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

More
15 Feb 2022 18:48 - 15 Feb 2022 18:50 #234969 by tracer
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: 15 Feb 2022 18:50 by tracer.

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

More
15 Feb 2022 19:31 - 15 Feb 2022 19:31 #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: 15 Feb 2022 19:31 by PCW.

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

More
15 Feb 2022 21:18 - 16 Feb 2022 06:12 #234981 by tracer
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: 16 Feb 2022 06:12 by tracer.

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

More
16 Feb 2022 20:23 - 16 Feb 2022 20:32 #235075 by tracer
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: 16 Feb 2022 20:32 by tracer.

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

More
16 Feb 2022 21:48 - 16 Feb 2022 21:58 #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: 16 Feb 2022 21:58 by PCW. Reason: copy-paste error

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

More
17 Feb 2022 17:17 - 17 Feb 2022 20:32 #235148 by tracer
Hello PCW,

step by step im coming forward.
in the Hal Config by running the programm the laser_pwn_enable is turning on.

MANY MANY THX to you!!!

I was running the GCode from  FRankenlab and also the Laser_PWM_value is changing by the value in GCode Q150 or Q0,2
But i get no PWM Signal at the wirng to the laser.
I connected the Signal PWM wire to TB3 Pin3 and TB3 Pin 5 on the Mesa 7i76e

forum.linuxcnc.org/42-deutsch/44933-lase...aendern?start=0#none

What am i doing wrong?

EDIT
Found the Mistake. I havent hared the Ground from LAser Power Supply to MESA GND:
Now its working. Many Thx to you PCW!!!!!
 
Attachments:
Last edit: 17 Feb 2022 20:32 by tracer.

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

More
17 Feb 2022 22:52 #235192 by tracer
I have one issue. If the Laser is in Idle Power 0 and i close Linuxcnc, the Laser goes Full power. Maybe the Mesa card switches. 

HOw is it possible to chance this?

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

Time to create page: 0.103 seconds
Powered by Kunena Forum