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

More
15 Sep 2013 08:09 #38850 by DaOne
I will try it tomorrow. Would that really make a difference since it works enough to give me the text dialog showing me that its running the mcode file from linuxcnc? I know its running the file just that ouput line does not work.

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

More
15 Sep 2013 08:40 #38853 by PCW
It would verify that there's no problem in the script.
There may also possibly be a path problem (so halcmd does not actually run)

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

More
19 Sep 2013 23:13 - 19 Sep 2013 23:14 #39026 by DaOne
Ok here is what I get and the test I have done..

Type in...
halcmd setp hm2_5i25.0.7i77.0.0.output-11 True
or
halcmd setp hm2_5i25.0.7i77.0.0.output-11 1
in the terminal and it works just fine.

Run this script...
#M111
#!/bin/bash
halcmd setp hm2_5i25.0.7i77.0.0.output-11 True
exit 0
or
#M111
#!/bin/bash
halcmd setp hm2_5i25.0.7i77.0.0.output-11 1
exit 0

and I get...
cnc@cnc-desktop:~/linuxcnc/nc_files$ sh M111
' invalid for bitvalue 'True
<commandline>:0: setp failed
or
cnc@cnc-desktop:~/linuxcnc/nc_files$ sh M111
' invalid for bitvalue '1
<commandline>:0: setp failed
Last edit: 19 Sep 2013 23:14 by DaOne.

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

More
19 Sep 2013 23:24 #39027 by PCW
Looks like the script is corrupted
Did you use a windows editor (that will break the line endings)
The following user(s) said Thank You: Ritterchen

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

More
19 Sep 2013 23:29 #39028 by DaOne
I used notepad++ in Windows and also tried gedit in Linux.

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

More
19 Sep 2013 23:33 - 19 Sep 2013 23:34 #39029 by PCW
Once you have used notepad, all is lost :-)

Try editing the file in gedit and instead of saving , use the save as
menu selection, and then select unix/linux line ending
Last edit: 19 Sep 2013 23:34 by PCW.
The following user(s) said Thank You: Ritterchen

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

More
19 Sep 2013 23:37 #39030 by DaOne
I will give that a try however notepad ++ is not the normal windows editor. Its supposed to work fine. I will just retype it all out in gedit so I know there are no issues. Will report back.

Thanks,
Wes

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

More
19 Sep 2013 23:48 - 19 Sep 2013 23:55 #39032 by PCW
Note that no windows based editor will
work correctly if used to create a unix text file,
unless you specifically tell it to save the file with
unix line endings.

Many modern editors keep whatever line ending style the file
started with (gedit is like this). Gedit does have the ability
(via save as) to change the line ending style.

Another option is using dos2unix on the file
Last edit: 19 Sep 2013 23:55 by PCW.

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

More
20 Sep 2013 04:48 #39042 by DaOne
Ok now I did that and am able to finally run the script from the terminal and it works. The problem is now Linuxcnc says invalid M-code. I don't see a file extension. Does Linux hide the file extension? If so how do I go about changing it in Linux?

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

More
20 Sep 2013 04:49 #39043 by DaOne
It might be that its not executable? Forgot to check that. Will have more time tomorrow.

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

Time to create page: 0.174 seconds
Powered by Kunena Forum