Hello Guest it is December 05, 2024, 12:04:16 PM

Author Topic: Spindle PWM output - Brain Editor  (Read 5181 times)

0 Members and 1 Guest are viewing this topic.

Offline Marce

*
  •  10 10
Spindle PWM output - Brain Editor
« on: July 14, 2020, 09:10:51 PM »
I need to send the speed signal from the spindle to an arduino uno to control the intensity of a laser or spindle if required. Through the Modbus protocol. As arduino pwm signal this should have a resolution of 0-255. I also require enabling an output pin on arduino to enable a relay with the M03 command and disable with M05. Unfortunately I am not an expert programmer of Brain. Which has led me to many failed attempts. So I ask for your help. In the modbus tester stage. Everything works very well for me. But in Brain something does not work well. In the attached brain photo. You can see that the DRO  169-CMD Spindle RPM acquires the value of spindle speed.  But it never leads out. In this out is the modbus register that I need to load to control the PWM signal. It is also required that when you turn off the spindle the speed signal turns off which is not currently the case.

I hope someone can help me please.