Home › Forums › TinyG › TinyG Support › Connected, but can't send Gcode files
- This topic has 6 replies, 2 voices, and was last updated 5 years, 6 months ago by S221B.
-
AuthorPosts
-
April 23, 2019 at 7:00 pm #11397S221BMember
I recently completed my machine, and I am having some software problems. First, the good news: I can connect reliably with CoolTerm, configured the machine, and have successfully cut a half dozen parts sending Gcode using CoolTerm. I successfully cut one part with Chilipeppr, but the wifi in my garage is spotty, so I really prefer an offline solution for a sender, which brings me to the puzzle:
I have tried both UGS (platform and classic) as well as CNCjs, and with both I am able to connect sucessfully – I know this because command-line Gcode entered manually works fine, I can home the machine and such. When I open a Gcode file with CNCjs, it shows up in the visualizer and looks fine, but when I try to send – nothing. The machine basically locks up with no motion, and I have to perform a reset.
With UGS, when I open a file, it reads as having zero lines of code. (These are the same files that I have used successfully with CoolTerm and Chilipeppr, so they seem not to be fundamentally corrupt.) I get nothing in the visualizer, and hitting send produces nothing. Interestingly, if I hit “edit Gcode” in UGS, all the code shows up, but it still does nothing.
I have tried both software flow control (Xon/Xoff) and hardware flow control (RTS/CTS) with both packages, and produced the same results.
I’m kind of baffled at this point. I can use the machine using CoolTerm, but a nicer interface would be great.
Other info: Windows 10 machine, TinyG version 8, firmware 440.2, running CNCjs windows app and both versions (classic/platform) of UGS.
Any clues would be greatly appreciated, thanks in advance for your help!
April 24, 2019 at 3:57 pm #11402cmcgrath5035ModeratorTry CNCjs with $ex=0. I believe CNCjs uses buffer fill for flow control, as does Chilipeppr. Be sure to reset tinyg (reset button on board) to ensure new parameters are active.
No UGS experience her, sorry
April 24, 2019 at 7:21 pm #11403S221BMemberThank you for your prompt reply, it is most appreciated.
I tried setting $ex to zero, resetting, and then connecting with CNCjs. The results were the same – I connected, homed the machine, did some manual moves with command-line G1’s, zeroed the machine with a G92 X0 Y0 Z0, loaded up a Gcode file, saw it in the visualizer, hit send…and nothing.
I *did* note that in this condition, the tinyG is unresponsive. Hitting pause and cancel on the CNCjs interface, however, returns the tinyG to a state where it will accept commands and return status. It’s as if CNCjs just kind of “stalls” when trying to send the file.
I also tried with UGS (both versions) and got the same result – it doesn’t seem to “see” the Gcode file, and reports it as having zero lines.
I am starting to think that perhaps the problem is in my Gcode files (in spite of the fact that they have worked fine with Chilipeppr and CoolTerm?) and I’m going to pore over them tonight…I’m generating all of my Gcode with Fusion360, using the regular tinyG post-processor.
Any other clues / suggestions / insights would be welcomed.
Thanks!
April 27, 2019 at 10:51 am #11407cmcgrath5035ModeratorOdd indeed.
CoolTerm is a very basic file dumper, using Hardware flow control typically (RTS/CTS).
Chilipeppr is quite the opposite, sending a series of init commands to tinyG to get the interface in sync on startup. You can see these init commands and responses streaming in the CP Serial Port console.DO you see any activity on the CNCjs console when the Gcode transfer starts up?
April 27, 2019 at 11:06 am #11408S221BMemberUPDATE: Problem seems to be solved.
I am posting this in hopes that it might help others in the future with a similar problem.
It appears that the source of the problem was not a flow control issue (as I initially suspected) nor a Gcode issue. Rather, it seems that CNCjs needs to have the tinyG set to “enable JSON mode”, and that mine was set to $ej=0 rather than $ej=1.
I connected to CNCjs as I had previously (incidentally, with the “hardware flow control” check box on, and TinyG set to $ex=2 to match) and initially had the same behavior as before – manual Gcode commands worked, but sending a file would just lock up and do nothing. (In answer to cncmcgrath’s previous question – no activity on the console during file transfer startup.)
I found that entering $ej=1 in the console window of CNCjs (switching the TinyG from text mode to JSON mode) magically enabled everything else (including sending a file) to operate properly. Interesting, this did not require a reset of the TinyG as the $ej property seems to be switchable during a session with no ill effects.
I have noted that, in spite of having changed this parameter in the console window, on power-off and reboot it defaults to $ej=0 or text mode.
For now, entering $ej=1 in the console window at the start of a CNCjs session seems like a minimal hassle, but I am a little puzzled why this change doesn’t seem to persist on reboot like all other config parameters.
I may try connecting with hardware flow control shut off (and $ex=0 on the TinyG) as an experiment later this weekend, as I am told that using hardware flow control is a less elegant method than software flow control. I will update this thread with the results when I do so.
Thanks for the help! I hope this thread is useful to others in the future.
April 27, 2019 at 3:16 pm #11409cmcgrath5035ModeratorHah, Sending $ej=1 is one of those init Items Chilipeppr sends.
CP SPJS does all communication with tinyG in JSON, translates text mode commands on the fly.
That way SPJS always receives JSON formatted status messages, which are quicker to parse.
You should be able to make $ej=1 stick.
Enter it via console, then reboot immediately.But, once it sticks, should you want to go back to text you will have to send “$ej=0” equivalent in JSON format.
I think you are better off leaving it =0 and change when running CNCjs.- This reply was modified 5 years, 7 months ago by cmcgrath5035.
May 5, 2019 at 5:23 pm #11412S221BMemberHi – one final update – I ran again with “enable hardware flow control” NOT checked on CNCjs, and with $ex=0 on the tinyG. Everything seems to work fine. From what I can tell, CNCjs just needs that init string ($ej=1) to get everything working fine. I can’t immediately tell a performance difference between “hardware flow control enabled” or “not enabled” modes, but I haven’t been cutting any really difficult parts, so perhaps the difference may be evident in a file with many short-duration moves that doesn’t show up in files with simple long-duration lines and arcs.
The take-away: if you can’t get CNCjs to work, ensure that you set $ej=1.
-
AuthorPosts
- You must be logged in to reply to this topic.