Realtime Control

More
15 Apr 2019 22:54 - 15 Apr 2019 23:16 #130948 by megaplow
Realtime Control was created by megaplow
Hello,
I am building a robot that will use LinuxCNC to control some steppers connected to linear axis. Each axis represents a chunk of data. The machine is basically an animated bar chart. Is there a way to take real time data (via script or application) and send gcode or other commands to my machine? For example, in order to show the number of tweets per minute on a given subject, I would need like to send X12, or X5 to the machine. It would be awesome if there was motion smoothing on each of those move statements. Another example would be sending be a zero all function. That too would need motion smoothing.

This is probably the lowest bar and over engineered project for LinuxCNC, but it will be cool if it is possible.

Joe
Last edit: 15 Apr 2019 23:16 by megaplow.

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

More
16 Apr 2019 01:15 - 16 Apr 2019 01:34 #130953 by Grotius
Replied by Grotius on topic Realtime Control
You can do that.

On youtube you see a few app's that can control a linuxcnc machine with a smart-phone.

I personally would do this trough a loaded real time c component that is connected to a webserver working with cgi (c-coded) command's.But that would be my way...It's not like data streaming in the first place, or a cloud based device.
But that can be done in later stadium.

But the simplest solution is a doing some halui command's (connection's) in this case the X5 to X12 has to be done by halui.jog.N.plus.
You can connect this to physical user button's. Just like a pendant, or you can connect to a plc or rasperry pi.

for axis position : halui.axis.N.pos‚ąícommanded
That's a float output. connected in a simple way in your postgui.hal file.
Maybe you can connect a little piece of python code to your postgui.hal file to execute position control by the halui interface.
You can google for that option.

for more info : linuxcnc.org/docs/html/man/man1/halui.1.html
to connect stuff in postgui.hal file :
net Xaxiscontrol halui.axis.X.pos Inputdevice
#float based input, if other input, convert it with hal modules. this takes time..
#inputdevice = is your device that outputs the float value. in this case X12-X5= 7
#The float value will be 7. (float can be displayed as 7.000001) because of the huge memory of float value's, no problem.
#Xaxiscontrol is just a name for the net (glue) command. ( see halmeter for the Xaxiscontrol name. You will find it if used )
Last edit: 16 Apr 2019 01:34 by Grotius.

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

More
16 Apr 2019 02:45 #130960 by megaplow
Replied by megaplow on topic Realtime Control
That's great news, thank you!
C, python, node, what ever it takes, I am down! I am headed over to youtube now to learn about halui. If you don't mind a follow up question, can you suggest a compact computer to do the conversion to? I was hoping to use something in the IBM NUC family.

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

More
20 Apr 2019 10:05 #131286 by andypugh
Replied by andypugh on topic Realtime Control
I would suggest not using G-code for this at all.
Just use HAL with a bunch of step generators, and use Python to control them via HAL pins.

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

More
20 Apr 2019 13:20 #131300 by Mike_Eitel
Replied by Mike_Eitel on topic Realtime Control
Also I'm a real fan of linuxcnc. Have a look to Christoph Anins ar2

github.com/Chris-Annin/AR2

I'm still searching a good reason that I need such a machine. ;-)

Mike

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

Time to create page: 0.075 seconds
Powered by Kunena Forum