(Solved) Is there a way of creating a dummy pin inside hal?

More
4 years 11 months ago #227845 by Blackwind
Hello to everybody,
i have a question that couldnt respond myself post it here if someone has an answer!
i want the machine to move to a certain position on shutdown.
i have an mdi_command in my .ini, but how i could run it in shutdown.hal on exit? (i was thinking on create a dummy bolean pin to modify it from 0 to 1 in shutdown to call mdi_command)
in the manual says something like hal_pin_new  but that is for terminal.
Any comments?
regards
rick

 

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

More
4 years 11 months ago #227854 by cmorley
I don't think shutdown.jal is going to help you - I think at that point linuxcnc motion controller is already taken down.
You really need to catch the event in the screen code.
What screen are you using?
I'm sure someone already did this with AXIS
The following user(s) said Thank You: Blackwind

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

More
4 years 11 months ago #227949 by Todd Zuercher
I've never tried this, but if you have set up a Halui command pin for the midi command, Try simply trying to setp the hal pin for the halui command in the shutdown.hal file.

a line like this (if the mdi command you set up in your ini is #01.)
Code:
setp halui.mdi-command-01 true
The following user(s) said Thank You: Blackwind

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

More
4 years 11 months ago - 4 years 11 months ago #227957 by Grotius
Hi,

In terminal or a with a bash file it is possible to do a crual shutdown attack like below:

#!/bin/bash
./halcmd unlink stepgen_motioncontrol (detach stepgenerator or pid controller from linuxcnc)
./halcmd setp motor.x 0 (sent motor x axis to zero)
echo "asta la vista"
shutdown -h +1 (wait one minute to shutdown)

 
Last edit: 4 years 11 months ago by Grotius.
The following user(s) said Thank You: Blackwind

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

More
4 years 10 months ago - 4 years 10 months ago #228214 by Blackwind
Hi Chris, thanks for the answer!
Im in axis, i was working on shutdown.hal because id suppose is for that purpose, axis shutdowns fast but lcnc component continues working serveral seconds from exit. I dont want the event on screen, i just want the machine came close to home limits.

But judging by the error i get you are right!
Last edit: 4 years 10 months ago by Blackwind.

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

More
4 years 10 months ago #228215 by Blackwind
Hi, thanks for the aswer
that is crude!, if i not come to a solution i will kill it with your code hehe.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum