Change the initial states of OPTIONAL_STOP and BLOCK-DELECT

  • CTB_le123
  • CTB_le123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 Dec 2022 10:26 #259307 by CTB_le123
Hey, I want to change the initial states of optianal-stop and block-delect when I open the Linuxcnc. But I don't know how to change. Please help me!  Now the state is like piture 1, and I want to change the initial state to the picture 2. I have tried to write something in the .ini file but falied. Thank you!
Attachments:

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

More
14 Dec 2022 02:15 #259399 by andypugh
These are both controlled by HAL pins, so you would need to add something to the HAL.
setp halui.program.block-delete.off 0
setp halui.program.block-delete.on 1
setp halui.program.optional-stop.off 0
setp halui.program.optional-stop.on 1

linuxcnc.org/docs/stable/html/man/man1/halui.1.html

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

  • CTB_le123
  • CTB_le123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 Dec 2022 03:18 #259407 by CTB_le123
Thank you for your replay.
I add these to my hal.
setp halui.program.block-delete.off 1
setp halui.program.block-delete.on 0
setp halui.program.optional-stop.off 1
setp halui.program.optional-stop.on 0
But it doesn't work.

The halshow show as the picture.
The result should be that the  halui.program.block-delete.is-on FALSE  and halui.program.optional-stop.is-on FALSE. It doesn't work as we wish.
 
Attachments:

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

More
14 Dec 2022 03:21 #259408 by cmorley
What screen are you using? What version of linuxcnc?
The following user(s) said Thank You: CTB_le123

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

  • CTB_le123
  • CTB_le123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 Dec 2022 03:48 #259413 by CTB_le123
I used the axis screen as the first picture. The version is 2.9.0~pre0.
The ini file as follow.
Attachments:

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

More
14 Dec 2022 06:56 #259422 by cmorley
Try this:

in the ini under DISPLAY add:
USER_COMMAND_FILE=customize_axis.py

in the config folder add a file named customized_axis.py

in that file add:
c.set_block_delete(0)

if you want to adjust optional stop also add:
c.set_optional_stop(0)

Chris
 
The following user(s) said Thank You: CTB_le123

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

  • CTB_le123
  • CTB_le123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 Dec 2022 07:40 - 14 Dec 2022 08:46 #259424 by CTB_le123
Thank you for your help.
 I change as your advice,  I find the origin code is in the axis.py.

 
Last edit: 14 Dec 2022 08:46 by CTB_le123.

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

Time to create page: 0.136 seconds
Powered by Kunena Forum