Welcome to Our Community

Some features disabled for guests. Register Today.

UGS Visualiser & Gcode Problems

Discussion in 'Control Software' started by Tobin, Jun 7, 2018.

  1. Tobin

    Tobin New
    Builder

    Joined:
    Sep 18, 2017
    Messages:
    12
    Likes Received:
    2
    Hello all, I am having a few problems with Universal Gcode Sender and was hoping someone might be able to help...

    UGS usually works fine for me, but occasionally I have a strange problem where I open a gcode file in UGS (v2.0 Nightly Build) and preview it using the visualiser. The model looks fine in the visualiser. I then connect to my CNC machine (Ooznest Workbee using xPro v3) and home it. If I then open the visualiser again, the model looks completely different, and does not cut correctly.

    I have attached two photos to show what the visualiser shows before and after connecting to the xPro v3. It is supposed to be a very basic rectangle cut in several steps of depth:

    Before connecting to xPro v3:
    UGS-visualiser-before-homing.png

    After connecting to xPro v3:
    UGS-visualiser-after-homing.png

    Does anyone have any idea what could be causing this? It appears like UGS interprets the gcode file differently after it has connected to the xPro v3. I presume when it connects, it gets some info from the machine which then causes it to interpret the gcode differently?

    Any help would be much appreciated.
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    I would get everything connected and homed before opening the file.
     
  3. Tobin

    Tobin New
    Builder

    Joined:
    Sep 18, 2017
    Messages:
    12
    Likes Received:
    2
    Hi David, thanks for your help.

    This is what I was doing originally. I was using the Sketchucam visualiser to preview it and it all looked fine. I then went to cut it in UGS and it cut wrong. It was at this point that I looked at the visualiser in UGS and realised it was different to Sketchucam. Then after lots of faffing I realised UGS and Sketchucam look the same until I connect to the machine, at which point UGS is wrong. Very odd!

    The other issue I am having is that UGS keeps going bananas and showing “Grbl 1.1” and sometime also listing all the parameters like it does when you first connect. It then throws an error and I have to rehome it. I presume this is the machine rebooting or something? I am using the bluebee Bluetooth module so wondered if the connection was dropping out. Oddly, it will often run the full gcode successfully, then go bananas once it has finished the cut. Any ideas?
     
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    2 ideas
    1 - UGS has a filter feature that is all too easy to activate. make sure that no codes are being filtered out by UGS.
    2 - you are seeing loss of connection and so GRBL is rebooting. this is very bad for machine tools. I had to ditch my Nextbook as controller because the USB connection is not stable, instead I now use an old i7 notebook running Ubuntu from an SD card since the odd sized HDD it takes died and replacements are more than the notebook!

    bluetooth, ugh, I don't trust it <-: (but i have a module and will try it someday :)
    can you try with a good USB cable instead and see what the result is? if it still drops then you have interference coming in from somewhere in the wiring, or maybe a power issue.

    also keep in mind bluetooth is 2.4GHz which Wifi also uses, so your cellphone and laptop are also sending out waves which might swamp the bluetooth receiver when you move around, like at the end of a job.
     
  5. Tobin

    Tobin New
    Builder

    Joined:
    Sep 18, 2017
    Messages:
    12
    Likes Received:
    2
    Thanks David some good ideas!

    Idea 1:
    I checked the code filtering bit in UGS called “Gcode Processor Configuration”. The only tick boxes that are selected are:

    Decimal truncator
    White space remover
    Command length processor

    There used to be loads of stuff already set up in the “Regular expression remover” section but I clicked “Restore defaults” and it removed it all. Is this correct that this section is blank?

    Idea 2:
    At the time, the laptop operating the Bluetooth connection was tethered by WiFi to my mobile phone so I could use web in the workshop so you might be correct about interference. I had half considered this and stopped using the Bluetooth mouse in case that was it, disabled Bluetooth on my phone, but never considered WiFi. I will try disabling Wifi stuff next time.

    From memory I never had issues with the USB cable so I think it is either the Bluetooth comms, or some sort of gcode processing error, maybe related to me “Restoring defaults”.

    Thanks again.

    PS Sketchucam is awesome, thank you so much for developing and sharing it, top job
     
  6. Tobin

    Tobin New
    Builder

    Joined:
    Sep 18, 2017
    Messages:
    12
    Likes Received:
    2
    Just to conclude this one I did find the solution. As David suggested the “Regular expressions remover” was filtering out certain lines of code. I eventually realised i only had myself to blame (as usual) - when UGS was throwing up errors I was randomly clicking Yes, No, or the X to close the error box that pops up. I must have occasionally been hitting OK which then adds that line to the filter and is ignored in the future.

    I presume the code is only run through the filter once connected to the CNC machine. Hence, the visualiser looked fine before connecting, but was missing certain cuts when visualised after connecting.

    Thanks David
     
    joe williams and sharmstr like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice