585,762 active members*
4,233 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013
    Posts
    1788

    Python user space HAL component

    I'm trying to create a user space HAL component in Python but I am having little success. Ultimately I want to read HAL pins and output the values to a serial (USB faked) port. Using "admin halcmd loadusr path" I can get my program to generate error messages to the log file but not actually do anything useful. Can anyone post a simple, working, Python script for comparison to my failed efforts?

  2. #2
    Join Date
    May 2015
    Posts
    686

    Re: Python user space HAL component

    Try the Linuxcnc docs Creating Userspace Python Components
    I've never used Python to create components and write mine in C but for comms, Python is the way to go.
    There should be some examples of comms you can borrow from the Linuxcnc git repo
    This one that talks to a plasma cutter by RS485 comes to mind
    https://github.com/LinuxCNC/linuxcnc...omps/pmx485.py
    Rod Webster
    www.vehiclemods.net.au

Similar Threads

  1. Kflop with macOS and python
    By Troy_O in forum Dynomotion/Kflop/Kanalog
    Replies: 1
    Last Post: 01-03-2018, 06:04 PM
  2. Read variable with Python
    By albova in forum LinuxCNC (formerly EMC2)
    Replies: 7
    Last Post: 05-26-2012, 12:53 PM
  3. just another python gcode thing
    By cyclestart in forum LinuxCNC (formerly EMC2)
    Replies: 8
    Last Post: 02-18-2008, 03:54 PM
  4. Paper space Model space ??
    By cncadmin in forum Autodesk
    Replies: 10
    Last Post: 05-29-2003, 12:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •