584,316 active members*
6,482 visitors online*
Register for free
Login
Results 1 to 15 of 15
  1. #1
    Join Date
    May 2012
    Posts
    537

    G code viewer questions...

    Hi Tom,

    I have a few questions about the g code viewer. Honestly I haven't used the g code viewer much but after playing with the transfrom low pass filter ive been finding it handy.

    1. On my mill I cant seem to get any toolpaths to display at all? I can only use the g-code viewer on my office computer. If i click settings they appear to be the same, but nothing shows up on my mill? Any ideas? Do i have some settings wrong or could a custom screen be causing it?

    2. Is this showing the G-code or the path after its ran through the trajectory planner? If i change TP settings I see the same result, but in your video here https://www.youtube.com/watch?v=BDX_JUXVrBk it shows the results of the changes. Are you doing something different here? How are you viewing the changes in the trajectory planner?

    3. Is there any other way to zoom other then mouse wheel? If not could the increments be smaller? I find things tend to be too small and then one more increment and its off the screen.

    Thanks.

    Mark

  2. #2
    Join Date
    May 2006
    Posts
    4042

    Re: G code viewer questions...

    Hi Mark,

    On my mill I cant seem to get any toolpaths to display at all? I can only use the g-code viewer on my office computer. If i click settings they appear to be the same, but nothing shows up on my mill? Any ideas? Do i have some settings wrong or could a custom screen be causing it?
    If you are using the Screen Editor then the path is directed to the GViewer on the Main Screen rather than the separate resizable screen. You will need to switch to a Standard Screen Face or enable the GViewer Control on one of your Screens.

    Is this showing the G-code or the path after its ran through the trajectory planner?
    Yes

    If i change TP settings I see the same result, but in your video here it shows the results of the changes. Are you doing something different here? How are you viewing the changes in the trajectory planner?
    You must actually run a Job to see the Trajectory Planned Result.

    Is there any other way to zoom other then mouse wheel? If not could the increments be smaller? I find things tend to be too small and then one more increment and its off the screen.
    Yes. See the help:
    G Code Viewer Screen

    Click and drag the right mouse Button to translate closer or farther.

    After 3 seconds of moving the resolution increases.
    TK
    http://dynomotion.com

  3. #3
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Quote Originally Posted by TomKerekes View Post
    Hi Mark,

    If you are using the Screen Editor then the path is directed to the GViewer on the Main Screen rather than the separate resizable screen. You will need to switch to a Standard Screen Face or enable the GViewer Control on one of your Screens.

    Yes

    You must actually run a Job to see the Trajectory Planned Result.

    Yes. See the help:
    G Code Viewer Screen

    Click and drag the right mouse Button to translate closer or farther.

    After 3 seconds of moving the resolution increases.
    Ok, how do I enable the GViewer Control from a custom screen? I have the button there to open the G viewer, and it opens and looks fine, just doesnt show the toolpaths. It is a screen issue for sure, tried a custom screen on my office computer and it stopped working. I attached my custom screen if you want to take a look.

    Right mouse button is working for zoom, thanks I missed that somehow.

  4. #4
    Join Date
    May 2006
    Posts
    4042

    Re: G code viewer questions...

    Hi Mark,

    By popular demand when using a Custom Screen the GCode Viewer is now part of the main dialog screen and all path info is directed to and displayed there instead of the separate GViewer Screen.

    If you "Show" the GCode Viewer Control on your Screen it should show the tool paths. You might hide the button that brings up the separate GViewer Screen.

    See this video.
    https://youtu.be/VkBhYpyGpNU
    TK
    http://dynomotion.com

  5. #5
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Ok i was wondering how you got it to change from code to viewer to split, but I see now how you did it with 3 seperate screens. Cool.

    So if I want i can just make 2 or 3 versions of my screen and configure an unused label button to switch between them? So all i need to do is put "SScript:ScreenName.scr" under script to get the button to switch screens?

  6. #6
    Join Date
    May 2006
    Posts
    4042

    Re: G code viewer questions...

    Hi Mark,

    So if I want i can just make 2 or 3 versions of my screen and configure an unused label button to switch between them? So all i need to do is put "SScript:ScreenName.scr" under script to get the button to switch screens?
    Yes. You can also use the '>' browse button to configure the action and browse for the screen script file to format that syntax for you.
    TK
    http://dynomotion.com

  7. #7
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Ok Tom, I got the viewer working now. Havent got it switching screens yet, ill try that tomorrow.

    One more question, it seems like the Front and Side views are rotated? The Z axis should be vertical in these views but its horizontal on mine?

  8. #8
    Join Date
    May 2006
    Posts
    4042

    Re: G code viewer questions...

    Hi Mark,

    One more question, it seems like the Front and Side views are rotated? The Z axis should be vertical in these views but its horizontal on mine?
    Those views were more for a Lathe. Please see if this patch for non-lathe mode works better for you. This has the Transform Change as well for V4.34:

    http://dynomotion.com/Software/Patch...KMotionCNC.exe
    http://dynomotion.com/Software/Patch...nterpreter.dll
    TK
    http://dynomotion.com

  9. #9
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Quote Originally Posted by TomKerekes View Post
    Hi Mark,

    Those views were more for a Lathe. Please see if this patch for non-lathe mode works better for you. This has the Transform Change as well for V4.34:

    http://dynomotion.com/Software/Patch...KMotionCNC.exe
    http://dynomotion.com/Software/Patch...nterpreter.dll
    Hi Tom,

    I finally got around to trying these files. When I hit front view or side view now, it just shows a green screen without any tool paths. I tried zooming out but cant seem to find the part again.

    I was able to create two separate screens and get them to switch between each other by clicking a button. This is working well

    One more thing, before I finish everything up with screen editor, would it be possible to add a "Next Tool" button? That would be very handy if it wasnt much trouble. Basically one button to click that would search for the next M06 and make that the next line. That would save me sooo much time when running certain operations over to bring things out to size. Thanks again.

    Mark

    - Also, machine has been running fine since, I will post back if it acts up again.

  10. #10
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Hi Tom,

    I didnt hear back from you on this last post. No big deal really about the g viewer views being rotated, i can still rotate it around and see what I need.

    Wondering if you think theres any easy way to add a "next tool" button. Thanks.

    Mark

  11. #11
    Join Date
    May 2006
    Posts
    4042

    Re: G code viewer questions...

    Hi Mark,

    Sorry for the delay we’ve been evacuated from the office for almost a week due to the fires here in California (Woolsey). But we were fortunate to not have any loss.

    We were able to duplicate the GViewer issue but don’t have a fix yet.

    Regarding next tool search:I’m trying to think of a general way to add such functionality. The Screen Editor has a means of sending Windows messages such as mouse clicks and keyboard keys. So I was going to see if a fixed sequence of messages would do what you desire. You might also look at a 3rd party keystroke Generator. I assume you realize there is a g code search feature.
    TK
    http://dynomotion.com

  12. #12
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Quote Originally Posted by TomKerekes View Post
    Hi Mark,

    Sorry for the delay we’ve been evacuated from the office for almost a week due to the fires here in California (Woolsey). But we were fortunate to not have any loss.

    We were able to duplicate the GViewer issue but don’t have a fix yet.

    Regarding next tool search:I’m trying to think of a general way to add such functionality. The Screen Editor has a means of sending Windows messages such as mouse clicks and keyboard keys. So I was going to see if a fixed sequence of messages would do what you desire. You might also look at a 3rd party keystroke Generator. I assume you realize there is a g code search feature.
    Hi Tom, wow sorry to hear your that close to the fire. At least theres no loss, hopefully it stays that way. Wishing the best to all you guys down there. We had a small forest fire close to our home this summer and were evacuated for a day but thankfully they got things under control. Its not a nice feeling to have to just leave everything not knowing if there will be anything left to come back to.

    Yeah I know about the search feature and use it in larger programs. At my last job we used mastercam and their G-code editor has a next and previous tool button and it was very convenient to jump to next tool in a single click. I was thinking it would be awesome to have this in Kmotioncnc, would be super fast for finding tools and restarting part way through the program. See pic here: https://planet-cnc.com/wp-content/up...02/Slika14.jpg

    I downloaded AutoHotkey and created a script to find the next M06 using keyboard commands. Its a pretty neat little program. I setup Ctrl+Down and Ctrl+Up to search up and down and seems to work fine. Its fairly simple, see below. Is there any way to add a simple thing like this to Kmotioncnc or do i need to keep using the AutoHotkey program? Heres the script:

    ^Down::
    Send, ^f
    Send, m06
    Send, {Tab}
    Send, {Tab}
    Send, {Tab}
    Send, {Tab}
    Send, d
    Send, {Tab}
    Send, {enter}
    Send, {Tab}
    Send, {enter}
    return

    ^Up::
    Send, ^f
    Send, m06
    Send, {Tab}
    Send, {Tab}
    Send, {Tab}
    Send, {Tab}
    Send, u
    Send, {Tab}
    Send, {enter}
    Send, {Tab}
    Send, {enter}
    return

  13. #13
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Hi Tom,

    I never heard back from you. You mention that the screen editor can send mouse clicks and keyboard keys. How can i configure a button or key to send that sequence of keys? Thanks.

    Mark

  14. #14
    Join Date
    May 2006
    Posts
    4042

    Re: G code viewer questions...

    Hi Mark,

    Sorry for the delay I'm still working on this but ran into a number of problems.

    Question: with the AutoHotKey program what happens if you are not in the GCode editor control and push Ctrl-Down? Does it push all those buttons and do crazy things? Or even in a different Windows App?

    The first problem I ran into was that the Ctrl-F must be pushed when the GCode Editor control has focus. But I wanted to allow a Graphical Push button to be able to trigger the sequence and/or a Hot-Key for the button. But clicking a button takes the focus away from the GCode and puts focus on the button.

    I was able to add a method to set the focus back to the GCode Editor. But in Windows when focus is set on an edit control all the contents are automatically selected. This looses where the cursor originally was. I was able to solve this with a special loose focus/gain focus handler to save and restore the current selection. BTW I think this is a minor problem with the AutoHotKey method also. Where you mouse click in the Editor, before or after an M6, will influence where the search takes you.

    Another problem is that I wanted to have this also work for Troy's situation where he wanted to do things like push F9 for Spindle On CW from a KFLOP initiated command. That works fine except if another Windows App is active instead of KMotionCNC. So if you are working in KMotion.exe or Notepad.exe pushing Troy's Spindle On CW physical button wouldn't work, and the other app might respond to F9 and do something odd.

    I thought it would be easy to just Activate KMotionCNC then send the keystroke. But Microsoft basically forbids any App from making itself Active. I guess the concern is that someone might be typing an email and all of a sudden their keystrokes start going to a different application.

    So I'm starting to think all this Auto Keyboard stuff is a bad idea. But I haven't given up just yet. If anyone has some ideas I'm open.
    TK
    http://dynomotion.com

  15. #15
    Join Date
    May 2012
    Posts
    537

    Re: G code viewer questions...

    Quote Originally Posted by TomKerekes View Post
    Hi Mark,

    Sorry for the delay I'm still working on this but ran into a number of problems.

    Question: with the AutoHotKey program what happens if you are not in the GCode editor control and push Ctrl-Down? Does it push all those buttons and do crazy things? Or even in a different Windows App?
    Hi Tom,

    If I push Ctrl-down without g code editor active, yes it does do all sorts of crazy things. I didn't think of that, good point. Its looks to be easy to add conditional statements to check if kmotioncnc is active in autohotkey. Not sure if this applies to how your programming kmotioncnc, but in Autohotkey something like this could be used:

    ; Untitled - Notepad
    #IfWinActive Untitled - Notepad
    !q::
    MsgBox, You pressed ALT+Q in Notepad.
    return

    ; Any window that isn't Untitled - Notepad
    #IfWinActive
    !q::
    MsgBox, You pressed ALT+Q in any window.
    return

    Mode details on this WinActive command here: https://www.autohotkey.com/docs/misc/WinTitle.htm

    Also, if it were done from a graphical push button this wouldn't this be enough to ensure kmotioncnc is active since you just clicked it?

    The first problem I ran into was that the Ctrl-F must be pushed when the GCode Editor control has focus. But I wanted to allow a Graphical Push button to be able to trigger the sequence and/or a Hot-Key for the button. But clicking a button takes the focus away from the GCode and puts focus on the button.

    I was able to add a method to set the focus back to the GCode Editor. But in Windows when focus is set on an edit control all the contents are automatically selected. This looses where the cursor originally was. I was able to solve this with a special loose focus/gain focus handler to save and restore the current selection. BTW I think this is a minor problem with the AutoHotKey method also. Where you mouse click in the Editor, before or after an M6, will influence where the search takes you.
    Sounds like another major problem, but you have a work around which is great. The minor problem you mention is the next tool button taking you to a line your already on if cursor is before m6? No big deal if you have to click it twice. Pretty sure the mastercam editor worked that way too. Still much faster then the whole sequence of right clicking and using find, typing m06 etc.

    Another problem is that I wanted to have this also work for Troy's situation where he wanted to do things like push F9 for Spindle On CW from a KFLOP initiated command. That works fine except if another Windows App is active instead of KMotionCNC. So if you are working in KMotion.exe or Notepad.exe pushing Troy's Spindle On CW physical button wouldn't work, and the other app might respond to F9 and do something odd.

    I thought it would be easy to just Activate KMotionCNC then send the keystroke. But Microsoft basically forbids any App from making itself Active. I guess the concern is that someone might be typing an email and all of a sudden their keystrokes start going to a different application.

    So I'm starting to think all this Auto Keyboard stuff is a bad idea. But I haven't given up just yet. If anyone has some ideas I'm open.
    Yeah seems like there are a few things that could go wrong there. Something like controlling the spindle is not something you want to play around with either. Imagine an emergency situation came up and first reaction was to hit spindle off button and it didnt work because calculator was open.

    But I dont see much problem with a graphical button you click (ensuring Kmotioncnc is active) sending some keystrokes to find next tool. Especially if you have a way of making the g-code editor active. Thanks again

    Mark

Similar Threads

  1. G-Code viewer for iPhone and iPad
    By aligator in forum News Announcements
    Replies: 0
    Last Post: 06-03-2014, 10:14 PM
  2. BiesseWorks Code viewer
    By James_4716 in forum Uncategorised CAM Discussion
    Replies: 3
    Last Post: 03-25-2014, 05:10 AM
  3. Anyone Know Of A Freeware G Code Viewer?
    By ljoe1969 in forum G-Code Programing
    Replies: 25
    Last Post: 07-01-2011, 08:08 PM
  4. Replies: 4
    Last Post: 05-06-2007, 02:56 AM
  5. G-code viewer (subroutine)
    By hao in forum G-Code Programing
    Replies: 1
    Last Post: 11-15-2006, 01:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •