Advanced Search

Search Results (Searched for: )

  • Todd Zuercher
  • Todd Zuercher's Avatar
28 May 2024 16:04 - 28 May 2024 16:15
Replied by Todd Zuercher on topic Custom Hal Component

Custom Hal Component

Category: HAL

You can overcome many of the foibles of the forum editor by clicking the "Source" button at the top of the editor screen. It occasionally works correctly on the first try posting something but it pretty much always scrambles everything if you try to go back and edit a post.  (I see now it did the same to me on a line. 

(edit)
But I was able to correct it by inserting the messed up lines into code brackets.  If you don't click the source button the editor will strip the indenting out of your code, and do other things to it as well, (such as strip the bracketed text.)
  • Aciera
  • Aciera's Avatar
28 May 2024 15:44 - 28 May 2024 15:45
Replied by Aciera on topic Custom Hal Component

Custom Hal Component

Category: HAL

Oh, my apologies, the editor consumes the contents of the rectangular brackets. Although not the [t]

How did you get the indenting to stay in the code window?
  • Todd Zuercher
  • Todd Zuercher's Avatar
28 May 2024 15:37 - 28 May 2024 15:40
Users Mailing List? was created by Todd Zuercher

Users Mailing List?

Category: Forum Questions

Is it just me or has anyone else noticed that the Linuxcnc Users mailing list (This email address is being protected from spambots. You need JavaScript enabled to view it.) over on Sourceforge seems be down/not accepting mail?

I've not received mail from or been able to send mail to it since last Friday.
  • amanker
  • amanker
28 May 2024 15:37

Need help in choosing controller board from small honby cnc.

Category: Driver Boards

I have bought RPI5 for performance boost. But Remora is not working on RPI5.
  • Todd Zuercher
  • Todd Zuercher's Avatar
28 May 2024 15:16 - 28 May 2024 16:10
Replied by Todd Zuercher on topic Custom Hal Component

Custom Hal Component

Category: HAL

This seems to work (see code below).
The problem was line 21, I had to change from:
                h = float(s.tool_table[t].zoffset)
this to this:
                h['z_offset_tool_' + str(t)] = float(s.tool_table[t].zoffset)
#!/usr/bin/env python3

import hal
import linuxcnc

h = hal.component("tool-info-comp")
# number of tools to expose
n = 8
for t in range(1, n+1):
    h.newpin("z_offset_tool_" + str(t), hal.HAL_FLOAT, hal.HAL_OUT)
h.ready()

# create a connection to the status channel
s = linuxcnc.stat()

try:
    while 1:
        s.poll() # get current values
        if s.tool_table[1]:
            for t in range(1, n+1):
                h['z_offset_tool_' + str(t)] = float(s.tool_table[t].zoffset)

except KeyboardInterrupt:
    raise SystemExit

 
  • Todd Zuercher
  • Todd Zuercher's Avatar
28 May 2024 14:45
Replied by Todd Zuercher on topic Custom Hal Component

Custom Hal Component

Category: HAL

I am having trouble making your 2nd version work, for some reason no hal pins are created.

The first version works fine, once I put in some appropriate indenting. (Stupid forum editor.)
#!/usr/bin/env python3

import hal
import linuxcnc

h = hal.component("tool-info-comp")

h.newpin("z_offset_tool_1", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("z_offset_tool_2", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("z_offset_tool_3", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("z_offset_tool_4", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("z_offset_tool_5", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("z_offset_tool_6", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("z_offset_tool_7", hal.HAL_FLOAT, hal.HAL_OUT)
h.newpin("z_offset_tool_8", hal.HAL_FLOAT, hal.HAL_OUT)

h.ready()

# create a connection to the status channel
s = linuxcnc.stat()

try:
    while 1:
          s.poll() # get current values
          if s.tool_table[1]:
               h['z_offset_tool_1'] = float(s.tool_table[1].zoffset)
               h['z_offset_tool_2'] = float(s.tool_table[2].zoffset)
               h['z_offset_tool_3'] = float(s.tool_table[3].zoffset)
               h['z_offset_tool_4'] = float(s.tool_table[4].zoffset)
               h['z_offset_tool_5'] = float(s.tool_table[5].zoffset)
               h['z_offset_tool_6'] = float(s.tool_table[6].zoffset)
               h['z_offset_tool_7'] = float(s.tool_table[7].zoffset)
               h['z_offset_tool_8'] = float(s.tool_table[8].zoffset)


except KeyboardInterrupt:
     raise SystemExit
  • RoberCNC
  • RoberCNC
28 May 2024 14:45
Replied by RoberCNC on topic Run/Step Hold/Resume Buttons

Run/Step Hold/Resume Buttons

Category: HAL Examples

Hello friends!! Maybe I should open a new thread but I'm writing here because after diving and researching in various posts this is the one that most closely resembles what I intend to do and so everything stays together and related. I should also mention that it has been a great discovery given that it is something I plan to do in the future and it's great for me, so thank you very much!!

I am trying to make the home all with an external (physical) button and a priori it seems simple, link the "halui.home-all" pin with the input signal of the MESA card and that's it, but things are getting complicated since it is linked with another button for the same on the MPG pendant. I deduce that it should be done using an "and" or similar to be able to operate both buttons interchangeably and here I am starting to get lost and I don't quite understand the logic or how I should do it.

Can you give me a hand?
  • COFHAL
  • COFHAL
28 May 2024 14:16

Probe Basic spindle load bar off by a decimal

Category: QtPyVCP

Thanks for your reply. I understand that, what I don't know is where you get that spindle load value from, do you get it through MODBUS or through the analog output of the VFD?
  • PCW
  • PCW's Avatar
28 May 2024 13:45
Replied by PCW on topic Reconnect to Mesa ethernet card

Reconnect to Mesa ethernet card

Category: General LinuxCNC Questions

Can you keep the Ethernet card powered? This will still likely require
re-homing if the drives have been powered down,

It is possible to re-connect to the card after a read error but I don't think
you can get things setup properly without  basically relaunching LinuxCNC
so the hal file drivers are reloaded and all initial parameters are re-setup.
 
  • Aciera
  • Aciera's Avatar
28 May 2024 13:20
Replied by Aciera on topic Custom Hal Component

Custom Hal Component

Category: HAL

This version is a bit more concise. (I hope it retains the indentation)
Warning: Spoiler!
  • Todd Zuercher
  • Todd Zuercher's Avatar
28 May 2024 13:04
Replied by Todd Zuercher on topic Custom Hal Component

Custom Hal Component

Category: HAL

Thank you very much. I'm eager to test it out.
  • Aciera
  • Aciera's Avatar
28 May 2024 13:03
Replied by Aciera on topic Soft Limit Setup

Soft Limit Setup

Category: PnCConf Wizard

Note that when jogging in WORLD mode you will still be able to jog into the joint limits. That is a limitation of the current state of linuxcnc.
  • Grotius
  • Grotius's Avatar
28 May 2024 12:29
Replied by Grotius on topic Trajectory Planner using Ruckig Lib

Trajectory Planner using Ruckig Lib

Category: General LinuxCNC Questions

To enable extensive computations in the planner added seperate thread creation
And when all gcode is loaded we request exstensive calculation by calling start calculation thread
This then is the framework to create a path optimalisation without staying within the planner cycletime.

Now next thing to test is running the c++ linuxcnc axis gui wich has the gremlin opencascade viewer under the hood.
Here we can show the original gcode path, and the updated gcode path, this then can be done offline, or online.




 
  • Aciera
  • Aciera's Avatar
28 May 2024 12:23 - 28 May 2024 12:58
Replied by Aciera on topic Soft Limit Setup

Soft Limit Setup

Category: PnCConf Wizard

If this for your robot and you are using custom kinematics/ switchable kinematics you will need to switch the axis limits from cartesian to joint when switching from 'World' to 'Joint' mode (and the other way around).
For an example have a look at the 'millturn' sim config.
M428/M429 will call 'M128/M129' respectively which is where the axis limits are switched between the two sets defined in the ini.

[edit]
Here is the melfa-sim config with axis limit switching added:
 

File Attachment:

File Name: melfa-sim.tar.gz
File Size:34 KB
  • MarkoPolo
  • MarkoPolo
28 May 2024 12:22

Help,How to customize language of QtDragon's interface

Category: Qtvcp

If you want to change the text of individual keys, you can do so in the qss theme file
e.g.
#action_mist{
    qproperty-true_state_string: "空气\\nOn";
    qproperty-false_state_string: "空气\\nOff";
}

linuxcnc.org/docs/devel/html/gui/qtdragon.html
Displaying 25561 - 25575 out of 26499 results.
Time to create page: 1.538 seconds
Powered by Kunena Forum