CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-12-2009, 09:29 AM
p27182's Avatar  
Join Date: Feb 2007
Location: usa
Posts: 24
p27182 is on a distinguished road
Need some general help understanding what EMC2 is capable of...

Hello-

as the title states, I'm in need of some help understanding the capabilities of emc2. I used emc2 to control a stepper based harbor freight mill that I put together which used the parallel port as the controller<-->driver interface. It worked great, and the stepper control through the parallel port was very simple.

I now have a much bigger mill, a Lagun 2cnc with an anilam controller and wanted to look into how difficult a controller re-fit would be.

My question is as follows- regarding the use of servos with emc2, what inputs and outputs does the emc2 software expect to be used?

I see a lot of people mentioning systems like Mesa electronics or the fpga based pluto board for hardware interfaces between emc2 and the servo drivers, but what exactly are these systems doing? does it vary driver to driver?

Regarding the motors and drivers already on the machine, I'm not even sure of what type of input they take- it seems to be 0-5v analog signals correlated with the rpms- What interfaces would be used to give emc2 the ability to output analog values (or what interface can I expect to carry digital info to a D/A device) ?

what hardware is allowing for the "HAL oscope" on this page:
http://wiki.linuxcnc.org/cgi-bin/emc...rvo_Amplifiers ??

I'm seeing the hardware abstraction layer subject come up qhuite a lot but im falling short of understanding its role in the whole system's process... the wiki page doesnt seem to cover all that much of its capabilities...

someone mind simplifying how HAL is applied for me?
maybe hint at how it might help me get bytes out for analog conversion or something?

thanks for any help!

-pat
Reply With Quote

  #2   Ban this user!
Old 10-14-2009, 11:14 PM
 
Join Date: Mar 2004
Location: St. Louis, MO
Posts: 309
jmelson is on a distinguished road

Originally Posted by p27182 View Post
Hello-

My question is as follows- regarding the use of servos with emc2, what inputs and outputs does the emc2 software expect to be used?
Although you can control some servo drives from the parallel port, just like a stepper system, you can quickly run out of I/O pins, and the ability of the software encoder counter to keep up with encoders will limit your speed.

So, you would normally have encoders feeding position information back to a hardware encoder counter, and an interface device sending the appropriate velocity command to a servo amplifiers of some type. Analog velocity servo amplifiers usually take a +/- 10 V analog velocity command,
PWM-input servo amps take a digital signal where pulse width is proportional to desired velocity, and step/dir servo drives tale signals just like stepper drives.
Regarding the motors and drivers already on the machine, I'm not even sure of what type of input they take- it seems to be 0-5v analog signals correlated with the rpms- What interfaces would be used to give emc2 the ability to output analog values (or what interface can I expect to carry digital info to a D/A device) ?
Most likely is is a signed analog value from -10 V to +10 V, zero volts would command zero velocity. But, some drives do use other ranges and scale factors. Yes, you would need a digital to analog converter to drive the servo amp. My PPMC interface, for instance, has a 16-bit DAC on it for each channel.
what hardware is allowing for the "HAL oscope" on this page:
http://wiki.linuxcnc.org/cgi-bin/emc...rvo_Amplifiers ??
That's my page, so it has some things specific to using my PWM-input servo amps with my Universal PWM Controller board (UPC). But, in general, there are several products from other vendors that do a very similar job. So, the servo amp drives the motor, and the UPC board counts encoder signals and genrates the PWM waveform for the amp. These are the things you need to control the servo motor. Halscope could be seeing essentially the same thing without any hardware at all other than the parallel port, although the encoder count rates would be limited by the software.

HalScope is a SOFTWARE oscilloscope, so it does not require any hardware, by ITSELF, to function. It can grab any HAL signal in the entire EMC2 system and display it in graphical form.
I'm seeing the hardware abstraction layer subject come up qhuite a lot but im falling short of understanding its role in the whole system's process... the wiki page doesnt seem to cover all that much of its capabilities...

someone mind simplifying how HAL is applied for me?
maybe hint at how it might help me get bytes out for analog conversion or something?
HAL is the language that connects many of the parts of EMC2. It connects the motion controller to whatever it is that makes motors move, so that the "upper parts" of EMC can completely ignore the details of how movement is achieved. It also allows a great deal of flexibility in how a machine is structured (although EMC1 had this capability before) so robots, Stewart platforms and Cartesian machine can be set up to be commanded in XYZ positions. It is also used to connect all the auxilliary I/O such as tool changers and special fixture operations from G-codes to hardware. There is quite a bit of detail in the integrators manual, I think.

HAL won't help you "get bytes out for analog conversion" directly. You need a DAC and a driver for EMC2 for that DAC. Easiest is to use one that is already made for the purpose, with a driver already written for EMC2.

Jon
Reply With Quote

  #3  
Old 10-15-2009, 02:04 AM
Community Moderator
 
Join Date: Mar 2004
Location: Sweden
Posts: 1,084
svenakela is on a distinguished road

As Jon says, it's easy to run out of pins. If that's the case you can add another port though.

I think your question is more in the range of "what can be done" instead of what EMC2 is capable of. EMC2 is extremely capable, I use it but I'm just scraping the surface. There are uge production machine retrofits with working tool changers, and robots and plotters, and...
With two things - patience and the will to make it yourself - you can do remarkable things with EMC2. The wiki, the mailing list and the IRC is your guide to the galaxy.

Regards,
Sven
Reply With Quote

  #4   Ban this user!
Old 10-15-2009, 08:49 AM
p27182's Avatar  
Join Date: Feb 2007
Location: usa
Posts: 24
p27182 is on a distinguished road

First of, thanks for the replies, they are much appreciated!

Originally Posted by jmelson View Post
Yes, you would need a digital to analog converter to drive the servo amp. My PPMC interface, for instance, has a 16-bit DAC on it for each channel.
would you mind linking me to this particular interface card/device? This is the info I was looking for! I ultimatley need to know what hardware I have to buy/make and how I can get EMC2 to talk to that hardware. I suppose if it came down to it, I could program my FPGA board I've got to basicallly translate stepper-like-instructions from emc2 into the +/-10v values and also interpret the glass scale and encoders, which wouldnt be too bad a challenege if I can find a simple DAC accesory for the board I have... what do you think? is there an easier way to do it with parts that plug and play almost?

That's my page, so it has some things specific to using my PWM-input servo amps with my Universal PWM Controller board (UPC). But, in general, there are several products from other vendors that do a very similar job. So, the servo amp drives the motor, and the UPC board counts encoder signals and genrates the PWM waveform for the amp. These are the things you need to control the servo motor. Halscope could be seeing essentially the same thing without any hardware at all other than the parallel port, although the encoder count rates would be limited by the software.

HalScope is a SOFTWARE oscilloscope, so it does not require any hardware, by ITSELF, to function. It can grab any HAL signal in the entire EMC2 system and display it in graphical form.
but what was HALscope getting those analog values from? your PPMC int?
forgive my ignorance but what is a "HAL signal"? is it basically just a variable in the EMC2 environment? so it's not necessarily realized physically?

HAL is the language that connects many of the parts of EMC2. It connects the motion controller to whatever it is that makes motors move, so that the "upper parts" of EMC can completely ignore the details of how movement is achieved. It also allows a great deal of flexibility in how a machine is structured (although EMC1 had this capability before) so robots, Stewart platforms and Cartesian machine can be set up to be commanded in XYZ positions. It is also used to connect all the auxilliary I/O such as tool changers and special fixture operations from G-codes to hardware. There is quite a bit of detail in the integrators manual, I think.
I'll certainly be looking into this... THANKS!

HAL won't help you "get bytes out for analog conversion" directly. You need a DAC and a driver for EMC2 for that DAC. Easiest is to use one that is already made for the purpose, with a driver already written for EMC2.

Jon
Ok, so you already kinda answered my other question, but do you know where I can get some information on what kinda options (hardware/driver) wise are available?

Thanks again! your assistance is much appreciated!
-Pat
Reply With Quote

  #5   Ban this user!
Old 10-15-2009, 11:11 AM
 
Join Date: Mar 2004
Location: St. Louis, MO
Posts: 309
jmelson is on a distinguished road

Originally Posted by p27182 View Post
First of, thanks for the replies, they are much appreciated!



would you mind linking me to this particular interface card/device? This is the info I was looking for!
http://pico-systems.com/oscrc4/catal...ex.php?cPath=8

This is a flexible set of boards, but you basically need a motherboard with card cage, and one each DAC, Encoder and DIO to make the basic system. (I didn't include this info in my first message as I didn't want it to come off as a sales pitch.) Stuart Stevenson at MPM in Wichita has these on 3 of his machines there, and I use it on my Bridgeport mill.
I ultimatley need to know what hardware I have to buy/make and how I can get EMC2 to talk to that hardware. I suppose if it came down to it, I could program my FPGA board I've got to basicallly translate stepper-like-instructions from emc2 into the +/-10v values and also interpret the glass scale and encoders, which wouldnt be too bad a challenege if I can find a simple DAC accesory for the board I have... what do you think? is there an easier way to do it with parts that plug and play almost?
Well, the problem with doing all this in an FPGA is how do you tune the servo response? Also, translating the software-generated step pulses with their ragged timing to a finely tuned servo system will result in rough, gravelly motion. Not a good plan at all.

but what was HALscope getting those analog values from? your PPMC int?
Yes, ppmc.0.encoder.00.position is a sign-extended, scaled floating-point representation
of the raw encoder counts from the PPMC interface. ppmc.0.encoder.00.delta is a raw velocity computed from the number of raw encoder counts per servo sample. pid.0.output is from EMC2's PID calculation, and is the command going into the PWM generator.
forgive my ignorance but what is a "HAL signal"? is it basically just a variable in the EMC2 environment? so it's not necessarily realized physically?
Not quite, but close. Not all variables in EMC2 are available to HAL. But, most any related to the external environment, axes, tools, spindles, limits, etc. are made available as HAL "pins". A pin is similar to an electrical terminal on some module. A HAL "signal" is similar to a wire that has one source of signal and can convey that signal to several places. So, HAL "components" perform various functions (hardware interfaces or device drivers, AND, OR, SUM, PID, etc.) and every component has a few input and output pins. Some components like AND just have HAL pins, and affect nothing on the outside. The PPMC device driver component makes the logical connection to the PPMC hardware through the parallel port, and obviously its purpose is to sense and affect something outside the computer.

This is all in the HAL manual at http://www.linuxcnc.org/docs/HAL_User_Manual.pdf

Ok, so you already kinda answered my other question, but do you know where I can get some information on what kinda options (hardware/driver) wise are available?
I have servo amps for use with both brush and brushless motors, and a servo controller to go with those. That is different than the PPMC as it is all digital. But, if your servo amps are in good working order, and you have documentation on what terminal does what, it is best to keep them. A good analog velocity servo gives the smoothest motion. If you DON'T have working servo amps, then you have a wide variety of choices. Some really good (and CHEAP!!) brushless motors are now coming out of China, and I am quite impressed by them. I have been testing out
a few of them with my brushless amp.

Jon
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-15-2009, 12:07 PM
p27182's Avatar  
Join Date: Feb 2007
Location: usa
Posts: 24
p27182 is on a distinguished road

Originally Posted by jmelson View Post
http://pico-systems.com/oscrc4/catal...ex.php?cPath=8

This is a flexible set of boards, but you basically need a motherboard with card cage, and one each DAC, Encoder and DIO to make the basic system. (I didn't include this info in my first message as I didn't want it to come off as a sales pitch.) Stuart Stevenson at MPM in Wichita has these on 3 of his machines there, and I use it on my Bridgeport mill.

Well, the problem with doing all this in an FPGA is how do you tune the servo response? Also, translating the software-generated step pulses with their ragged timing to a finely tuned servo system will result in rough, gravelly motion. Not a good plan at all.

Yes, ppmc.0.encoder.00.position is a sign-extended, scaled floating-point representation
of the raw encoder counts from the PPMC interface. ppmc.0.encoder.00.delta is a raw velocity computed from the number of raw encoder counts per servo sample. pid.0.output is from EMC2's PID calculation, and is the command going into the PWM generator.

Not quite, but close. Not all variables in EMC2 are available to HAL. But, most any related to the external environment, axes, tools, spindles, limits, etc. are made available as HAL "pins". A pin is similar to an electrical terminal on some module. A HAL "signal" is similar to a wire that has one source of signal and can convey that signal to several places. So, HAL "components" perform various functions (hardware interfaces or device drivers, AND, OR, SUM, PID, etc.) and every component has a few input and output pins. Some components like AND just have HAL pins, and affect nothing on the outside. The PPMC device driver component makes the logical connection to the PPMC hardware through the parallel port, and obviously its purpose is to sense and affect something outside the computer.

This is all in the HAL manual at http://www.linuxcnc.org/docs/HAL_User_Manual.pdf


I have servo amps for use with both brush and brushless motors, and a servo controller to go with those. That is different than the PPMC as it is all digital. But, if your servo amps are in good working order, and you have documentation on what terminal does what, it is best to keep them. A good analog velocity servo gives the smoothest motion. If you DON'T have working servo amps, then you have a wide variety of choices. Some really good (and CHEAP!!) brushless motors are now coming out of China, and I am quite impressed by them. I have been testing out
a few of them with my brushless amp.

Jon
wow, that's impressive!

so, I'm about to go diving into the HAL manual and figured I'd ask if you have manuals or datasheets for each product? maybe to read alongside the HAL business? I guess the HAL manual explains the driver subject and whatnot too huh... I'll follow up after lookin into it.

thanks again man!

-pat
Reply With Quote

  #7   Ban this user!
Old 10-15-2009, 12:49 PM
 
Join Date: Oct 2008
Location: USA
Posts: 78
DonnieET is on a distinguished road

I used the Mesa PCI card it is a FPGA and there a driver package for EMC2. Look at the 5I20 with a 7i33 and 7i37 at www.mesanet.com With it you can run 4 axis with encoder feedback and 24 o/i points per 7i37.

Donnie
Reply With Quote

  #8   Ban this user!
Old 10-16-2009, 12:10 PM
 
Join Date: Mar 2004
Location: St. Louis, MO
Posts: 309
jmelson is on a distinguished road

Originally Posted by p27182 View Post
wow, that's impressive!

so, I'm about to go diving into the HAL manual and figured I'd ask if you have manuals or datasheets for each product? maybe to read alongside the HAL business? I guess the HAL manual explains the driver subject and whatnot too huh... I'll follow up after lookin into it.

thanks again man!

-pat
Well, on this page http://jelinux.pico-systems.com/PPMC.html
there are links to each board, and on those pages there are additional
links to pinouts, sample wiring diagrams, etc.

If you need further info, I can whip up a drawing with specific connection info for
your configuration. If I haven't already worked out how to interface the PPMC to
your specific servo amps, I could do that.

Jon
Reply With Quote

  #9   Ban this user!
Old 10-16-2009, 02:58 PM
p27182's Avatar  
Join Date: Feb 2007
Location: usa
Posts: 24
p27182 is on a distinguished road

Originally Posted by jmelson View Post
Well, on this page http://jelinux.pico-systems.com/PPMC.html
there are links to each board, and on those pages there are additional
links to pinouts, sample wiring diagrams, etc.

If you need further info, I can whip up a drawing with specific connection info for
your configuration. If I haven't already worked out how to interface the PPMC to
your specific servo amps, I could do that.

Jon
Jon- you're help is very much appreciated!

I'm currently in the process of acquiring some national instruments daq hardware to figure out what kinda IO and protocols I'll be dealing with, so with this in mind I'll email you asking for general quote on how much your hardware will cost me.

Thanks again
-Pat
Reply With Quote

  #10   Ban this user!
Old 10-18-2009, 09:48 AM
p27182's Avatar  
Join Date: Feb 2007
Location: usa
Posts: 24
p27182 is on a distinguished road
Talking

OK, I've finally managed to finger through the HAL manual, and there's certainly lots of good stuff in there, but I unfortunately didn't really find what I was initially looking for...

let me propose (I'm not sure if my proposal is even feasible) and ask this, if I were to configure emc2/hal to function with external hardware to control 4 servos, monitor 4 encoders, 3 limit switches, control spindle speed etc etc etc,
what would I see going on at the parallel port if i were to hit it with a logic analyzer or o-scope? and how would these parameters of the parallel port be configured? would I need more than one? Where can I find details of the IO config?

Thanks again!
-Pat

edit:
Originally Posted by DonnieET View Post
I used the Mesa PCI card it is a FPGA and there a driver package for EMC2. Look at the 5I20 with a 7i33 and 7i37 at www.mesanet.com With it you can run 4 axis with encoder feedback and 24 o/i points per 7i37.

Donnie
Donnie could you link me to the driver information for the mesa stuff? I'm having more trouble than expected googling for the info.
Thanks!

AHA!

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2

found it.

thx tho.
-pat

Last edited by p27182; 10-18-2009 at 10:55 AM.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 10-18-2009, 02:38 PM
 
Join Date: Nov 2005
Location: Canada
Posts: 465
chester88 is on a distinguished road

It's not very feasible to run servos directly from the parport. What Jon's card and Mesa's parport cards do is use the parport to communicate to the fPGA chip on board.
The FPGA chip does the actual counting of pulses and sending of pwm pulses etc.
So to answer your question if you connected an o-scope to the parport, you would only see the data that is being sent to the FPGA.
HAL is how you configure any I/O of EMC2.
If you are using Jon's card then the PPMC driver is how you configure it.
if using MESA products then most likely the HOSTMOT2 driver.
if using the parport directly (usually for step machines or extra I/O points) then the parport driver is what is used.

Exactly what I/O details do you want to see?
The mesa 5i20 card has 72 points of I/O it is PCI
the mesa 7133 card has 48 points of I/O it is parport
The HOSTMOT driver for these cards can configure them into many different
amounts of encoder counter, pwm generator and general purpose I/O (GPIO).
This talks about HOSTMOT2:
http://www.linuxcnc.org/docs/2.3/htm..._hostmot2.html

John's Pico PWM card is a little different as it's I/O is more specific:
4 encoder counters, 4 pwm generators, 16 GPIO
his PPMC has 4 DAC generators 4 encoder counters and 17 GPIO
Here is the info on the PPMC driver:
http://www.linuxcnc.org/docs/2.3/htm...pico_ppmc.html

All of those cards will control at least 4 servo axis.
Mesa's cards are more flexible, the driver is newer (less proven for odd-ball bugs)
John's cards are less flexible, the driver is older (so more proven)
Each of them have been used by lots of people and are capable.

Here is a link to more I/O hardware known to work:
http://wiki.linuxcnc.org/cgi-bin/emc...orted_Hardware
Reply With Quote

  #12   Ban this user!
Old 10-19-2009, 12:14 AM
 
Join Date: Mar 2004
Location: St. Louis, MO
Posts: 309
jmelson is on a distinguished road

Originally Posted by p27182 View Post
OK, I've finally managed to finger through the HAL manual, and there's certainly lots of good stuff in there, but I unfortunately didn't really find what I was initially looking for...

let me propose (I'm not sure if my proposal is even feasible) and ask this, if I were to configure emc2/hal to function with external hardware to control 4 servos, monitor 4 encoders, 3 limit switches, control spindle speed etc etc etc,
what would I see going on at the parallel port if i were to hit it with a logic analyzer or o-scope? and how would these parameters of the parallel port be configured? would I need more than one? Where can I find details of the IO config?


-pat
OK, assuming you were using the PPMC board set, or the Universal PWM controller (very similar architecture), then every millisecond, the computer would send out an address command, then send a byte to command the encoder counters to latch the counts of all axes into holding registers. It would then send out another address command and then read back 12 bytes of position and 3 bytes of digital I/O status. It is 12 bytes because there are 3 bytes (24 bits) per axis. The computer would calculate a new velocity for each axis and then send out an address command and then write out 16 bytes of velocity info, and then another address and 2 or 3 bytes of digital I/O output info.

As for how to set it up, sample config files are included with EMC2, see the sample-configs directory and look under the ppmc or univpwm
directories.

This would look entirely different with different external hardware, of course.

Jon

Last edited by jmelson; 10-19-2009 at 12:16 AM. Reason: answer another facet of question
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Steel Capable Benchtop Mills 2_many_hobbies Benchtop Machines 59 09-14-2009 11:17 AM
DIY 3 Axis capable of 4A? Curtisbeef Stepper Motors and Drives 2 05-21-2008 01:31 AM
General understanding of more than 3 axis help please! Dongle General CNC (Mill and Lathe) Control Software (NC) 9 02-22-2006 08:45 AM
Assembly line capable milling machine MrRage General Metal Working Machines 6 09-13-2005 07:21 PM
Which Cam Software Is The Most Capable? wild01 General CAM Discussion 13 07-18-2005 04:32 PM




All times are GMT -5. The time now is 05:12 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361