Home › Forums › TinyG › TinyG Support › Communication issue with TinyG
- This topic has 19 replies, 4 voices, and was last updated 9 years, 5 months ago by cmcgrath5035.
-
AuthorPosts
-
May 21, 2015 at 7:16 pm #7728enheringMember
Hi!
I’ve been spending some time writing a program to control TinyG with a Shapeoko2 machine. The program is called YetAnotherGCodeSender, is open source and is placed in the repository below:
https://xp-dev.com/hg/YetAnotherGCodeSender
I decided to write it because I felt a need to control all the configuration options using existing programs. I also felt some difficulties in running existing software on a Mac. But I have not written anything for the graphics interface. The program is written in C++ and uses the nurses library to display data on the terminal and libxml2 to read configuration data from a xml file. I can build and run it in a Mac and in a RaspberryPi.
The actual state of the project is not mature, but I can position the spindle using the keyboard, turn it on and off, send configuration commands to the machine etc. Even a GCode text file can be sent to the controller and the machine obeys some of it quite well.
The problem I have now is related to the communication protocol. I’ll explain it below.
My serial communications library has three important commands: Write, ReadUntil and ReadUntilEmpty.
Some configuration commands I send return a text answer, so I believe I am expected to read that answer until a ‘\n’ character is received. I do it and it works quite well.
Other configuration commands I send return nothing, so my reading functions unblock only after timeout, which happen about 2 seconds after the read.
Some action commands return nothing, so I should not expect any answer from them unless I want to wait for long timeouts.
If I understood correctly, I should never send a {sr:} during the machining cycle. But I can send {qr:} during the cycle and wait for an answer.
Finally, if I set the machine to emit periodic status reports, I have no way of knowing when to read them. If I do that, at some time answers get mixed and messy.
To try to fix these problems I started to write to the serial port, wait for an answer and flush the buffer after that. Sometimes I get a reading timeout, other times it works well. But I cannot thrust this method.
If you have some time, can you please point out what am I doing wrong?
Thank you for your kind patience.
E. N. Hering
May 21, 2015 at 8:01 pm #7729enheringMemberSorry. I need to correct the text above:
I decided to write it because I felt a need to control all the configuration options and could not figure how to do it using existing programs.
- This reply was modified 9 years, 5 months ago by enhering.
May 22, 2015 at 7:55 am #7732cmcgrath5035ModeratorI’ll assume you have read (and re-read) the wiki at
Are you properly handling EEPROM delay whith parameter writes?
Your focus is setting up the configuration Parameters?
Have your seen this:(python, stand alone)Or, If in Chilipeppr, this:
May 22, 2015 at 8:40 pm #7735enheringMemberThanks for answering, cmcgrath5035!
I’ll assume you have read (and re-read) the wiki at
https://github.com/synthetos/TinyG/wiki/Tinyg-Communications-Programming
I did. Many times.
Are you properly handling EEPROM delay whith parameter writes?
I do a write and a read after that. The read operation usually returns 15.6ms after the parameter write. Do you think I should delay 30ms before doing a read operation?
Your focus is setting up the configuration Parameters?
No. I want a simple text mode way of controlling my cnc. I tried a few solutions and always ended finding a problem that could not be easily solved without a third person intervention. Some python solutions do not run easily on a Mac without minor fixes, for example. And I could not find how to send configuration parameters using ChiliPeppr until your answer came. I may not have tried enough, I confess.
The point is that now my work has advanced enough for me to feel comfortable using it. I have good logging facilities, a menu the way I want it to be and every possible option that I may need can be easily programmed into the code.
I would really like to know if there is a universal way of sending data to the tinyG and dealing with the answers it may, or may not send back to me. As I said before, my main problem is to know when to expect an answer and when not to.
I also do not understand how should I expect to read periodic status reports. Should I be always listening for them or there is a way of knowing that the TinyG has something to tell me?
Thanks a lot for your patience,
Eduardo.
May 23, 2015 at 8:40 am #7738cmcgrath5035ModeratorWhat you are attempting is beyond my experience, so I can only offer a few observations:
EEPROM write responses – I have seen response delays in the 18-80ms range to individual parameter writes, not sure why the large variation. My parameter writer is ‘synchronous’: Send the parameter, then wait for the response message before sending the next. A key issue is that during EEPROM writes, interrupts are blocked in the tinyG code, new write or read requests entering tinyG receive buffers may be garbled or completely lost.
Status reports can be returned on-demand (status request) and will be sent at Status Interval while a Gcode job is running. The content of messages varies with the verbosity settings and the Status report setup commands sent to tinyG.
I would really like to know if there is a universal way of sending data to the tinyG and dealing with the answers it may, or may not send back to me. As I said before, my main problem is to know when to expect an answer and when not to.
I believe the answer to your question is ‘yes’, as this could describe what Chilipeppr has built, with functionality split between SPJS and the tinyG and Serial Port Console widgets. That said, it is not a trivial task, to be sure.
May 23, 2015 at 7:36 pm #7739enheringMemberThanks for your answer, cmcgrath5035.
I am doing the same as you. I mean, I write a parameter and then expect an answer. This works fine for most parameters, but one or two of them usually timeout.
For the status reports, I have disabled the automatic ones and was sending {sr:} periodically during GCode sending, but that as you explained, produced many errors. If I turn the automatic reporting back on, I do not know when to expect them.
I will try to guess how other programmers did this before and solve for my case.
Thanks a lot for your kind attention.
May 24, 2015 at 7:26 am #7740cmcgrath5035ModeratorFor the status reports, I have disabled the automatic ones and was sending {sr:} periodically during GCode sending, but that as you explained, produced many errors. If I turn the automatic reporting back on, I do not know when to expect them.
Just a thought for your consideration: It is unclear from this thread how your implementation is handling GCode buffering, buffer fill and the like.
Commands sent while running a Gcode job are likely placed into the receive buffers and have to wait for their turn to be processed (with the exception of the Freehold command). Command execution is therefore difficult to predict as it depends on what Gcode is ahead of it.Good luck with your project.
May 24, 2015 at 4:59 pm #7741aldenMemberEduardo,
Thanks for posting your experience. I have some questions to diagnose this.
– Are you using the JSON protocol? It appears so, but I want to confirm.
– Which parameters time out? None of them should. Could it be that you are writing parameters when the queue is full? You can determine how many of the 254 bytes in the receive queue are available by requesting (rx:n}. It returns the number of available bytes.
As for SR’s, you should set up a listener for them and handle them when they come in. They are not synchronous commands such as request/response pairs. The normal communications is:
– Send request, get response almost immediately. Listen for SRs. Most people look for the stat:3, which means the machine has stopped.- This reply was modified 9 years, 5 months ago by alden.
May 24, 2015 at 8:11 pm #7743enheringMemberAlden,
Thank you for your help. Here are my answers:
– Are you using the JSON protocol? It appears so, but I want to confirm.
In fact I was sending the parameters as text and was getting a timeout on the junction acceleration. I was also getting a timeout on a G21 that I was sending, by mistake, in between the setup parameters.
Yesterday I changed the format of the parameters from text to JSON and removed the G21 from the group. Now the timeouts disappeared. I’m pasting part of the log below to show the answer times:
Sat-23.05.2015-22:32 (000.000574 s): (GCodeSender) Sent: {"st":1} Sat-23.05.2015-22:32 (000.047543 s): (GCodeSender) Received: {"r":{"st":1},"f":[1,0,9,9723]} Sat-23.05.2015-22:32 (000.000725 s): (GCodeSender) Sent: {"mt":10} Sat-23.05.2015-22:32 (000.047232 s): (GCodeSender) Received: {"r":{"mt":10},"f":[1,0,10,3997]} Sat-23.05.2015-22:32 (000.000714 s): (GCodeSender) Sent: {"ej":1} Sat-23.05.2015-22:32 (000.016154 s): (GCodeSender) Received: {"r":{"ej":1},"f":[1,0,9,2005]} Sat-23.05.2015-22:32 (000.000472 s): (GCodeSender) Sent: {"jv":1} Sat-23.05.2015-22:32 (000.047553 s): (GCodeSender) Received: {"r":{"jv":1},"f":[1,0,9,4386]} Sat-23.05.2015-22:32 (000.000485 s): (GCodeSender) Sent: {"js":1} Sat-23.05.2015-22:32 (000.015686 s): (GCodeSender) Received: {"r":{"js":1},"f":[1,0,9,93]} Sat-23.05.2015-22:32 (000.000383 s): (GCodeSender) Sent: {"tv":1} Sat-23.05.2015-22:32 (000.015605 s): (GCodeSender) Received: {"r":{"tv":1},"f":[1,0,9,4294]}
– Which parameters time out? None of them should. Could it be that you are writing parameters when the queue is full? You can determine how many of the 254 bytes in the receive queue are available by requesting (rx:n}. It returns the number of available bytes.
I’ll include this in my code now. Thank you for the suggestion. I’ll check the buffer availability before sending more code.
As for SR’s, you should set up a listener for them and handle them when they come in. They are not synchronous commands such as request/response pairs. The normal communications is:
– Send request, get response almost immediately. Listen for SRs. Most people look for the stat:3, which means the machine has stopped.I have a working JSON parser that looks for important parameters like the stat and the qr ones. The problem of setting up a listener is that it will timeout at some time, unless I increase the reporting frequency, but if I do that the report may come before the expected answer. I do not know if this is a real problem or not. I’ll try what you suggest and see how it works.
Regarding the last question asked by cmcgrath5035:
Just a thought for your consideration: It is unclear from this thread how your implementation is handling GCode buffering, buffer fill and the like.
Commands sent while running a Gcode job are likely placed into the receive buffers and have to wait for their turn to be processed (with the exception of the Freehold command). Command execution is therefore difficult to predict as it depends on what Gcode is ahead of it.I’m just testing the following procedure to avoid overfilling the planner buffer:
Open GCode file
–if not open yet;
If not EOF,
–Send a qr and get a number;
–If that number is greater than 10
—-Send a GCode line to TinyG;
Check for possible pause/resume keystrokes.This is a very naive approximation. I do not know if it will work fine yet. I’ll let you know if you wish.
Best regards and thanks again for your kind patience.
PS: The code I’m writing is open source and available through a Mercurial repository in the URL given above. I know it is quite boring to read other people’s codes, but it is there in case anybody gets curious. I’m doing my best to keep the repository updated with working code.
May 24, 2015 at 9:05 pm #7744enheringMemberI’m posting here the log file of my last try, in case you are interested in seeing how the answers from qr requests are coming:
This is the initialisation part:
Sun-24.05.2015-21:48 (000.000002 s): (GCodeSender) Starting GCodeSender. Sun-24.05.2015-21:48 (000.008025 s): (GCodeSender) Parsing config file Sun-24.05.2015-21:48 (000.015359 s): (GCodeSender) Serial port opened successfully Sun-24.05.2015-21:48 (000.001929 s): (GCodeSender) Serial port configured successfully.
This is the setup part:
Sun-24.05.2015-21:48 (003.-913145 s): (GCodeSender) Sent: {defa:1} Sun-24.05.2015-21:48 (002.555374 s): (GCodeSender) Received: {"r":{"fv":0.970,"fb":438.02,"hp":1,"hv":8,"id":"3X3566-GHM","msg":"Initializing configs t Sun-24.05.2015-21:48 (000.105622 s): (GCodeSender) Sent: {"ja":2000000} Sun-24.05.2015-21:48 (000.053070 s): (GCodeSender) Received: {"r":{"ja":2000000},"f":[1,0,15,558]} Sun-24.05.2015-21:48 (000.000559 s): (GCodeSender) Sent: {"st":1} Sun-24.05.2015-21:48 (000.049497 s): (GCodeSender) Received: {"r":{"st":1},"f":[1,0,9,9723]} Sun-24.05.2015-21:48 (000.000502 s): (GCodeSender) Sent: {"mt":10} Sun-24.05.2015-21:48 (000.045426 s): (GCodeSender) Received: {"r":{"mt":10},"f":[1,0,10,3997]} Sun-24.05.2015-21:48 (000.000486 s): (GCodeSender) Sent: {"ej":1} Sun-24.05.2015-21:48 (000.015483 s): (GCodeSender) Received: {"r":{"ej":1},"f":[1,0,9,2005]} Sun-24.05.2015-21:48 (000.000469 s): (GCodeSender) Sent: {"jv":1} Sun-24.05.2015-21:48 (000.048552 s): (GCodeSender) Received: {"r":{"jv":1},"f":[1,0,9,4386]} Sun-24.05.2015-21:48 (000.000478 s): (GCodeSender) Sent: {"js":1} Sun-24.05.2015-21:48 (000.015485 s): (GCodeSender) Received: {"r":{"js":1},"f":[1,0,9,93]} Sun-24.05.2015-21:48 (000.000434 s): (GCodeSender) Sent: {"tv":1} Sun-24.05.2015-21:48 (000.015581 s): (GCodeSender) Received: {"r":{"tv":1},"f":[1,0,9,4294]} Sun-24.05.2015-21:48 (000.000435 s): (GCodeSender) Sent: {"qv":0} Sun-24.05.2015-21:48 (000.015601 s): (GCodeSender) Received: {"r":{"qv":0},"f":[1,0,9,8355]} Sun-24.05.2015-21:48 (000.000482 s): (GCodeSender) Sent: {"sv":0} Sun-24.05.2015-21:48 (001.-952492 s): (GCodeSender) Received: {"r":{"sv":0},"f":[1,0,9,1603]} Sun-24.05.2015-21:48 (000.000484 s): (GCodeSender) Sent: {"si":1000} Sun-24.05.2015-21:48 (000.047522 s): (GCodeSender) Received: {"r":{"si":1000},"f":[1,0,12,6454]} Sun-24.05.2015-21:48 (000.000484 s): (GCodeSender) Sent: {"ec":1} Sun-24.05.2015-21:48 (000.047516 s): (GCodeSender) Received: {"r":{"ec":1},"f":[1,0,9,8653]} Sun-24.05.2015-21:48 (000.000535 s): (GCodeSender) Sent: {"ee":0} Sun-24.05.2015-21:48 (000.015415 s): (GCodeSender) Received: {"r":{"ee":0},"f":[1,0,9,533]} Sun-24.05.2015-21:48 (000.000450 s): (GCodeSender) Sent: {"ex":1} Sun-24.05.2015-21:48 (000.015589 s): (GCodeSender) Received: {"r":{"ex":1},"f":[1,0,9,2379]} Sun-24.05.2015-21:48 (000.000443 s): (GCodeSender) Sent: {"1ma":0} Sun-24.05.2015-21:48 (000.015546 s): (GCodeSender) Received: {"r":{"1ma":0},"f":[1,0,10,7975]} Sun-24.05.2015-21:48 (000.001141 s): (GCodeSender) Sent: {"1sa":1.8} Sun-24.05.2015-21:48 (000.014832 s): (GCodeSender) Received: {"r":{"1sa":1.800},"f":[1,0,12,328]} Sun-24.05.2015-21:48 (000.000464 s): (GCodeSender) Sent: {"1tr":40} Sun-24.05.2015-21:48 (000.047586 s): (GCodeSender) Received: {"r":{"1tr":40.0000},"f":[1,0,11,2474]} Sun-24.05.2015-21:48 (000.000481 s): (GCodeSender) Sent: {"1mi":8} Sun-24.05.2015-21:48 (000.015635 s): (GCodeSender) Received: {"r":{"1mi":8},"f":[1,0,10,7984]} Sun-24.05.2015-21:48 (000.000406 s): (GCodeSender) Sent: {"1po":1} Sun-24.05.2015-21:48 (000.047472 s): (GCodeSender) Received: {"r":{"1po":1},"f":[1,0,10,2653]} Sun-24.05.2015-21:48 (000.000496 s): (GCodeSender) Sent: {"1pm":0} Sun-24.05.2015-21:48 (000.047514 s): (GCodeSender) Received: {"r":{"1pm":0},"f":[1,0,10,1756]} Sun-24.05.2015-21:48 (000.000762 s): (GCodeSender) Sent: {"2ma":1} Sun-24.05.2015-21:48 (000.015311 s): (GCodeSender) Received: {"r":{"2ma":1},"f":[1,0,10,2463]} Sun-24.05.2015-21:48 (000.000486 s): (GCodeSender) Sent: {"2sa":1.8} Sun-24.05.2015-21:48 (000.015567 s): (GCodeSender) Received: {"r":{"2sa":1.800},"f":[1,0,12,2462]} Sun-24.05.2015-21:48 (000.000460 s): (GCodeSender) Sent: {"2tr":40} Sun-24.05.2015-21:48 (000.047611 s): (GCodeSender) Received: {"r":{"2tr":40.0000},"f":[1,0,11,2225]} Sun-24.05.2015-21:48 (000.001072 s): (GCodeSender) Sent: {"2mi":8} Sun-24.05.2015-21:48 (000.014846 s): (GCodeSender) Received: {"r":{"2mi":8},"f":[1,0,10,1658]} Sun-24.05.2015-21:48 (000.000434 s): (GCodeSender) Sent: {"2po":1} Sun-24.05.2015-21:48 (000.047615 s): (GCodeSender) Received: {"r":{"2po":1},"f":[1,0,10,6326]} Sun-24.05.2015-21:48 (000.001092 s): (GCodeSender) Sent: {"2pm":0} Sun-24.05.2015-21:48 (000.046963 s): (GCodeSender) Received: {"r":{"2pm":0},"f":[1,0,10,5429]} Sun-24.05.2015-21:48 (000.001069 s): (GCodeSender) Sent: {"3ma":2} Sun-24.05.2015-21:48 (000.015099 s): (GCodeSender) Received: {"r":{"3ma":2},"f":[1,0,10,3786]} Sun-24.05.2015-21:48 (000.000434 s): (GCodeSender) Sent: {"3sa":1.8} Sun-24.05.2015-21:48 (000.015281 s): (GCodeSender) Received: {"r":{"3sa":1.800},"f":[1,0,12,1432]} Sun-24.05.2015-21:48 (000.000389 s): (GCodeSender) Sent: {"3tr":2.116} Sun-24.05.2015-21:48 (000.048683 s): (GCodeSender) Received: {"r":{"3tr":2.1160},"f":[1,0,14,351]} Sun-24.05.2015-21:48 (000.001012 s): (GCodeSender) Sent: {"3mi":4} Sun-24.05.2015-21:48 (000.047628 s): (GCodeSender) Received: {"r":{"3mi":4},"f":[1,0,10,5239]} Sun-24.05.2015-21:48 (000.000336 s): (GCodeSender) Sent: {"3po":1} Sun-24.05.2015-21:48 (000.046837 s): (GCodeSender) Received: {"r":{"3po":1},"f":[1,0,10,0]} Sun-24.05.2015-21:48 (000.000465 s): (GCodeSender) Sent: {"3pm":0} Sun-24.05.2015-21:48 (000.047544 s): (GCodeSender) Received: {"r":{"3pm":0},"f":[1,0,10,9102]} Sun-24.05.2015-21:48 (000.000480 s): (GCodeSender) Sent: {"4ma":3} Sun-24.05.2015-21:48 (000.015490 s): (GCodeSender) Received: {"r":{"4ma":3},"f":[1,0,10,8273]} Sun-24.05.2015-21:48 (000.000464 s): (GCodeSender) Sent: {"4sa":1.8} Sun-24.05.2015-21:48 (000.015541 s): (GCodeSender) Received: {"r":{"4sa":1.800},"f":[1,0,12,402]} Sun-24.05.2015-21:48 (000.000456 s): (GCodeSender) Sent: {"4tr":360} Sun-24.05.2015-21:48 (000.015583 s): (GCodeSender) Received: {"r":{"4tr":360.0000},"f":[1,0,12,6186]} Sun-24.05.2015-21:48 (000.000414 s): (GCodeSender) Sent: {"4mi":8} Sun-24.05.2015-21:48 (000.015560 s): (GCodeSender) Received: {"r":{"4mi":8},"f":[1,0,10,9004]} Sun-24.05.2015-21:48 (000.000459 s): (GCodeSender) Sent: {"4po":0} Sun-24.05.2015-21:48 (000.015519 s): (GCodeSender) Received: {"r":{"4po":0},"f":[1,0,10,2859]} Sun-24.05.2015-21:48 (000.000460 s): (GCodeSender) Sent: {"4pm":0} Sun-24.05.2015-21:48 (000.047550 s): (GCodeSender) Received: {"r":{"4pm":0},"f":[1,0,10,9611]} Sun-24.05.2015-21:48 (000.000479 s): (GCodeSender) Sent: {"xam":1} Sun-24.05.2015-21:48 (000.015600 s): (GCodeSender) Received: {"r":{"xam":1},"f":[1,0,10,9624]} Sun-24.05.2015-21:48 (000.000507 s): (GCodeSender) Sent: {"xvm":1000} Sun-24.05.2015-21:48 (000.047447 s): (GCodeSender) Received: {"r":{"xvm":1000},"f":[1,0,13,9222]} Sun-24.05.2015-21:48 (000.000594 s): (GCodeSender) Sent: {"xfr":1000} Sun-24.05.2015-21:48 (000.047375 s): (GCodeSender) Received: {"r":{"xfr":1000},"f":[1,0,13,4533]} Sun-24.05.2015-21:48 (000.000526 s): (GCodeSender) Sent: {"xtn":0} Sun-24.05.2015-21:48 (001.-982913 s): (GCodeSender) Received: {"r":{"xtn":0.000},"f":[1,0,10,7295]} Sun-24.05.2015-21:48 (000.001149 s): (GCodeSender) Sent: {"xtm":400} Sun-24.05.2015-21:48 (000.045265 s): (GCodeSender) Received: {"r":{"xtm":400.000},"f":[1,0,12,3308]} Sun-24.05.2015-21:48 (000.000456 s): (GCodeSender) Sent: {"xjm":5000} Sun-24.05.2015-21:48 (000.047514 s): (GCodeSender) Received: {"r":{"xjm":5000},"f":[1,0,13,4786]} Sun-24.05.2015-21:48 (000.000430 s): (GCodeSender) Sent: {"xjh":10000} Sun-24.05.2015-21:48 (000.047688 s): (GCodeSender) Received: {"r":{"xjh":10000},"f":[1,0,14,9982]} Sun-24.05.2015-21:48 (000.000496 s): (GCodeSender) Sent: {"xjd":0.01} Sun-24.05.2015-21:48 (000.047521 s): (GCodeSender) Received: {"r":{"xjd":0.0100},"f":[1,0,13,9211]} Sun-24.05.2015-21:48 (000.000689 s): (GCodeSender) Sent: {"xsn":3} Sun-24.05.2015-21:48 (000.047273 s): (GCodeSender) Received: {"r":{"xsn":3},"f":[1,0,10,6373]} Sun-24.05.2015-21:48 (000.001257 s): (GCodeSender) Sent: {"xsx":2} Sun-24.05.2015-21:48 (000.047800 s): (GCodeSender) Received: {"r":{"xsx":2},"f":[1,0,10,8631]} Sun-24.05.2015-21:48 (000.001096 s): (GCodeSender) Sent: {"xsv":3000} Sun-24.05.2015-21:48 (000.046912 s): (GCodeSender) Received: {"r":{"xsv":3000},"f":[1,0,13,3987]} Sun-24.05.2015-21:48 (000.000984 s): (GCodeSender) Sent: {"xlv":100} Sun-24.05.2015-21:48 (000.014954 s): (GCodeSender) Received: {"r":{"xlv":100},"f":[1,0,12,1278]} Sun-24.05.2015-21:48 (000.000421 s): (GCodeSender) Sent: {"xlb":20} Sun-24.05.2015-21:48 (000.047586 s): (GCodeSender) Received: {"r":{"xlb":20.000},"f":[1,0,11,5738]} Sun-24.05.2015-21:48 (000.000457 s): (GCodeSender) Sent: {"xzb":3} Sun-24.05.2015-21:48 (000.047600 s): (GCodeSender) Received: {"r":{"xzb":3.000},"f":[1,0,10,3135]} Sun-24.05.2015-21:48 (000.000512 s): (GCodeSender) Sent: {"yam":1} Sun-24.05.2015-21:48 (000.015461 s): (GCodeSender) Received: {"r":{"yam":1},"f":[1,0,10,3298]} Sun-24.05.2015-21:48 (000.000876 s): (GCodeSender) Sent: {"yvm":1000} Sun-24.05.2015-21:48 (000.046952 s): (GCodeSender) Received: {"r":{"yvm":1000},"f":[1,0,13,5943]} Sun-24.05.2015-21:48 (000.000471 s): (GCodeSender) Sent: {"yfr":1000} Sun-24.05.2015-21:48 (000.047531 s): (GCodeSender) Received: {"r":{"yfr":1000},"f":[1,0,13,4418]} Sun-24.05.2015-21:48 (000.000479 s): (GCodeSender) Sent: {"ytn":0} Sun-24.05.2015-21:48 (000.015513 s): (GCodeSender) Received: {"r":{"ytn":0.000},"f":[1,0,10,6265]} Sun-24.05.2015-21:48 (000.000454 s): (GCodeSender) Sent: {"ytm":400} Sun-24.05.2015-21:48 (000.047538 s): (GCodeSender) Received: {"r":{"ytm":400.000},"f":[1,0,12,6223]} Sun-24.05.2015-21:48 (000.000475 s): (GCodeSender) Sent: {"yjm":5000} Sun-24.05.2015-21:48 (000.049175 s): (GCodeSender) Received: {"r":{"yjm":5000},"f":[1,0,13,4671]} Sun-24.05.2015-21:48 (000.001227 s): (GCodeSender) Sent: {"yjh":10000} Sun-24.05.2015-21:48 (000.045331 s): (GCodeSender) Received: {"r":{"yjh":10000},"f":[1,0,14,8952]} Sun-24.05.2015-21:48 (000.001008 s): (GCodeSender) Sent: {"yjd":0.01} Sun-24.05.2015-21:48 (000.046880 s): (GCodeSender) Received: {"r":{"yjd":0.0100},"f":[1,0,13,5757]} Sun-24.05.2015-21:48 (000.000473 s): (GCodeSender) Sent: {"ysn":3} Sun-24.05.2015-21:48 (000.047527 s): (GCodeSender) Received: {"r":{"ysn":3},"f":[1,0,10,47]} Sun-24.05.2015-21:48 (000.000460 s): (GCodeSender) Sent: {"ysx":2} Sun-24.05.2015-21:48 (000.047442 s): (GCodeSender) Received: {"r":{"ysx":2},"f":[1,0,10,9140]} Sun-24.05.2015-21:48 (000.000487 s): (GCodeSender) Sent: {"ysv":3000} Sun-24.05.2015-21:48 (000.047547 s): (GCodeSender) Received: {"r":{"ysv":3000},"f":[1,0,13,3872]} Sun-24.05.2015-21:48 (000.000638 s): (GCodeSender) Sent: {"ylv":100} Sun-24.05.2015-21:48 (000.015492 s): (GCodeSender) Received: {"r":{"ylv":100},"f":[1,0,12,3328]} Sun-24.05.2015-21:48 (000.000364 s): (GCodeSender) Sent: {"ylb":20} Sun-24.05.2015-21:48 (000.048670 s): (GCodeSender) Received: {"r":{"ylb":20.000},"f":[1,0,11,2284]} Sun-24.05.2015-21:48 (000.000996 s): (GCodeSender) Sent: {"yzb":3} Sun-24.05.2015-21:48 (001.-950410 s): (GCodeSender) Received: {"r":{"yzb":3.000},"f":[1,0,10,2105]} Sun-24.05.2015-21:48 (000.000500 s): (GCodeSender) Sent: {"zam":1} Sun-24.05.2015-21:48 (000.012704 s): (GCodeSender) Received: {"r":{"zam":1},"f":[1,0,10,6971]} Sun-24.05.2015-21:48 (000.000463 s): (GCodeSender) Sent: {"zvm":800} Sun-24.05.2015-21:48 (000.015567 s): (GCodeSender) Received: {"r":{"zvm":800},"f":[1,0,12,4554]} Sun-24.05.2015-21:48 (000.000461 s): (GCodeSender) Sent: {"zfr":800} Sun-24.05.2015-21:48 (000.019676 s): (GCodeSender) Received: {"r":{"zfr":800},"f":[1,0,12,7869]} Sun-24.05.2015-21:48 (000.000538 s): (GCodeSender) Sent: {"ztn":0} Sun-24.05.2015-21:48 (000.011463 s): (GCodeSender) Received: {"r":{"ztn":0.000},"f":[1,0,10,8399]} Sun-24.05.2015-21:48 (000.000622 s): (GCodeSender) Sent: {"ztm":40} Sun-24.05.2015-21:48 (000.047238 s): (GCodeSender) Received: {"r":{"ztm":40.000},"f":[1,0,11,4013]} Sun-24.05.2015-21:48 (000.000458 s): (GCodeSender) Sent: {"zjm":50} Sun-24.05.2015-21:48 (000.047540 s): (GCodeSender) Received: {"r":{"zjm":50},"f":[1,0,11,7847]} Sun-24.05.2015-21:48 (000.000475 s): (GCodeSender) Sent: {"zjh":1000} Sun-24.05.2015-21:48 (000.047528 s): (GCodeSender) Received: {"r":{"zjh":1000},"f":[1,0,13,3619]} Sun-24.05.2015-21:48 (000.000479 s): (GCodeSender) Sent: {"zjd":0.01} Sun-24.05.2015-21:48 (000.047529 s): (GCodeSender) Received: {"r":{"zjd":0.0100},"f":[1,0,13,2303]} Sun-24.05.2015-21:48 (000.000467 s): (GCodeSender) Sent: {"zsn":3} Sun-24.05.2015-21:48 (000.047525 s): (GCodeSender) Received: {"r":{"zsn":3},"f":[1,0,10,3720]} Sun-24.05.2015-21:48 (000.000449 s): (GCodeSender) Sent: {"zsx":2} Sun-24.05.2015-21:48 (000.047545 s): (GCodeSender) Received: {"r":{"zsx":2},"f":[1,0,10,2814]} Sun-24.05.2015-21:48 (000.000467 s): (GCodeSender) Sent: {"zsv":600} Sun-24.05.2015-21:48 (000.047612 s): (GCodeSender) Received: {"r":{"zsv":600},"f":[1,0,12,256]} Sun-24.05.2015-21:48 (000.000491 s): (GCodeSender) Sent: {"zlv":100} Sun-24.05.2015-21:48 (000.015417 s): (GCodeSender) Received: {"r":{"zlv":100},"f":[1,0,12,5378]} Sun-24.05.2015-21:48 (000.000469 s): (GCodeSender) Sent: {"zlb":20} Sun-24.05.2015-21:48 (000.047547 s): (GCodeSender) Received: {"r":{"zlb":20.000},"f":[1,0,11,8829]} Sun-24.05.2015-21:48 (000.000479 s): (GCodeSender) Sent: {"zzb":3} Sun-24.05.2015-21:48 (000.047528 s): (GCodeSender) Received: {"r":{"zzb":3.000},"f":[1,0,10,4239]} Sun-24.05.2015-21:48 (000.000469 s): (GCodeSender) Sent: {"aam":0} Sun-24.05.2015-21:48 (000.047534 s): (GCodeSender) Received: {"r":{"aam":0},"f":[1,0,10,145]} Sun-24.05.2015-21:48 (000.000491 s): (GCodeSender) Sent: {"avm":3600} Sun-24.05.2015-21:48 (000.048514 s): (GCodeSender) Received: {"r":{"avm":3600},"f":[1,0,13,2181]} Sun-24.05.2015-21:48 (000.000503 s): (GCodeSender) Sent: {"afr":3600} Sun-24.05.2015-21:48 (000.047589 s): (GCodeSender) Received: {"r":{"afr":3600},"f":[1,0,13,656]} Sun-24.05.2015-21:48 (000.000431 s): (GCodeSender) Sent: {"atn":-1} Sun-24.05.2015-21:48 (000.015638 s): (GCodeSender) Received: {"r":{"atn":-1.000},"f":[1,0,11,8801]} Sun-24.05.2015-21:48 (000.000885 s): (GCodeSender) Sent: {"atm":-1} Sun-24.05.2015-21:48 (000.015063 s): (GCodeSender) Received: {"r":{"atm":-1.000},"f":[1,0,11,8916]} Sun-24.05.2015-21:48 (000.000434 s): (GCodeSender) Sent: {"ajm":24000} Sun-24.05.2015-21:48 (000.047690 s): (GCodeSender) Received: {"r":{"ajm":24000},"f":[1,0,14,6200]} Sun-24.05.2015-21:48 (000.001179 s): (GCodeSender) Sent: {"ara":1} Sun-24.05.2015-21:48 (000.046726 s): (GCodeSender) Received: {"r":{"ara":1.000},"f":[1,0,10,3509]} Sun-24.05.2015-21:48 (000.000682 s): (GCodeSender) Sent: {"ajh":24000} Sun-24.05.2015-21:48 (000.047360 s): (GCodeSender) Received: {"r":{"ajh":24000},"f":[1,0,14,2785]} Sun-24.05.2015-21:48 (000.001156 s): (GCodeSender) Sent: {"ajd":0.1} Sun-24.05.2015-21:48 (000.046801 s): (GCodeSender) Received: {"r":{"ajd":0.1000},"f":[1,0,12,8937]} Sun-24.05.2015-21:48 (000.001113 s): (GCodeSender) Sent: {"asn":0} Sun-24.05.2015-21:48 (000.046696 s): (GCodeSender) Received: {"r":{"asn":0},"f":[1,0,10,5265]} Sun-24.05.2015-21:48 (000.000537 s): (GCodeSender) Sent: {"asx":2} Sun-24.05.2015-21:48 (001.-952565 s): (GCodeSender) Received: {"r":{"asx":2},"f":[1,0,10,6801]} Sun-24.05.2015-21:48 (000.000487 s): (GCodeSender) Sent: {"asv":6000} Sun-24.05.2015-21:48 (000.047656 s): (GCodeSender) Received: {"r":{"asv":6000},"f":[1,0,13,9728]} Sun-24.05.2015-21:48 (000.000391 s): (GCodeSender) Sent: {"alv":1000} Sun-24.05.2015-21:48 (000.047480 s): (GCodeSender) Received: {"r":{"alv":1000},"f":[1,0,13,3841]} Sun-24.05.2015-21:48 (000.001833 s): (GCodeSender) Sent: {"alb":5} Sun-24.05.2015-21:48 (000.014307 s): (GCodeSender) Received: {"r":{"alb":5.000},"f":[1,0,10,4297]} Sun-24.05.2015-21:48 (000.000406 s): (GCodeSender) Sent: {"azb":2} Sun-24.05.2015-21:48 (000.015609 s): (GCodeSender) Received: {"r":{"azb":2.000},"f":[1,0,10,9911]} Sun-24.05.2015-21:48 (000.000374 s): (GCodeSender) Sent: {"bam":0} Sun-24.05.2015-21:48 (000.015711 s): (GCodeSender) Received: {"r":{"bam":0},"f":[1,0,10,3818]} Sun-24.05.2015-21:48 (000.000567 s): (GCodeSender) Sent: {"bvm":3600} Sun-24.05.2015-21:48 (000.015392 s): (GCodeSender) Received: {"r":{"bvm":3600},"f":[1,0,13,2066]} Sun-24.05.2015-21:48 (000.000438 s): (GCodeSender) Sent: {"bfr":3600} Sun-24.05.2015-21:48 (000.015460 s): (GCodeSender) Received: {"r":{"bfr":3600},"f":[1,0,13,541]} Sun-24.05.2015-21:48 (000.000423 s): (GCodeSender) Sent: {"btn":0} Sun-24.05.2015-21:48 (000.047646 s): (GCodeSender) Received: {"r":{"btn":0.000},"f":[1,0,10,972]} Sun-24.05.2015-21:48 (000.000930 s): (GCodeSender) Sent: {"btm":-1} Sun-24.05.2015-21:48 (000.014875 s): (GCodeSender) Received: {"r":{"btm":-1.000},"f":[1,0,11,5462]} Sun-24.05.2015-21:48 (000.000488 s): (GCodeSender) Sent: {"bjm":20000000} Sun-24.05.2015-21:48 (000.015637 s): (GCodeSender) Received: {"r":{"bjm":20},"f":[1,0,17,5956]} Sun-24.05.2015-21:48 (000.000413 s): (GCodeSender) Sent: {"bra":1} Sun-24.05.2015-21:48 (000.015593 s): (GCodeSender) Received: {"r":{"bra":1.000},"f":[1,0,10,2479]} Sun-24.05.2015-21:48 (000.000439 s): (GCodeSender) Sent: {"cam":0} Sun-24.05.2015-21:48 (000.016574 s): (GCodeSender) Received: {"r":{"cam":0},"f":[1,0,10,7491]} Sun-24.05.2015-21:48 (000.000436 s): (GCodeSender) Sent: {"cvm":3600} Sun-24.05.2015-21:48 (000.015565 s): (GCodeSender) Received: {"r":{"cvm":3600},"f":[1,0,13,8786]} Sun-24.05.2015-21:48 (000.000377 s): (GCodeSender) Sent: {"cfr":3600} Sun-24.05.2015-21:48 (000.015506 s): (GCodeSender) Received: {"r":{"cfr":3600},"f":[1,0,13,7261]} Sun-24.05.2015-21:48 (000.000381 s): (GCodeSender) Sent: {"ctn":0} Sun-24.05.2015-21:48 (000.047744 s): (GCodeSender) Received: {"r":{"ctn":0.000},"f":[1,0,10,9941]} Sun-24.05.2015-21:48 (000.000533 s): (GCodeSender) Sent: {"ctm":-1} Sun-24.05.2015-21:48 (000.015454 s): (GCodeSender) Received: {"r":{"ctm":-1.000},"f":[1,0,11,2008]} Sun-24.05.2015-21:48 (000.000404 s): (GCodeSender) Sent: {"cjm":20000000} Sun-24.05.2015-21:48 (000.015591 s): (GCodeSender) Received: {"r":{"cjm":20},"f":[1,0,17,845]} Sun-24.05.2015-21:48 (000.000486 s): (GCodeSender) Sent: {"cra":1} Sun-24.05.2015-21:48 (000.015494 s): (GCodeSender) Received: {"r":{"cra":1.000},"f":[1,0,10,1449]} Sun-24.05.2015-21:48 (000.000413 s): (GCodeSender) Sent: {"p1frq":5000} Sun-24.05.2015-21:48 (000.047575 s): (GCodeSender) Received: {"r":{"p1frq":5000},"f":[1,0,15,8597]} Sun-24.05.2015-21:48 (000.000492 s): (GCodeSender) Sent: {"p1csl":0} Sun-24.05.2015-21:48 (000.047503 s): (GCodeSender) Received: {"r":{"p1csl":0},"f":[1,0,12,183]} Sun-24.05.2015-21:48 (000.000479 s): (GCodeSender) Sent: {"p1csh":10000} Sun-24.05.2015-21:48 (000.047444 s): (GCodeSender) Received: {"r":{"p1csh":10000},"f":[1,0,16,5892]} Sun-24.05.2015-21:48 (000.000496 s): (GCodeSender) Sent: {"p1cpl":0} Sun-24.05.2015-21:48 (000.047536 s): (GCodeSender) Received: {"r":{"p1cpl":0.000},"f":[1,0,12,9585]} Sun-24.05.2015-21:48 (000.000580 s): (GCodeSender) Sent: {"p1cph":1} Sun-24.05.2015-21:48 (000.047555 s): (GCodeSender) Received: {"r":{"p1cph":1.000},"f":[1,0,12,9314]} Sun-24.05.2015-21:48 (000.000988 s): (GCodeSender) Sent: {"p1pof":0} Sun-24.05.2015-21:48 (000.047052 s): (GCodeSender) Received: {"r":{"p1pof":0.000},"f":[1,0,12,6665]} Sun-24.05.2015-21:48 (000.000511 s): (GCodeSender) Sent: G21
This is the coordinate system manual (keyboard) offsetting part:
Sun-24.05.2015-21:48 (005.-488853 s): (GCodeSender) Sent: G28.2 X0 Y0 Z0 Sun-24.05.2015-21:48 (020.511523 s): (GCodeSender) Sent: G10 L2 P1 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.000381 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.191255 s): (GCodeSender) Sent: G10 L2 P1 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.000370 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-680779 s): (GCodeSender) Sent: G10 L2 P1 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.000445 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (003.511670 s): (GCodeSender) Sent: G10 L2 P1 X3.4 Y0 Z0 Sun-24.05.2015-21:48 (000.000379 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-496736 s): (GCodeSender) Sent: G10 L2 P1 X6.8 Y0 Z0 Sun-24.05.2015-21:48 (000.002152 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.430388 s): (GCodeSender) Sent: G10 L2 P1 X10.2 Y0 Z0 Sun-24.05.2015-21:48 (000.000392 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-144914 s): (GCodeSender) Sent: G10 L2 P1 X13.6 Y0 Z0 Sun-24.05.2015-21:48 (000.000435 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-375962 s): (GCodeSender) Sent: G10 L2 P1 X17 Y0 Z0 Sun-24.05.2015-21:48 (000.000383 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.583335 s): (GCodeSender) Sent: G10 L2 P1 X20.4 Y0 Z0 Sun-24.05.2015-21:48 (000.000355 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-399712 s): (GCodeSender) Sent: G10 L2 P1 X23.8 Y0 Z0 Sun-24.05.2015-21:48 (000.000588 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.622456 s): (GCodeSender) Sent: G10 L2 P1 X27.2 Y0 Z0 Sun-24.05.2015-21:48 (000.000406 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-455693 s): (GCodeSender) Sent: G10 L2 P1 X30.6 Y0 Z0 Sun-24.05.2015-21:48 (000.000444 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.415352 s): (GCodeSender) Sent: G10 L2 P1 X34 Y0 Z0 Sun-24.05.2015-21:48 (000.000374 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-720587 s): (GCodeSender) Sent: G10 L2 P1 X37.4 Y0 Z0 Sun-24.05.2015-21:48 (000.000368 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.271776 s): (GCodeSender) Sent: G10 L2 P1 X40.8 Y0 Z0 Sun-24.05.2015-21:48 (000.000444 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.255985 s): (GCodeSender) Sent: G10 L2 P1 X44.2 Y0 Z0 Sun-24.05.2015-21:48 (000.000420 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-713038 s): (GCodeSender) Sent: G10 L2 P1 X47.6 Y0 Z0 Sun-24.05.2015-21:48 (000.000387 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.295186 s): (GCodeSender) Sent: G10 L2 P1 X51 Y0 Z0 Sun-24.05.2015-21:48 (000.000366 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.304310 s): (GCodeSender) Sent: G10 L2 P1 X54.4 Y0 Z0 Sun-24.05.2015-21:48 (000.000440 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.278883 s): (GCodeSender) Sent: G10 L2 P1 X57.8 Y0 Z0 Sun-24.05.2015-21:48 (000.000454 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-624107 s): (GCodeSender) Sent: G10 L2 P1 X61.2 Y0 Z0 Sun-24.05.2015-21:48 (000.000371 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.439692 s): (GCodeSender) Sent: G10 L2 P1 X64.6 Y0 Z0 Sun-24.05.2015-21:48 (000.000387 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-632714 s): (GCodeSender) Sent: G10 L2 P1 X68 Y0 Z0 Sun-24.05.2015-21:48 (000.000442 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.383573 s): (GCodeSender) Sent: G10 L2 P1 X71.4 Y0 Z0 Sun-24.05.2015-21:48 (000.000430 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.480527 s): (GCodeSender) Sent: G10 L2 P1 X74.8 Y0 Z0 Sun-24.05.2015-21:48 (000.000409 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-625044 s): (GCodeSender) Sent: G10 L2 P1 X78.2 Y0 Z0 Sun-24.05.2015-21:48 (000.000411 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.503555 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y0 Z0 Sun-24.05.2015-21:48 (000.000443 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (002.-624143 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y3.4 Z0 Sun-24.05.2015-21:48 (000.000397 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.318882 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y6.8 Z0 Sun-24.05.2015-21:48 (000.000467 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.303546 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y10.2 Z0 Sun-24.05.2015-21:48 (000.000441 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-719937 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y13.6 Z0 Sun-24.05.2015-21:48 (000.000370 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.255049 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y17 Z0 Sun-24.05.2015-21:48 (000.000456 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.312302 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y20.4 Z0 Sun-24.05.2015-21:48 (000.000385 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-688373 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y23.8 Z0 Sun-24.05.2015-21:48 (000.000411 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.814583 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y27.2 Z0 Sun-24.05.2015-21:48 (000.000382 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-687535 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y30.6 Z0 Sun-24.05.2015-21:48 (000.000395 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.271426 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y34 Z0 Sun-24.05.2015-21:48 (000.000481 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.255454 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y37.4 Z0 Sun-24.05.2015-21:48 (000.000374 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.255227 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y40.8 Z0 Sun-24.05.2015-21:48 (000.000442 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-720557 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y44.2 Z0 Sun-24.05.2015-21:48 (000.000389 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.271674 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y47.6 Z0 Sun-24.05.2015-21:48 (000.000458 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.263968 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y51 Z0 Sun-24.05.2015-21:48 (000.000383 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-383954 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y54.4 Z0 Sun-24.05.2015-21:48 (000.000393 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.446736 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y57.8 Z0 Sun-24.05.2015-21:48 (000.000445 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-416485 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y61.2 Z0 Sun-24.05.2015-21:48 (000.000457 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.415400 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y64.6 Z0 Sun-24.05.2015-21:48 (000.000383 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (001.-687283 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y68 Z0 Sun-24.05.2015-21:48 (000.000419 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:48 (000.382764 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y71.4 Z0 Sun-24.05.2015-21:48 (000.000630 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-175895 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y74.8 Z0 Sun-24.05.2015-21:49 (000.000390 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (000.631177 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y78.2 Z0 Sun-24.05.2015-21:49 (000.000441 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-464699 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y81.6 Z0 Sun-24.05.2015-21:49 (000.000377 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-446928 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y85 Z0 Sun-24.05.2015-21:49 (000.000613 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (000.589625 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y88.4 Z0 Sun-24.05.2015-21:49 (000.000469 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-352563 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y91.8 Z0 Sun-24.05.2015-21:49 (000.000472 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (000.648012 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y95.2 Z0 Sun-24.05.2015-21:49 (000.000414 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-360313 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y98.6 Z0 Sun-24.05.2015-21:49 (000.000396 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-416654 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y102 Z0 Sun-24.05.2015-21:49 (000.000444 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (000.615120 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y105.4 Z0 Sun-24.05.2015-21:49 (000.000371 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-448331 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y108.8 Z0 Sun-24.05.2015-21:49 (000.000421 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.026188 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z0 Sun-24.05.2015-21:49 (000.000983 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.557001 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z3.4 Sun-24.05.2015-21:49 (000.000369 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-528697 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z6.8 Sun-24.05.2015-21:49 (000.000379 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-64385 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z10.2 Sun-24.05.2015-21:49 (000.000598 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-64633 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z13.6 Sun-24.05.2015-21:49 (000.001622 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.-209866 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z17 Sun-24.05.2015-21:49 (000.000425 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (001.007358 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z20.4 Sun-24.05.2015-21:49 (000.000477 s): (GCodeSender) Sent: G0 X0 Y0 Z0 Sun-24.05.2015-21:49 (000.712269 s): (GCodeSender) Sent: G10 L2 P1 X81.6 Y112.2 Z23.8 Sun-24.05.2015-21:49 (000.000380 s): (GCodeSender) Sent: G0 X0 Y0 Z0
And, finally, this is the file sending part:
Sun-24.05.2015-21:51 (143.-75383 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.019763 s): (GCodeSender) Received: {"r":{"qr":32},"f":[1,0,10,9617]} Sun-24.05.2015-21:51 (000.000566 s): (GCodeSender) Opening file: Sun-24.05.2015-21:51 (000.000306 s): (GCodeSender) ../tasks/owl.nc Sun-24.05.2015-21:51 (000.002833 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012289 s): (GCodeSender) Received: {"r":{"qr":32},"f":[1,0,10,9617]} Sun-24.05.2015-21:51 (000.001149 s): (GCodeSender) Sent: G21 Sun-24.05.2015-21:51 (000.002912 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.020937 s): (GCodeSender) Received: {"r":{},"f":[1,0,4,4397]} Sun-24.05.2015-21:51 (000.000466 s): (GCodeSender) Sent: M6 T1 Sun-24.05.2015-21:51 (000.002751 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.021825 s): (GCodeSender) Received: {"r":{},"f":[1,0,6,4399]} Sun-24.05.2015-21:51 (000.001040 s): (GCodeSender) Sent: G0X0.0000Y0.0000Z4.5010 Sun-24.05.2015-21:51 (000.003026 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.024726 s): (GCodeSender) Received: {"r":{},"f":[1,0,24,104]} Sun-24.05.2015-21:51 (000.000509 s): (GCodeSender) Sent: G0X27.4444Y-2.4930 Sun-24.05.2015-21:51 (000.003061 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012504 s): (GCodeSender) Received: {"r":{},"f":[1,0,19,78]} Sun-24.05.2015-21:51 (000.000456 s): (GCodeSender) Sent: G1Z-0.6943F50.0 Sun-24.05.2015-21:51 (000.002899 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012671 s): (GCodeSender) Received: {"r":{},"f":[1,0,16,75]} Sun-24.05.2015-21:51 (000.000420 s): (GCodeSender) Sent: G1F100.0 Sun-24.05.2015-21:51 (000.002797 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.021641 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000476 s): (GCodeSender) Sent: X-27.4444 Sun-24.05.2015-21:51 (000.002899 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012606 s): (GCodeSender) Received: {"r":{},"f":[1,0,10,69]} Sun-24.05.2015-21:51 (000.000465 s): (GCodeSender) Sent: X-28.1606Y-1.4872 Sun-24.05.2015-21:51 (000.002614 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012928 s): (GCodeSender) Received: {"r":{},"f":[1,0,18,77]} Sun-24.05.2015-21:51 (000.000436 s): (GCodeSender) Sent: X-28.4567Y-0.4930 Sun-24.05.2015-21:51 (000.002532 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.013020 s): (GCodeSender) Received: {"r":{},"f":[1,0,18,77]} Sun-24.05.2015-21:51 (000.000422 s): (GCodeSender) Sent: X28.2658 Sun-24.05.2015-21:51 (000.002696 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.023933 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000526 s): (GCodeSender) Sent: Y1.5070 Sun-24.05.2015-21:51 (000.002712 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.023933 s): (GCodeSender) Received: {"r":{},"f":[1,0,8,4401]} Sun-24.05.2015-21:51 (000.001264 s): (GCodeSender) Sent: X-28.4930 Sun-24.05.2015-21:51 (000.003002 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.011690 s): (GCodeSender) Received: {"r":{},"f":[1,0,10,69]} Sun-24.05.2015-21:51 (000.000509 s): (GCodeSender) Sent: Y3.5070 Sun-24.05.2015-21:51 (000.002975 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (001.-976607 s): (GCodeSender) Received: {"r":{},"f":[1,0,8,4401]} Sun-24.05.2015-21:51 (000.000531 s): (GCodeSender) Sent: X28.2658 Sun-24.05.2015-21:51 (000.002823 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.023636 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000497 s): (GCodeSender) Sent: Y5.5070 Sun-24.05.2015-21:51 (000.002971 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.023751 s): (GCodeSender) Received: {"r":{},"f":[1,0,8,4401]} Sun-24.05.2015-21:51 (000.001166 s): (GCodeSender) Sent: X-28.4930 Sun-24.05.2015-21:51 (000.003249 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.011440 s): (GCodeSender) Received: {"r":{},"f":[1,0,10,69]} Sun-24.05.2015-21:51 (000.000536 s): (GCodeSender) Sent: Y7.5070 Sun-24.05.2015-21:51 (000.004506 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.022647 s): (GCodeSender) Received: {"r":{},"f":[1,0,8,4401]} Sun-24.05.2015-21:51 (000.000482 s): (GCodeSender) Sent: X28.2658 Sun-24.05.2015-21:51 (000.002596 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.024167 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000534 s): (GCodeSender) Sent: Y9.5070 Sun-24.05.2015-21:51 (000.002844 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.023621 s): (GCodeSender) Received: {"r":{},"f":[1,0,8,4401]} Sun-24.05.2015-21:51 (000.000471 s): (GCodeSender) Sent: X-28.4930 Sun-24.05.2015-21:51 (000.003509 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012098 s): (GCodeSender) Received: {"r":{},"f":[1,0,10,69]} Sun-24.05.2015-21:51 (000.000470 s): (GCodeSender) Sent: Y11.5070 Sun-24.05.2015-21:51 (000.004809 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.020857 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000476 s): (GCodeSender) Sent: X28.2658 Sun-24.05.2015-21:51 (000.002725 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.024884 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000519 s): (GCodeSender) Sent: Y13.5070 Sun-24.05.2015-21:51 (000.002859 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.023327 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000495 s): (GCodeSender) Sent: X-28.4930 Sun-24.05.2015-21:51 (000.004818 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.010839 s): (GCodeSender) Received: {"r":{},"f":[1,0,10,69]} Sun-24.05.2015-21:51 (000.000438 s): (GCodeSender) Sent: Y15.5070 Sun-24.05.2015-21:51 (000.002799 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.023653 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000452 s): (GCodeSender) Sent: X28.2658 Sun-24.05.2015-21:51 (000.002763 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012899 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000404 s): (GCodeSender) Sent: Y17.5070 Sun-24.05.2015-21:51 (000.002873 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012573 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000508 s): (GCodeSender) Sent: X-28.4930 Sun-24.05.2015-21:51 (000.002883 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012720 s): (GCodeSender) Received: {"r":{},"f":[1,0,10,69]} Sun-24.05.2015-21:51 (000.000400 s): (GCodeSender) Sent: Y19.5070 Sun-24.05.2015-21:51 (000.002858 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.013761 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000506 s): (GCodeSender) Sent: X28.2658 Sun-24.05.2015-21:51 (000.002767 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012706 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000526 s): (GCodeSender) Sent: Y21.5070 Sun-24.05.2015-21:51 (000.002651 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012877 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.000401 s): (GCodeSender) Sent: X-28.4930 Sun-24.05.2015-21:51 (000.002864 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012717 s): (GCodeSender) Received: {"r":{},"f":[1,0,10,69]} Sun-24.05.2015-21:51 (000.000415 s): (GCodeSender) Sent: Y23.5070 Sun-24.05.2015-21:51 (000.002775 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.220683 s): (GCodeSender) Received: {"r":{"qr":4},"f":[1,0,10,2550]} Sun-24.05.2015-21:51 (000.002970 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012973 s): (GCodeSender) Received: {"r":{},"f":[1,0,9,4402]} Sun-24.05.2015-21:51 (000.003074 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (002.-305942 s): (GCodeSender) Received: {"r":{"qr":4},"f":[1,0,10,2550]} Sun-24.05.2015-21:51 (000.003590 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012254 s): (GCodeSender) Received: {"r":{"qr":4},"f":[1,0,10,2550]} Sun-24.05.2015-21:51 (000.003017 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.013149 s): (GCodeSender) Received: {"r":{"qr":4},"f":[1,0,10,2550]} Sun-24.05.2015-21:51 (000.003596 s): (GCodeSender) Sent: {"qr":""} Sun-24.05.2015-21:51 (000.012283 s): (GCodeSender) Received: {"r":{"qr":4},"f":[1,0,10,2550]} Sun-24.05.2015-21:51 (000.003039 s): (GCodeSender) Sent: {"qr":""}
The qr requests are not being answered to. When the answer comes qr is already 4 and the buffer is probably overfull. So I probably have to wait until I get a qr on the JSON answer before sending another line of GCode.
Thanks again for reading.
May 29, 2015 at 10:00 am #7762enheringMemberHi again!
Can you please shine some light on the problem below?
I’ve implemented a rx buffer availability checking before sending a command to TinyG, but sometimes it returns an error without any information about what happened:
Fri-29.05.2015-13:49 (000.003381 s): (GCodeSender) Sent: {"p1csh":10000} Fri-29.05.2015-13:49 (000.041353 s): (GCodeSender) Received: {"r":{"p1csh":10000},"f":[1,0,16,5892]} Fri-29.05.2015-13:49 (000.003148 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.005354 s): (GCodeSender) Received: {"r":{"rx":254},"f":[1,0,7,2570]} Fri-29.05.2015-13:49 (000.003084 s): (GCodeSender) Sent: {"p1cpl":0} Fri-29.05.2015-13:49 (000.040352 s): (GCodeSender) Received: {"r":{"p1cpl":0.000},"f":[1,0,12,9585]} Fri-29.05.2015-13:49 (000.003130 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.005208 s): (GCodeSender) Received: {"r":{"rx":254},"f":[1,0,7,2570]} Fri-29.05.2015-13:49 (000.003145 s): (GCodeSender) Sent: {"p1cph":1} Fri-29.05.2015-13:49 (000.040516 s): (GCodeSender) Received: {"r":{"p1cph":1.000},"f":[1,0,12,9314]} Fri-29.05.2015-13:49 (000.003065 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.005284 s): (GCodeSender) Received: {"r":{"rx":254},"f":[1,0,7,2570]} Fri-29.05.2015-13:49 (000.003055 s): (GCodeSender) Sent: {"p1pof":0} Fri-29.05.2015-13:49 (000.040359 s): (GCodeSender) Received: {"r":{"p1pof":0.000},"f":[1,0,12,6665]} Fri-29.05.2015-13:49 (000.003368 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.004980 s): (GCodeSender) Received: {"r":{"rx":254},"f":[1,0,7,2570]} Fri-29.05.2015-13:49 (000.003170 s): (GCodeSender) Sent: G21 Fri-29.05.2015-13:49 (013.060834 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.003453 s): (GCodeSender) Received: {"r":{},"f":[1,0,4,4397]} Fri-29.05.2015-13:49 (000.003071 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.005004 s): (GCodeSender) Received: {"r":{"rx":254},"f":[1,0,7,2570]} Fri-29.05.2015-13:49 (000.003129 s): (GCodeSender) Sent: G28.2 X0 Y0 Z0 Fri-29.05.2015-13:49 (015.-79402 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.003304 s): (GCodeSender) Received: {"r":{},"f":[1,0,15,74]} Fri-29.05.2015-13:49 (000.003716 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.005409 s): (GCodeSender) Received: {"r":{"rx":254},"f":[1,0,7,2570]} Fri-29.05.2015-13:49 (000.003260 s): (GCodeSender) Sent: G10 L2 P1 X3.6 Y0 Z0 Fri-29.05.2015-13:49 (000.003307 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.036814 s): (GCodeSender) Received: {"r":{},"f":[1,0,21,101]} Fri-29.05.2015-13:49 (000.003079 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.005708 s): (GCodeSender) Received: {"r":{"err":"{r"},"f":[1,108,3,7863]} Fri-29.05.2015-13:49 (000.003230 s): (GCodeSender) Sent: {rx:n} Fri-29.05.2015-13:49 (000.005013 s): (GCodeSender) Received:
Thank you for your patience.
Eduardo
May 29, 2015 at 11:53 am #7763cmcgrath5035ModeratorAs you can see, the WordPress tool make long and wide files very difficult to review.
Perhaps you could copy the content to a text file in a dropbox-like account and post a link. Here is a how-toMay 30, 2015 at 10:48 am #7771aldenMemberJudging from your output it looks like not all the characters are getting to the serial reader, or are being clobbered in the serial buffer due to some kind of problem. For example this exchange:
Sent: G10 L2 P1 X3.6 Y0 Z0
Sent: {rx:n}
Received: {“r”:{},”f”:[1,0,21,101]}
Sent: {rx:n}
Sent: {rx:n}
Received: {“r”:{“err”:”{r”},”f”:[1,108,3,7863]}If I read this correctly, what’s happening is that the sender sent the G10, then sent an rx:n immediately (before waiting for a response from the G10), then received the response from the G10, then sent another rx:n, then another, and finally received the response from the first rx:n which was mangled.
The error response indicates that of the first ‘{rx:n}\n’ only the ‘{r\n’ was received by the board (with the \n being the newline character). This is evidenced by the footer reporting that the line read 3 bytes – the ‘3’ is the number of bytes read by this command in the 3rd footer position, and the error response saying that it only say ‘{r’ and could not process it. Returning status code 108.
It’s a good idea to wait for a response from one command before sending the next. It may also be helpful to you to increase the JSON verbosity to max: {jv:5}. That way you can see what command was issued in the {r response – at least during debugging.
My take is that the system is in an unresponsive state after the G10, as it has to write to EEPROM. Waiting for the response will allow the write to complete. You might also try delaying your next send by at least 50 milliseconds, but waiting for a response is a better way to synchronize.
This is due to a flaw in the Xmega EEPROM write functions that force turning interrupts off while EEPROM is being written. So the serial interrupts may be off explaining the dropped characters from the rx:n request. This update window affects any command that writes to EEPROM, which is all configuration commands that write values (e.g. {xvm:1200}) and the G10 in Gcode, which is the only Gcode command that actually writes to persistent memory.
(Technically, these writes are deferred while the board is in a machining cycle, but since it was not in a machining cycle in your example the write occurred immediately after the G10 parameters were received).
Alden
May 30, 2015 at 10:59 pm #7773enheringMemberHi Alden!
I’d like to thank you and the moderator for your helpful comments. And to apologise for the long files.
I suspected I was writing too fast without waiting enough for the controller to answer the last request. But I was afraid of using a too long delay, so I never increased it above 30ms. I’ll try 50ms now.
But I could find another solution to the problem and the code is working fine without increasing that delay. To make it work I implemented the following procedures:
1 – I flush the serial port before I write anything;
2 – My write functions have a boolean parameter that specifies if the message requires an answer or not;
3 – If the written message requires an answer, the answer goes to the JSON parser;
4 – If the parser finds an ‘err’, it sets a flag and the message is retransmitted to the controller after a small delay;
5 – Before transmitting any message I check for the rx buffer size;
6 – When sending GCode instructions from a file, I first check the rx buffer, then I check the queue size, than I transmit the GCode;
7 – If the queue availability is 10 or less, I do not send any more GCode;
8 – I only send a qr after, at least, 50ms have passed from the last qr;
9 – I never expect answers from GCodes.In this way, I still get some errors and some empty reports, but the transmission is repeated until the parser gets a good answer. I hope the retransmission rate falls to zero when I increase the delay between two consecutive commands.
Now the best news is that the code is running on MacOS Yosemite and on a RaspberryPi. On the Pi I could run it through SSH. As the (poor, not mature) interface is in text mode, no unnecessary complexity was added to the program.
Thanks again for your kind attention.
May 31, 2015 at 10:23 am #7775cmcgrath5035ModeratorI highly suggest you go the extra mile (or two) and code your system to wait for a response rather than simply waiting longer. I have seen responses that take longer than 50ms on occasion, don’t know why.
It is also easier to debug, since you will have a better idea of where the communication actually stalled. -
AuthorPosts
- You must be logged in to reply to this topic.