Advanced Search

Search Results (Searched for: )

  • endian
  • endian's Avatar
11 Apr 2025 20:10
Replied by endian on topic Strange behaviour of custom component

Strange behaviour of custom component

Category: Advanced Configuration

Yes I have to start ... I have planty of ideas but I am aware little bit to code them over halcompile...

Yes defenetly I am interested even in all which should improve our skills ... can you provide me them please?

thanks...
  • pgf
  • pgf
11 Apr 2025 19:58

Running an external program from a HAL pin

Category: HAL

Thanks. Seems like that restriction is a little too restrictive sometimes. :-/

But surely there's some other, event driven, mechanism, which wouldn't involve polling the pin every second or more?
  • Aciera
  • Aciera's Avatar
11 Apr 2025 19:46
Replied by Aciera on topic Running an external program from a HAL pin

Running an external program from a HAL pin

Category: HAL

You cannot run an MDI_COMMAND when the controller is in estop. Try a python hal component that invokes your external program instead:
www.linuxcnc.org/docs/stable/html/hal/halmodule.html
  • Grotius
  • Grotius's Avatar
11 Apr 2025 19:41
Replied by Grotius on topic Strange behaviour of custom component

Strange behaviour of custom component

Category: Advanced Configuration

@Endian,

Ever thought about writing components in c code instead of halcompile code?
I bet writing in c will relax your code. You can also ask DeepSeek to write c code, then
compile it with cmake, and you are off.
I have old examples, if interested.

I don't see any memory allocation for multiple instances of the component at the moment.
If you like at threads.c you can see RTAPI... is used for setting up multiple threads.
  • endian
  • endian's Avatar
11 Apr 2025 19:09 - 11 Apr 2025 19:21
Replied by endian on topic Strange behaviour of custom component

Strange behaviour of custom component

Category: Advanced Configuration

Okay I got it... But how to customize them to not hard code them ... any ideas which will be readable after some time?

Thank you all...
  • jochen91
  • jochen91
11 Apr 2025 19:05
  • Hakan
  • Hakan
11 Apr 2025 18:40
Replied by Hakan on topic Strange behaviour of custom component

Strange behaviour of custom component

Category: Advanced Configuration

As Andy pointed out, those two variables are shared among all instances.
enum MODESWAP{WRITEMODE, WAITVELOMODE, INITIAL, WORKING, WAITINGFORENABLE, HOMING};
enum MODESWAP modeSwap;

enum HOMESTATE{HOMETRIGGER, HOMECONFIRM, HOMESEEKING};
enum HOMESTATE homeState;
It wasn't so easy to just "variable" before the lower lines so you might have to rework that a bit.
  • PCW
  • PCW's Avatar
11 Apr 2025 18:26
Replied by PCW on topic VHD Header Help

VHD Header Help

Category: Driver Boards

I included the pinout file if you want to use it as a starting point for a different configuration.

Note that having all muxed encoders is a little odd as non-muxed encoder show up as 2
encoders each, with only one being useable so the encoders are:

7I89 0..7
7i76 8 (9)
7I78 10 (11)

Aliased encoder in parens

I keep meaning to add the capability of supporting both encoder types
simultaneously to the driver, but there always seems to be something of
higher priority...
 
  • PCW
  • PCW's Avatar
11 Apr 2025 18:16

Mill setup troubles and questions (Speed display, at speed signal, coolant pump)

Category: General LinuxCNC Questions

If you want the coolant on al the time the spindle is on, add:

net spindle-enable => hm2_5i25.0.7i76.0.0.output-02

If you want the normal gcode controlled coolant, add:

net coolant-flood  => hm2_5i25.0.7i76.0.0.output-02

or

net coolant-mist   => hm2_5i25.0.7i76.0.0.output-02


As far as the spindle scaling goes, OUTPUT_SCALE must be 24000
If that does not work, the are errors elsewhere that must be fixed.
  • Fianna
  • Fianna's Avatar
11 Apr 2025 18:10
Replied by Fianna on topic VHD Header Help

VHD Header Help

Category: Driver Boards

What a legend, flashed and looking good now, thank you

I'll get on with the hal mods to get the encoder inputs "wired" up and see
  • pgf
  • pgf
11 Apr 2025 18:01 - 11 Apr 2025 19:36

Running an external program from a HAL pin

Category: HAL

[ Damn.  I edited the post to clarify some wording, and now the code blocks are broken.  I'm not going to try to fix them.  :-/  ]

I'd like to run an external program after an e-stop event.  I thought it was going to be easy.

I have the program (which goes into the background, so there's no delay) in M101.  M101 works when I invoke it via MDI.

I have a g-code snippet which invokes M101:
(subroutine which just runs my spindle off script)
o<my_spindle_off> sub
(MSG, my_spindle_off)
M101
o<my_spindle_off> endsub


That, in turn, is run via MDI_COMMAND, just like my homing and touch-off routines:

[code][HALUI]
MDI_COMMAND = o<reset_g54> call
MDI_COMMAND = o<auto_x_minus> call
MDI_COMMAND = o<auto_x_plus> call
MDI_COMMAND = o<auto_y_minus> call
MDI_COMMAND = o<auto_y_plus> call
MDI_COMMAND = o<auto_z_minus> call
MDI_COMMAND = o<home_x> call
MDI_COMMAND = o<home_y> call
MDI_COMMAND = o<home_z> call
MDI_COMMAND = o<reset_g54_rot> call
MDI_COMMAND = o<my_spindle_off> call


In custom.hal:

[code]loadrt estop_latch 
addf estop-latch.0 servo-thread 
net estop-loopout \
    iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin \
    iocontrol.0.user-enable-out => estop-latch.0.ok-in 
net estop-reset \
    iocontrol.0.user-request-enable => estop-latch.0.reset 
net remote-estop \
    estop-latch.0.fault-in <= hm2_7i96.0.gpio.003.in_not


And in custom_postgui.hal:

[code]net external-estop-off \
    estop-latch.0.fault-out => halui.mdi-command-10


With halshow, I can see net external-estop-off and pin estop-latch.0.fault-out change state when I go in and out of e-stop state, but my command never runs.  Ideas?

paul
[/code][/code][/code]
Displaying 17311 - 17321 out of 17321 results.
Time to create page: 0.396 seconds
Powered by Kunena Forum