LinuxCNC embedded into automation machine
- hhscott
- Offline
- Junior Member
- Posts: 30
- Thank you received: 6
(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
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 4957
- Thank you received: 1441
Please Log in or Create an account to join the conversation.
- hhscott
- Offline
- Junior Member
- Posts: 30
- Thank you received: 6
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.
- PCW
- Away
- Moderator
- Posts: 17917
- Thank you received: 4799
Please Log in or Create an account to join the conversation.
- hhscott
- Offline
- Junior Member
- Posts: 30
- Thank you received: 6
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.
- hhscott
- Offline
- Junior Member
- Posts: 30
- Thank you received: 6
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.
Please Log in or Create an account to join the conversation.
- satiowadahc
- Offline
- Senior Member
- Posts: 55
- Thank you received: 12
```
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.
- andypugh
- Offline
- Moderator
- Posts: 23160
- Thank you received: 4857
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.
- hhscott
- Offline
- Junior Member
- Posts: 30
- Thank you received: 6
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
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23160
- Thank you received: 4857
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.