TinyG JSON Help

Home Forums TinyG TinyG Projects TinyG JSON Help

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #1918
    mvberg
    Member

    Hi Guys,

    First, thanks for all the hard work on this project!

    I am trying to send some JSON command to my TinyG, and I am getting error {15}

    tinyg[mm] ok> {“sr”:””}
    {15} Expected command letter: {SR}
    tinyg[mm] ok> {“si”:110}
    {15} Expected command letter: {SI110}
    tinyg[mm] ok> {“gc”:”?”}
    {15} Expected command letter: {GC}
    tinyg[mm] ok>

    When TinyG boots up it reports that it’s running version 0.92 “Crocs”

    #### TinyG 0.92 (build 326.06 – “Crocs”) ####
    Type h for help
    tinyg[mm] ok>

    Although when I send a “$” the version is reported as 0.90 (not sure if this matters)

    Profile 1.00 [P_1.00]
    Version 0.90 [V_0.90]

    I am using CoolTerm on Windows:

    Speed : 115200
    Bits : 8
    Parity : None
    Stop Bits : 1
    XON : True
    Terminal : Line Mode
    Enter Key: CR

    Full settings from TinyG: http://dl.dropbox.com/u/9541708/tiny_g_settings.txt

    I also tried sending the commands that tgFx sends on connect, but same results.

    Please let me know if I am doing something wrong, or if you need more info.

    Thank you!

    Mike

    #1919
    alden
    Member

    Actually, JSON was added in 0.93 ,Fanny Pack (release names are from bad fashion trends). You will need to upgrade. There’s info on the wiki about how to do this, but basically it involves an Atmel ISP MKII programmer and AVRstudio. Sorry if this was not clear.

    Alden

    #1920
    mvberg
    Member

    Good deal, thanks for the info.

    On another note, when sending a file via coolterm, my shapeoko seems to be stopping at the same point every time. Line #27 in gcode file below.

    One thing I can think of is that the file transfer is ignoring the XONXOFF flow control setting..

    I also ran the file using ril3y’s Swing app and actually got one line further, but it looks like there *could* be a serial communication issue looking at the console messages (http://dl.dropbox.com/u/9541708/tg_swing.jpg)

    I tried different USB ports, I’m running it from a AAO netbook, not sure if that could be a problem?

    Also, I’m supplying the 5+ from an Arduino, should that be sufficient?

    Using a 24v supply, I have no heat sinks but I have a 12v fan directly over the board.

    Sorry for all the newb questions but any ideas would be great!

    Gcode: http://dl.dropbox.com/u/9541708/boxes_gcode_circle.txt
    Console from Coolterm: http://dl.dropbox.com/u/9541708/cool_term_output.txt
    Result: http://dl.dropbox.com/u/9541708/tiny_g_shape.jpg
    Result w/ TG Swing: http://dl.dropbox.com/u/9541708/tiny_g_shape_2.jpg

    Thanks in advance

    Mike

    #1921
    mvberg
    Member

    Hey guys,

    I tried running the python app mentioned here: http://www.synthetos.com/forums/topic.php?id=232#post-448

    Got to the end of sending the same file as above – but seems like TG was ignoring a few commands in between.

    It looks like it skipped the line in question from the previous post but actually made it to the end.

    The TI chips are cool to the touch during the process (no where near the scald of the A4988)

    Render: http://dl.dropbox.com/u/9541708/nc_plot_gcode.jpg
    Console: http://dl.dropbox.com/u/9541708/tg_console.txt
    Result: http://dl.dropbox.com/u/9541708/tiny_g_shape_3.jpg

    #1922
    alden
    Member

    Your issue is noted. Let me get to a spot where I can test all your files and see if I can reproduce the problem. This may take me a few days, unfortunately. Looks like you are running 0.92 – Crocs. Can you please post all the gcode files you ran?

    Thanks

    Alden

    #1923
    alden
    Member

    I just ran the boxes_gcode_circle file and it completed fine. I was running Coolterm on Mac, with Xon/Xoff enabled. I got the entire box, circle and 114 degree. Just for yuks, can you try inserting a brief delay between lines in Coolterm? Say about 1 ms?

    Alden

    #1924
    Riley
    Keymaster

    The old swing app is very badly outdated. This was a first attempt. In fact I killed all of the old “legacy” stuff when tinyG consisted of 2 followers (Alden and I!) today.

    tgFX is what I want you guys to start using more and more. Its VERY MUCH still in heavy development. But this is what we are going with for use with TinyG. Currently we are testing and developing on Windows. However it WILL work eventually on LIN,WIN,OSX.

    The instructions here are a very very quickly cobbled together work in progress:
    http://www.synthetos.com/wiki/index.php?title=Projects:tgFX

    I AM SURE there will be issues with the install instructions but I am hoping you guys update the wiki or msg me and I will add to them.

    Again, this is coded for “Fanny Pack” anything else will not really be troubleshot. Not because I am a jerk 🙂 Just because TinyG’s JSON / Command interface has been in very much a HIGH state of flux.

    Let me know if I can help guys.

    Riley

    #1925
    mvberg
    Member

    Alden,

    When using a 1ms line delay, I get strange results, normally where the file would quit before, the z axis now moves super slowmo for about 2 seconds (when we should be drawing the last 4) and then jerks over and draws the degree.

    Image : http://dl.dropbox.com/u/9541708/ts_line_delay.jpg

    I attached a serial monitor to the port (http://www.serial-port-monitor.com/index.html), it looks like the all of the gcode is sent to the board right off the bat, not sure if this is normal?

    Here is what the app logs under ‘Write Request’ as soon as the file is sent (ran twice): http://dl.dropbox.com/u/9541708/serial_output.txt

    Is there anyway I can verify that the XON/XOFF is actually working or is it even necessary for a file this small?

    I am running the FTDI driver version 2.8.14.0 – tried it on multiple machines as well, both XP x32.

    Thanks for all the time!

    #1926
    mvberg
    Member

    Riley,

    I started out pulling the tgFx from GitHub, that’s what prompted my first post 🙂 Great work so far!

    I look forward to helping the development process along – just grabbed the AVRISP to upgrade to Fanny Pack.

    Mike

    #1927
    mvberg
    Member

    No idea if I am on the right track but this guys issue sounds very similar

    http://bbs.homeshopmachinist.net/archive/index.php/t-44851.html

    still reading through the thread but thought it may shed some light..

    When sending the file via CoolTerm (using 1ms line delay), the progress jumps to 67% off the bat, then to 100% when the shapeoko has just finished drawing the circle.

    #1928
    alden
    Member

    Do I take it that you are running Coolterm on Windows XP? The details of your configuration might be enlightening. Are you native, in a VM? What version CoolTerm? Let’s check to make sure you have XON enabled in the firmware – can you send your $$ config?

    You can verify XON/XOFF operation by looking at the XON/XOFF LED to see what’s happening. You can tell when XON/XOFF is working by looking at the GPIO port LED that is closest to the USB port. Note: this is not the RX/TX LEDS that are right next to the USB connector itself. It turns on when XOFF is issued (communications halted) and off again when communication resumes.

    We have found that the XON/XOFF implementation within TinyG works reliably – at least it’s entirely consistent and predictable at the board level. How well it works as an end-to-end system – however – depends on how the host terminal program handles it, which is usually by passing the control down to the drivers on the host. We believe that the FTDI drivers work well, but we haven’t tested every single combination! How the host program handles XON/XOFF can also vary. I have no problems running Coolterm from Mac OSX, and Riley runs it from his Windows machine. But beyond that we don’t have a good handle on how other host/driver combinations work.

    Given this variability, tgFX synchronizes on the responses. It uses the JSON interface, so you will need to complete your upgrade to 0.93. The current release candidate for 0.93 is build 338.05 which can be found in the edge branch.

    So the XON/XOFF issues should be a stopgap – once we get tgFX out and running we will be past the machine variability in XON/XOFF.

    #1929
    Riley
    Keymaster

    mvberg:

    “I started out pulling the tgFx from GitHub, that’s what prompted my first post 🙂 Great work so far! I look forward to helping the development process along – just grabbed the AVRISP to upgrade to Fanny Pack.”

    Very cool! So you said that the WHOLE gcode file is being sent at the start. This is 100% not correct (unless its a very very small file sub 256 chars). I think that XON is not turned on in TinyG / Coolterm. Make sure you have the latest version of coolterm also.

    I think from here. You need to get up to date on firmware 338.05. Once we are on the same build we can go forward and see what we can do to troubleshoot this.

    Riley

    #1930
    mvberg
    Member

    “Do I take it that you are running Coolterm on Windows XP? The details of your configuration might be enlightening. Are you native, in a VM? What version CoolTerm? Let’s check to make sure you have XON enabled in the firmware – can you send your $$ config?”

    Yes, as noted above, I have tried two PC’s both running Windows XP x32. Also, from my first post: Full settings from TinyG: http://dl.dropbox.com/u/9541708/tiny_g_settings.txt

    Running CoolTerm version 1.4.1 (build 162)

    Everything looks to be clearly enabled (XON wise) on both firmware and software. At this point, I will resort to upgrading the firmware and see if that will help at all.

    Mike

    #1931
    Riley
    Keymaster

    Another question I have is. Does this do this on ALL gcode files? Meaning stop at the same point in all of them? Or just this one file?

    Riley

    #1932
    mvberg
    Member

    Hey Riley,

    Thanks for the response – I ran this gcode using CoolTerm on XP

    http://dl.dropbox.com/u/9541708/hello_world_shape.txt
    http://dl.dropbox.com/u/9541708/shape_line_80.jpg

    ..it stops at line number 80, every time then jerks over and the machine goes OC (wanting to travel x & y way more than it should)

    It’s right before the arc in the h, TG actually prints this line.

    Reported Line: {24} Arc specification error: G3X-1.
    Full gcode line from file: G3 X-1.6859 Y0.1476 I-0.2729 J0.0036

    Latest settings: http://dl.dropbox.com/u/9541708/tinyg_latest_settings.txt

    It seems like XONXOFF is working ok here is the serial log

    http://dl.dropbox.com/u/9541708/request_view_shape.htm

    Note: I had to press reset on the TG to stop the ShapeOko from killing itself 🙂

    Anyway, got the AVRISP – hopefully I can find some time to upgrade this weekend! Just thought I would provide some more info in the mean time.

    Cheers

    Mike

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.