LinuxCNC embedded into automation machine

More
10 Mar 2020 23:22 - 10 Mar 2020 23:24 #159713 by hhscott
NO, I did mean 9. On the downloads page:


(Debian 7) This gives the best real-time performance and is generally a better choice for software stepping using a parallel port

(Debian 9) It should probably be the first version tried even if using a parallel port. This is compatible with all Mesa and Pico interface boards


From the language it leads me to think that 7 is better for software and 9 "Might" work. If you are using an external card (Mesa) then 9 is definitely the way to go.

Since I am using the parallel port for software stepping I was wanting clarity that 9 is stable enough. I installed it (9) and I am testing now.

Thanks,
HH
Last edit: 10 Mar 2020 23:24 by hhscott.

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

More
11 Mar 2020 00:09 #159724 by Todd Zuercher
I'm using the Debian 9 iso for software stepping with a parallel port. It is hardware dependent. The right mother board can handle it.

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

More
12 Mar 2020 17:51 #159891 by hhscott

The right mother board can handle it.


I thought I had the correct board: ASRock Q1900B-ITX. I am using 8GB of memory with a 500GB SSD. My latency test numbers are not what I was expecting:

Servo thread 42152
Base thread 161012

Multiple test and multiple reboots yield these same basic results. Nothing other than the browser running.

In my bios:
Advanced --> CPU Config --> Disable everything beside "No-Execute Memory Protection"
Advanced --> Super IO --> Device Mode --> Bi-Directional
IO=378 with every IRQ


Any thoughts?

HH

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

More
12 Mar 2020 18:00 #159895 by PCW
Did you disable all power management including any cstates above C1?

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

More
12 Mar 2020 18:15 #159900 by hhscott

Did you disable all power management including any cstates above C1?


No. Not exactly sure where to go in the Bios for power management?

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

More
12 Mar 2020 18:53 - 12 Mar 2020 21:03 #159909 by hhscott
Yes, I found the settings and changed them, no help, still VERY high numbers.

Which release of 9 should I have downloaded from the download page? There seem to be multiple options for 9.

HH

UPDATE 1:
I downloaded another Debian 9 linuxCNC image and ran it as live. The latency test were the same. Could I have bad hardware on the board?


UPDATE 2
Edited GRUB with Isolcpus 1,2,3. This resulted in a massive reduction in the latency, now running at < 10000. Other function have slowed down but as long as LinuxCNC runs stable at these speeds all is well.
Last edit: 12 Mar 2020 21:03 by hhscott.

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

More
13 Mar 2020 13:59 #160016 by satiowadahc
We use the hal and linuxcnc in a lot of python scripts. The biggest issue we find is homing the machine, we cheat the headless idea and home through a GUI. Then we use linuxcnc, and hal libraries to issue mdi commands. EG:
```
import linuxcnc, hal
#load the libraries
stat = linuxcnc.stat()
com = linuxcnc.command()
halcomp = hal.component("component1")

# initialize some pins if you wish

# set the comp ready
halcomp.ready()

stat.poll()
# should home before issue commands
com.home(0) # x
com.home(1) # Y
com.home(2) # Z
com.command.mdi("G0 X1Y1")
```

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

More
13 Mar 2020 14:13 #160018 by andypugh

We use the hal and linuxcnc in a lot of python scripts. The biggest issue we find is homing the machine, we cheat the headless idea and home through a GUI.


You can use a conventional INI with hioming sequence definitions etc.
But set DISPLAY = halui

Then you can home from the Python interface, or by toggling halui homing pins.

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

More
15 Mar 2020 10:24 - 15 Mar 2020 10:32 #160274 by hhscott
satiowadahc wrote:

We use the hal and linuxcnc in a lot of python scripts


Help me to understand HAL to control LinuxCNC? I am using the python module and it seems to be working perfectly. I can poll for the current state, reset the E-stop, turn on the power button, issue homing commands, load the desired G Code and then run the machine all without issue so far. (Desktop simulation)

Is HAL incorporated into the python/linuxCNC module or is this a separate environment? Searching through the python module docs I see no reference to HAL. I am curious BC I want to make sure that I am utilizing the best practices in this application, it will run in an industrial setting at least 8 hours per day. Again, complete newbie here with LinuxCNC.


Thanks,
HH
Last edit: 15 Mar 2020 10:32 by hhscott.

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

More
15 Mar 2020 21:07 #160340 by andypugh
HAL is how you connect LinuxCNC to the outside world. It is the layer that maps things like motor position commands to motor control modules and then on to the physical output pins.

HALUI offers a set of similar inputs inputs and outputs that can be used in parallel to the Python module. For example to wire a physical hardware IO to an axis-homing command (probably not something you would want, but thats one example)

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

Time to create page: 0.102 seconds
Powered by Kunena Forum