Is it possible to contorl Drivers with analog inputs?

More
26 Jul 2017 07:05 #96447 by aleksamc
Hi all. We have old CNC machine and it's software is very old. I would like to change controlling software. I use linuxCNC as basic for stepper motors.

But in this old CNC machine is used Servomotor drivers with analog inputs.
Does it possible to control them with linuxCNC?
If Yes, then what methodology I should use?
I heared about LinuxCNC EtherCAT, if it possible to connect I/O modules to LinuxCNC how to convert impulse output to analog?

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

More
26 Jul 2017 12:36 #96463 by Todd Zuercher
For controlling old analog servos one of the simplest hardware options is a Mesa 5i25/7i77 combination.

But before you commit to that hardware, you should confirm what kind(s) of feedback your system uses. The 7i77 needs to have feedback from incremental (quadrature) encoders.

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

More
26 Jul 2017 14:02 #96467 by aleksamc
Thanks Todd for your answer. Encoders is easy to setup.
How Can I configure analog output of speed instead of pulse?

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

More
26 Jul 2017 14:13 #96470 by andypugh

Thanks Todd for your answer. Encoders is easy to setup.
How Can I configure analog output of speed instead of pulse?


Typically you use a PWM and a filter. However it is not trivial to do this with just a parallel port, and so most people use dedicated hardware.
The Mesa 7i77 is a popular way to do this, and when the driver is loaded you have HAL pins called things like hm2_5i25.0.7i77.0.0.analogout-00. If you pass a value to that pin, you get that voltage out at the terminals on the board.
There are many other options, including Pico, Motenc, General Mechatonics...
wiki.linuxcnc.org/cgi-bin/wiki.pl?LinuxCNC_Supported_Hardware

Analogue voltage velocity commands do not allow direct control of machine position, so there will always be a PID component for each axis running in HAL.
axis-position-cmd -> PID-command -> velocity-command-as-voltage
axis-position-feedback<-PID-feedback<-encoder

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

More
26 Jul 2017 14:21 #96472 by Todd Zuercher
The Mesa cards handle the digital to analog conversion, and the 7i77 card connects directly to the analog controls of the drive. Setting up Linuxcnc to do it is easiestly done using the PNCconf wizard for configuring Mesa hardware. Think of it as Stepconfig for Mesa hardware.

The basic overly simplified description of how it works is Linuxcnc sends a position command to a PID loop (Hal PID component). The PID recieves that commanded position and compares it to the feedback position from the encoders, and then uses that info to to generate a velocity command that becomes the analog signal to the drive. This all happens very very fast (updated once/servo thread cycle), and in a well tuned system, can keep the following error within just a few encoder counts.

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

More
29 Jul 2017 19:58 #96656 by aleksamc
Thanks to all guys, that give me vector to move. I've found such nice topic with your help.

www.gnipsel.com/linuxcnc/configs/7i77.html

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

Time to create page: 0.225 seconds
Powered by Kunena Forum