Question about creating an PIC interace

More
11 Mar 2016 08:33 #71383 by wicki
Hi *,

I'm using linuxCNC since about 4 months and I'm often working with
Microchip (PIC) controllers.
I would like to hear other peoples opinion about the following scene:

If I create an interface with a PIC-microcontroller, which receives his
commands via usb-bus (similar to gcode) and sends the step/dir-signals
to the motor-drivers - the microcontroller knows the start/accel./vel./stop-ramps
and handles them on his own - and sends back the position-data to HAL

Does such a solution make sense or is it wasted time?


regards

wicki

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

More
11 Mar 2016 13:03 #71392 by Todd Zuercher
What you are describing sounds like a motion controller, and such products already exist one example would be a Smoothstepper used with Mach. Such products are against the basic premise of Linuxcnc (using a PC as the motion controller) and will likely never be supported by it.

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

More
11 Mar 2016 14:22 #71402 by andypugh

Such products are against the basic premise of Linuxcnc (using a PC as the motion controller) and will likely never be supported by it.


Just to be clear, it isn't that the LinuxCNC project "disapprove" of such solutions, it is just that there are already products that do that perfectly well, so there is no reason to perform the significant work required to strip out all the clever bits of LinuxCNC to make it just a front-end for a remote motion controller.

Mach3 had an incentive, the company wanted to sell more Mach3 licenses. The motivations of the LinuxCNC developers are rather more..... complex.

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

More
12 Mar 2016 06:36 - 12 Mar 2016 06:38 #71483 by wicki

Such products are against the basic premise of Linuxcnc (using a PC as the motion controller) and will likely never be supported by it.

Mach3 had an incentive, the company wanted to sell more Mach3 licenses. The motivations of the LinuxCNC developers are rather more..... complex.


Thank you for the replies. I understand this point of view very well.

My question is: isn't it a waste of calculating power, to use a multitasking-OS to watch
the stateof simple TTL-IO-pins all the time?
A 2$-microcontroller can do this job also very well. And - it is not more then an idea at
the moment - linuxcnc knows the number of necessary motor steps and the max.
stepper-frequency. So why not send both parameters to the microcontroller and just wait
until the movement is done?

I would like to try this - At the moment, I do not know exactly where is the right
place to implement this for a first test.
But via HAL it should be possible - or am I being wrong here?
Last edit: 12 Mar 2016 06:38 by wicki. Reason: layout bad

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

More
12 Mar 2016 07:25 #71484 by cmorley
A bit of background of linuxcnc design:
wiki.linuxcnc.org/cgi-bin/wiki.pl?HardwareDesign

what you are talking of has been done in a fork of linuxcnc - usb to a mesa 7i43 card. araisrobo project I think
I don't know the details of it.
So it could be done in some form or another.

But as Andy said, it breaks the idea of the project - Linuxcnc as a machine controller.

for instance If you wished to do rigid tapping with your usb based controller - you would have to add the tapping code to
your microcontroller
USB wil not allow reliable communication between the motion controller (linuxcnc) and the motor controller (your micro)
multiply that by other options and now you have basically made your micro controller into a motion controller.

Now if someone added some cool option to linuxcnc's motion controller you might not be able to use it until you added it to your motion controller.

By using relatively 'dumb' hardware, we avoid that scenario - what ever linuxcnc can do it can do with all hardware that supports the basic requirements.

So is it a waste of time for simple I/O stuff yes I guess you could say that - but when you look at the bigger picture it makes sense. linuxcnc does a lot more then just simple step driven mills.

Now if you could figure out how to get USB3 to be low latency relatime...now you are talking!

If you were going to try it I would think these two pins would be used;
axis.N.motor-pos-cmd OUT FLOAT The commanded position for this joint.

axis.N.motor-pos-fb IN FLOAT The actual position for this joint.

I would guess you would send motor position to your drive or use PID to convert it to a velocity
The big problem will be the unreliable timing of USB

Chris M

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

More
12 Mar 2016 09:37 #71490 by wicki

The big problem will be the unreliable timing of USB


Yes, I think you are right.
A nearly RT-communication between usb and microcontroller IO-pins
is unreliable and to transfer much functionality into the microcontroller
is not useful for linuxcnc...

But it's nice to have talked about it ;-)

Thanks

wicki

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

Time to create page: 0.136 seconds
Powered by Kunena Forum