How to invert 0-10V output/
06 Feb 2023 16:23 #263843
by Jur4S
How to invert 0-10V output/ was created by Jur4S
Hi Im new to linuxcnc and have no idea about .ini and .hal yet. I'm using my CNC for laser engraving. And it was working fine on wood but when I switch to granite it seems powerless so I start measurements and noticed by using a PWM pin laser working only on 600mA(should be 1.8A) on 100% PWM. I can't figure out how to get full power from PWM so I change to 0-10V pins and it's working well now but my problem is when I use M68 E0 Q1 it's 0V and M68 E0 Q0 is 10V. How to invert it?
I will try to attach my config files because I was using "Marco Reps" youtube tutorial because setting laser power by S* was to slow.
I will try to attach my config files because I was using "Marco Reps" youtube tutorial because setting laser power by S* was to slow.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19202
- Thank you received: 6436
06 Feb 2023 16:30 #263845
by tommylight
Replied by tommylight on topic How to invert 0-10V output/
In your custom.hal add
setp parport.0.pin-01-out-invert TRUE
so
net analogout motion.analog-out-00 => pwmgen.0.value
net laserpwm pwmgen.0.pwm => parport.0.pin-01-out
looks like
net analogout motion.analog-out-00 => pwmgen.0.value
setp parport.0.pin-01-out-invert 1
net laserpwm pwmgen.0.pwm => parport.0.pin-01-out
setp parport.0.pin-01-out-invert TRUE
so
net analogout motion.analog-out-00 => pwmgen.0.value
net laserpwm pwmgen.0.pwm => parport.0.pin-01-out
looks like
net analogout motion.analog-out-00 => pwmgen.0.value
setp parport.0.pin-01-out-invert 1
net laserpwm pwmgen.0.pwm => parport.0.pin-01-out
The following user(s) said Thank You: Jur4S
Please Log in or Create an account to join the conversation.
06 Feb 2023 16:43 #263847
by Jur4S
Replied by Jur4S on topic How to invert 0-10V output/
It's working perfectly now. I saw this phrase before but without any idea where to put it and which pin number.
Do you know if the 0-10V output is any "slower" than PWM if I need it to rapidly change the power of my laser? I want to know if I should start figuring out why PWM not giving full power or if I can just forget.
Thanks again.
Do you know if the 0-10V output is any "slower" than PWM if I need it to rapidly change the power of my laser? I want to know if I should start figuring out why PWM not giving full power or if I can just forget.
Thanks again.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19202
- Thank you received: 6436
06 Feb 2023 16:48 #263848
by tommylight
Replied by tommylight on topic How to invert 0-10V output/
Check at what rate of the PWM your laser can reliably work first.
I would venture a guess that 1-5KHz should work in most cases, but i have seen ones that require lower and/or higher rates.
I would venture a guess that 1-5KHz should work in most cases, but i have seen ones that require lower and/or higher rates.
The following user(s) said Thank You: Jur4S
Please Log in or Create an account to join the conversation.
06 Feb 2023 17:13 #263852
by Jur4S
Replied by Jur4S on topic How to invert 0-10V output/
Could I ask you where I can manipulate my PWM freq? When I'm looking for a solution on google I see people have command in .ini but i don't see same command in my .ini
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19202
- Thank you received: 6436
06 Feb 2023 17:52 #263854
by tommylight
Replied by tommylight on topic How to invert 0-10V output/
linuxcnc.org/docs/html/man/man9/pwmgen.9.html
Near the end, pwmgen.N.pwm-freq
Near the end, pwmgen.N.pwm-freq
The following user(s) said Thank You: Jur4S
Please Log in or Create an account to join the conversation.
06 Feb 2023 17:52 #263855
by chris@cnc
Replied by chris@cnc on topic How to invert 0-10V output/
This is set in hal file example like this :
setp hm2_7i76e.0.pwmgen.pwm_frequency 15000
The following user(s) said Thank You: tommylight, Jur4S
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds