Can you please clarify which product you are referring to? USB controller or Parallel Breakout Board?
The parallel breakout board. I have redFly with the GreenBull and I'm trying to control the spindle with LinuxCNC. The LinuxCNC spindle page you copy and pasted into my previous question doesn't answer any of the questions I asked. The redFly came without any paper work or documentation so I don't know if it has a DAC card or not. In the StepConf program of LinuxCNC you have examples on your LinuxCNC page of how to control the axes but nothing to control the spindle. Assigning spindle on to pin 14 does nothing.
Typically, we use the relay on the parallel board to turn on the spindle. The RPM is handled by the manual setting on the VFD.
If you need the speed to be handled by LinuxCNC, you will need to use the RS-485 TTL method.
To connect your computer to the VFD, use a USB to RS-485 interface. RS-485 is just a serial interface protocol that uses standard 0 to +5 voltage TTL signal levels for communication (as opposed to RS-232 which uses -12v and +12 for signal level changes).
Get a high quality interface to reduce any issues during the process. The VFD should have two terminals labeled RS+ and RS-. The USB to RS-485 adapter should have this labeled on it as well so the connections should be relatively straight forward.
In the VFD parameters:
PD001: 2 to accept RS485 commands
PD002: 2 to accept frequency comands
PD163: 1 to RS485 slave address:1
PD164: 1 RS485 baud rate 9600
PD165: 3 8bit, no parity, 1 stop bit
Make sure LinuxCNC is also set accordingly:
The PIN14 and PIN16 in the stepconf wizard should be set to unused because you don't want LinuxCNC to be outputting unnecessary signals.
In the options step of the stepconf wizard:
- Check the Include Halui user interface component.
- Check the Include custom PyVCP GUI panel.
- Check Spindle speed display
You will want to edit the custom.hal text file located in the folder that was created from the stepconf wizard. Add these following lines:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw motion.spindle-forward => vfd.spindle-forward
net spindle-ccw motion.spindle-reverse => vfd.spindle-reverse
net on motion.spindle-on => vfd.spindle-on
The dev folder in linux is typically used for interfacing devices and peripherals to the computer as these devices are communicated by simple memory addresses and these files are linked directly to these addresses.
Under the custom_postgui.hal file, change this line:
from: sets spindle-at-speed true
to: net spindle-at-speed => cfd.spindle_at_speed
and add the line:
setp vfd.enable 1
When you start LinuxCNC, you will a spindle section with the reverse and forward buttons, a stop button and - and + buttons. Use these buttons to conform that the spindle is functioning properly. The spindle speed indicator in LinuxCNC will show the spindle speed and you can confirm that this is equal to the speed indicated on the VFD.
Credit for this helpful information goes to:
Additional information was also added by us to provide a better understanding.
Click the link to respond:
Does the DAC card do scaling?