Is there a way to print a message to AXIS?

More
21 Feb 2012 10:00 #17905 by andypugh
ArcEye wrote:

Rectifying this produces the result you wanted


Not for me. It works for me from the command line ( ./m112) But EMC2 is not finding it.
I tried making it executable in the GUI, and with chmod.

Where have you put the files? Does this correspond to an INI file entry?

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

More
21 Feb 2012 12:15 #17906 by beltramidave
Interesting.....As stated earlier:

1. I put my files (stopmessage.png and M112) in the following directory: /home/dave/emc2/nc_files.
2. My M112 files is this:
#!/bin/bash
eog /home/dave/emc2/nc_files/stopmessage.png
exit 0
3. I put "M112" in my .ngc program


Not sure how to make the M112 file executable. When I checked the files properties under Permissions, the check box is checked as being an executable.

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

More
21 Feb 2012 12:38 #17907 by BigJohnT
On my 10.04 computer in the beer cave I can only get eog to work like this

cd emc2/nc_files
eog stopmessage.png

When I try and run your M112 file I get a strange error

bash: ./M112: /bin/bash^M: bad interpreter: No such file or directory

When I created a new file using gedit I get a slightly different error...

bash: ./M113: bin/bash: bad interpreter: No such file or directory

something is bashed for sure...

John

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

More
21 Feb 2012 12:41 #17908 by beltramidave
Got it working!!

You were correct in that I had created the M112 file in Windows, but when I used Gedit to open (on my computer running Ubuntu) it opened and looked just the same as if I opened it with Windows.

I re-created it with Gedit and was able to display my message both in MDI and calling it from my Gcode. I had no doubt that it would be something very simple, but I had no way of knowing. This has/had been my first attempt to do anything like this.

I appreciate everyone sticking with me until I figured it out!!

Dave

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

More
21 Feb 2012 12:46 #17909 by BigJohnT
I found this doing a google search

shell does not like CR/LF, if you created your scripot in Windows and transferred it into Linux machine then you have CR/LFs in you shell script that you have to remove.


John

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

More
21 Feb 2012 12:47 - 21 Feb 2012 17:57 #17910 by BigJohnT
I am glad you finally got this to work.

John
Last edit: 21 Feb 2012 17:57 by BigJohnT.

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

More
21 Feb 2012 13:00 #17911 by beltramidave
I'm going to push my luck, now.

Is there a SIMPLE way of closing the message window by using the 'Enter' key instead of using the mouse and pressing 'x'?

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

More
21 Feb 2012 14:37 #17913 by ArcEye

Is there a SIMPLE way of closing the message window by using the 'Enter' key instead of using the mouse and pressing 'x'?


Alt F4

Using the enter key to close anything, assumes that there is a 'Close' button and that it has keyboard focus, neither of which pertain.

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

More
22 Feb 2012 11:59 #17932 by BigJohnT
Instead of using bash could you use a python program to get the desired result?

Just thinking out loud...

John

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

More
22 Feb 2012 12:23 #17933 by beltramidave
As I know nothing about programming (as obvious from all my posts on this subject), I don't think that it would be a good idea to try Python. I have looked through the documentation and really wish that I understood it more to give it a try. Would be really nice to be able to create custom panels. Maybe down the road.

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

Time to create page: 0.139 seconds
Powered by Kunena Forum