- Posts: 155
- Thank you received: 0
User M-Code outputs with a 5i25 / 7i77 not working
13 years 1 month ago #38850
by DaOne
Replied by DaOne on topic User M-Code outputs with a 5i25 / 7i77 not working
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 to join the conversation.
13 years 1 month ago #38853
by PCW
Replied by PCW on topic User M-Code outputs with a 5i25 / 7i77 not working
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)
There may also possibly be a path problem (so halcmd does not actually run)
Please Log in to join the conversation.
13 years 1 month ago #39026
by DaOne
Replied by DaOne on topic User M-Code outputs with a 5i25 / 7i77 not working
Ok here is what I get and the test I have done..
Type in...
or
in the terminal and it works just fine.
Run this script...
or
and I get...
or
Type in...
Code:
halcmd setp hm2_5i25.0.7i77.0.0.output-11 True
Code:
halcmd setp hm2_5i25.0.7i77.0.0.output-11 1
Run this script...
Code:
#M111
#!/bin/bash
halcmd setp hm2_5i25.0.7i77.0.0.output-11 True
exit 0
Code:
#M111
#!/bin/bash
halcmd setp hm2_5i25.0.7i77.0.0.output-11 1
exit 0
and I get...
Code:
cnc@cnc-desktop:~/linuxcnc/nc_files$ sh M111
' invalid for bitvalue 'True
<commandline>:0: setp failed
Code:
cnc@cnc-desktop:~/linuxcnc/nc_files$ sh M111
' invalid for bitvalue '1
<commandline>:0: setp failed
Please Log in to join the conversation.
13 years 1 month ago #39027
by PCW
Replied by PCW on topic User M-Code outputs with a 5i25 / 7i77 not working
Looks like the script is corrupted
Did you use a windows editor (that will break the line endings)
Did you use a windows editor (that will break the line endings)
Please Log in to join the conversation.
13 years 1 month ago #39028
by DaOne
Replied by DaOne on topic User M-Code outputs with a 5i25 / 7i77 not working
I used notepad++ in Windows and also tried gedit in Linux.
Please Log in to join the conversation.
13 years 1 month ago #39029
by PCW
Replied by PCW on topic User M-Code outputs with a 5i25 / 7i77 not working
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
Try editing the file in gedit and instead of saving , use the save as
menu selection, and then select unix/linux line ending
Please Log in to join the conversation.
13 years 1 month ago #39030
by DaOne
Replied by DaOne on topic User M-Code outputs with a 5i25 / 7i77 not working
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
Thanks,
Wes
Please Log in to join the conversation.
13 years 1 month ago #39032
by PCW
Replied by PCW on topic User M-Code outputs with a 5i25 / 7i77 not working
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
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
Please Log in to join the conversation.
13 years 1 month ago #39042
by DaOne
Replied by DaOne on topic User M-Code outputs with a 5i25 / 7i77 not working
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 to join the conversation.
13 years 1 month ago #39043
by DaOne
Replied by DaOne on topic User M-Code outputs with a 5i25 / 7i77 not working
It might be that its not executable? Forgot to check that. Will have more time tomorrow.
Please Log in to join the conversation.
Time to create page: 0.062 seconds
