bunch of noob questions

More
11 Jul 2016 03:49 #77277 by Reinhard
Hello,

i'm building a low cost gantry router with 4th-Axis and I have CL-Steppers from LiChuan. They have Step/Dir-Interface and encoder with 1000 lines/turn. I will setup the drivers for 1/5 Microstep, which results in 5000 Steps/turn. I'd like to test 1/10 Microstep too, but I suspect, that only losses will be increased.

The order of my goals is precision over smoothness and smoothness over speed.

What affordable hardware is recommended to connect the stepper-drivers with pc?
I'd like Ethercat, but I'm quite sure, that it's too expensive. So what is recommended?
Smoothstepper, UC400ETH, Mesacards, others?

I'd like to route the encoder-signals to pc and change the stepper drivers to faster ones (the lichuans are limited to 200kHz interface speed).
Is that possible with linuxcnc?
What is the fastest encoder resolution, that linuxcnc supports?
Which hardware is necessary for that?

I have an evalboard for stm32 with ethernet. I'd like to try that as controller board.
Which parts of linuxcnc do I have to port into firmware to enable the game?
Are there any tutorials, that iluminate the trail?

kind regards

Reinhard

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

More
11 Jul 2016 10:31 #77281 by andypugh
Replied by andypugh on topic bunch of noob questions

What affordable hardware is recommended to connect the stepper-drivers with pc?
I'd like Ethercat, but I'm quite sure, that it's too expensive. So what is recommended?
Smoothstepper, UC400ETH, Mesacards, others?

I believe that the Smoothstepper works well, but I have no experience with it, and it doesn't work with LinuxCNC. The ethernet version could probably be made to, with different firmware.
The UC400ETH looks like it might be able to work with LinuxCNC, but as far as I know there is no driver.
Reading between the lines, it sounds like you want to use an Ethernet connection?
The closest equivalent of the UC400ETH that I can see is the Mesa 7i92 . There are three versions, and I don't know what the differences are.
The 7i92 is likely to need a breakout board, so at that point the Mesa 7i76E might be a more sensible choice as it is Ethernet motion controller and breakout board in-one.

If you have an EPP parallel port available then the Pico USC might be worth a look.

If you have a PCI or PCIe port available then the Mesa 5i25 / 7i76 combo is very popular.

What is the fastest encoder resolution, that linuxcnc supports?

All Mesa cards (that support encoder counting) can count encoders at a few MHz. The Pico USC can count as 250kHz.

I have an evalboard for stm32 with ethernet. I'd like to try that as controller board.
Which parts of linuxcnc do I have to port into firmware to enable the game?


if you want a working CNC machine then I suggest buying one of the boards above which has an existing driver and sample configurations.

If you want a project, then the Pluto Stepper driver is a good example of a simple external step generator. it is EPP interfaced, but the principles are the same. The driver is written in the .comp preprocessing language , which makes things rather simpler. (note that much of that file is documentation)
The following user(s) said Thank You: tommylight, Reinhard

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

More
11 Jul 2016 11:11 #77282 by Reinhard
Replied by Reinhard on topic bunch of noob questions
Hi Andy,

thank you for your attention!

it (SS) doesn't work with LinuxCNC.

Thanks for that hint. So then SS is no option for me.

The UC400ETH looks like it might be able to work with LinuxCNC, but as far as I know there is no driver.

Hm, may be I'm confused. I thought LiChuan is a driver.
So if UC400ETH works with linuxcnc, what is the job of a driver?
Doesn't the UC400ETH create the step/dir-pulses? - if so, than LiChuan is a driver (a CL-driver with step/dir interface).

If you have an EPP parallel port available

No - and I'd like to avoid that option.

All Mesa cards (that support encoder counting) can count encoders at a few MHz. The Pico USC can count as 250kHz.

Ok, so then Pico USC is out of the game.
With 1/5 microstepp the max step/dir-frequency is 200kHz so the encoder-signals are at least at that speed.
... and as I'd like to go ahead towards 1/10 microstep, encoder-frequency will be far beyond 250kHz.

If you want a project, then the Pluto Stepper driver is a good example of a simple external step generator.

I'm at the very beginning of building the router - probabely takes time until end of the year, so I'm interested in a project too. So thanks a lot for that starting point.
But may be, I buy a mesa-card anyway. Sounds reasonable together with encoder reading.

Is there some more documentation available for the Pluto-use-case?
If I wonna go towards Ethernet, which is the counterpart of the Pluto-Driver?
I guess, the PC will always be the master, so I have to define a ethernet-send/read frequency

Where in the chain is the Pluto located and what is the interface of it?

Is there another sample. that puts pc-interface right after the sequencing logic?

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

More
11 Jul 2016 11:19 #77284 by andypugh
Replied by andypugh on topic bunch of noob questions

The UC400ETH looks like it might be able to work with LinuxCNC, but as far as I know there is no driver.

Hm, may be I'm confused. I thought LiChuan is a driver.


Two different things with the same name...

I was referring to a software driver, the interface between LinuxCNC and the hardware, rather than a motor drive.

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

More
11 Jul 2016 11:28 #77285 by andypugh
Replied by andypugh on topic bunch of noob questions

Is there some more documentation available for the Pluto-use-case?


We don't actually recommend the Pluto boards any more, they never worked very well. But they are a good example of a simple software driver of the type you will need.

linuxcnc.org/docs/2.7/html/drivers/pluto-p.html is the manual page, but very little of that would be relevant.

LinuxCNC works best with relatively dumb hardware. All the clever stuff like path-blending and acceleration limiting is done in the PC, the external hardware will normally just read a new step-rate every 1mS and write back the steps-made count and possibly the encoder counts.
The LinuxCNC step-generator components take a now position command every 1mS, calculate needed steps, and attempt to make them.

Interestingly it has been found that the Mesa stepgens are more jitter-tolerant in velocity mode, with a PID component in LinuxCNC HAL calculating the required step rate (sent as a linear velocity)
The following user(s) said Thank You: tommylight

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

More
11 Jul 2016 14:00 #77294 by tommylight
Replied by tommylight on topic bunch of noob questions
Not related to the post but i have to explain:
I just "thank you" Andy twice, as i read the posts and i admire his way of detailed and coherent explanations, something i lack, i tend to skip a lot.
Thanks, again
Tom

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

More
11 Jul 2016 14:41 - 11 Jul 2016 15:01 #77296 by Reinhard
Replied by Reinhard on topic bunch of noob questions

Two different things with the same name...
I was referring to a software driver, the interface between LinuxCNC and the hardware, rather than a motor drive.

Ah - I see!
So the driver is the firmware, that handles protocol and generates the steps?

Ok, I'm not capable to write a firmware for an UC400ETH - but may be, I could do it for the stm32?

The LinuxCNC step-generator components take a now position command every 1mS, calculate needed steps, and attempt to make them.

Ok, one command every 1ms is pretty slow. Combined with a decent record size, any interface I know, can handle that speed.
Does the Pluto work that way? or does it work after step generation?
I guess, with EPP-interface step-generator works at PC-side.

So having step-generator at firmware-side is the way, I'd like to go for.
That could work using USB and should as well work for a slow ethernet-connection.
When the step-generator works in firmware on the controller-side, than I guess, there's no need to bother PC-interface with encoder-signals. The controller could handle it already.
Probabely some extra code will be needed to synchronize gantry-steppers, but should be possible anyway.

OK, I found the Pluto-parts in repository. So the comp-file is the PC-part and the firmware is what it is named.
Have to dive into it.
Last edit: 11 Jul 2016 15:01 by Reinhard.

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

More
11 Jul 2016 15:01 - 11 Jul 2016 15:02 #77297 by andypugh
Replied by andypugh on topic bunch of noob questions

So the driver is the firmware, that handles protocol and generates the steps?

No, in this case the driver is the LinuxCNC HAL code that takes position updates from axis.0.motor-position-cmd and converts that into the data packets sent to the FPGA or similar external hardware.
If you look at the Pluto drive .comp file you will see that it creates HAL pins called (for example) stepgen.0.position-cmd (pin in float stepgen.#.position-cmd[4];)
The values passed-in to the code from that HAL pin are converted to stepper counts and output to the EPP port using port read/write commands. (It might not be so clear, the ,comp file uses write16() which is part of pluto_common.h which includes EPP_WRITE (and friends) from rtapi_parport.h
None of this parport stuff matters much to you, but you might be able to use the read/write functions from hm2_eth

That could work using USB and should as well work for a slow ethernet-connection.


USB is unlikely to work. The USB specs allow multiple-mS response latencies.
Last edit: 11 Jul 2016 15:02 by andypugh.
The following user(s) said Thank You: Reinhard

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

More
11 Jul 2016 15:05 #77298 by Reinhard
Replied by Reinhard on topic bunch of noob questions
Hej Andy,

thanks again! You're much faster in writing, than me with reading :blink:
I guess, I found a path. Will have closer look at hm2_eth too.

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

Time to create page: 0.172 seconds
Powered by Kunena Forum