Analog Output M68 on Mesa 7C80

More
09 Jun 2022 09:20 #244796 by luki
Analog Output M68 on Mesa 7C80 was created by luki
Dear Community,

I have a Mesa 7c80 with RPi4 and I want to output an Analog Signal from GCode

My Mesa Card has a digital potentiometer on board. So I will hook +5V to Spindle+ and GND to Spindle- 
My plan is to control the voltage coming out from Spindle Out.

What do I have to configure in INI and HAL to control that digital potentiometer by M68 in GCode ?

I added something like: 

motion.analog-out-00 => hm2_7c80.0.pwmgen.00.value
but LinuxCNC won't accept that. What am I doing wrong?

Thanks
 

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

More
09 Jun 2022 11:09 #244798 by luki
Replied by luki on topic Analog Output M68 on Mesa 7C80
Ok. I think it works now...
what I did: 

setp [HMOT](CARD0).pwmgen.00.enable 1                                 Enables the PWM-Generator (Important!)
setp [HMOT](CARD0).pwmgen.00.scale 200                               Sets the scale to 200
setp [HMOT](CARD0).pwmgen.00.out0.invert_output 1               Inverts the output

net XXX motion.analog-out-00 => [HMOT](CARD0).pwmgen.00.value      XXX can be anything

As a remainder: So I hooked up +5V to Spindle+ and GND to Spindle- 

Now when I write GCode:
M68 E0 Q200        spindleOut will be 5 Volts 
and with 
M68 E0 Q100         spindleOut will be 2,5 Volts 

Hope this helps anyone.

 
The following user(s) said Thank You: andypugh, rdtsc

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

Time to create page: 0.046 seconds
Powered by Kunena Forum