User M-Code outputs with a 5i25 / 7i77 not working

More
15 Sep 2013 01:36 - 15 Sep 2013 01:36 #38831 by DaOne
I must be doing something wrong here. I got the M-Codes working as I cant verify them by a text prompt however I can not get the output part to work. Can someone tell me the what the magic is thats required? Here is what I am using. If I uncomment out the display text part it will display the text dialog box so I know the m-code itself is working just not the actual output. Do I need to define that output in hal first for this to work?
#M110
#!/bin/bash
zenity --info --text="M110 - Quill Out"
halcmd setp hm2_5i25.0.7i77.0.0.output-11 True
exit 0
Last edit: 15 Sep 2013 01:36 by DaOne.

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

More
15 Sep 2013 03:20 #38834 by PCW
Actually its sort of the opposite, you cannot have the pin connected to a
driving source in the HAL file or the setp will fail

I would just do the:

halcmd setp hm2_5i25.0.7i77.0.0.output-11 True
halcmd setp hm2_5i25.0.7i77.0.0.output-11 False

in a terminal to verify that it works first

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

More
15 Sep 2013 03:22 #38835 by DaOne
Its not in the hall file but it still won't work.

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

More
15 Sep 2013 03:34 #38836 by PCW
Did you try from the command line?
Is the pin true?

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

More
15 Sep 2013 04:38 #38838 by DaOne
Command line works fine. Mcode does not work.

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

More
15 Sep 2013 05:03 #38839 by PCW
So does running the script by hand work?

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

More
15 Sep 2013 07:00 #38843 by DaOne
I am not sure if it does. I did however put a line in there to give me a text dialog to be sure it was actually running the macro and it displays the text. It just wont switch the output.

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

More
15 Sep 2013 07:23 #38844 by PCW
I guess I was suggesting that you try running the script by hand first...
also piping the output of the halcmd to a file or log might help,
maybe this is as simple as a path problem

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

More
15 Sep 2013 07:30 #38845 by DaOne
By hand you are referring to from the command line correct? I am not sure how to pipe it to a file or log. I am baffled that I have the mcode confirmed working based on the text dialog and the line I am trying to run working in command line but they both refuse to work together. What if I named the pin in hal and then switched the name to true? I am guessing that wont work either since from what I read you must access the pin directly?

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

More
15 Sep 2013 08:00 #38849 by PCW
I mean does running the script from the command line work?

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

Time to create page: 0.085 seconds
Powered by Kunena Forum