Forum Replies Created
-
AuthorPosts
-
psykoMember
Thanks but as you may understand from my question, I’ve already read this part a lot.
The only fix I can think about now is to activate Xon/Xoff (filling the serial buffer) while still using the planner queue, which would be useless, since the advantages of using the planner queue is lost.
I’ll wait for your complete answer.
psykoMemberI don’t really understand how the handling of Xon and Xoff is impacting the way TinyG send me data.
By the wayI only rarely receive Xon and Xoff characters…psykoMemberRunning them synchronously is what I’m working on right now…
- This reply was modified 10 years, 10 months ago by psyko.
psykoMemberAlden,
Yes I’m using XON/XOFF. I already had issues before and manage to fix the issue. I already managed to send 40k line GCode file with no problem (but still having the SR issue. Since they’re only information, it’s not critical). If I’m the only one having the issue, it’s probably something wrong in my code, but I’d like to understand what.
When connecting, I’m requesting all the parameters to initialize my application internal state. So I call :
{"sr":""} {"1":""} {"2":""} {"3":""} {"4":""} {"x":""} {"y":""} {"z":""} {"a":""} {"b":""} {"c":""} {"sys":""}
But for some reason I don’t understand the last line is not complete. I randomly stop in the middle of the line. The total received byte usually is between 1300 and 1400.
My serial port creation (using rxtx in java) is like :
serialPort.setFlowControlMode( SerialPort.FLOWCONTROL_RTSCTS_IN | SerialPort.FLOWCONTROL_RTSCTS_OUT | SerialPort.FLOWCONTROL_XONXOFF_IN | SerialPort.FLOWCONTROL_XONXOFF_OUT ); serialPort.setRTS(true);
I already had a hard time to determine that the setRTS(true) was required.
While receiving bytes from the serial loop, I watch for Xon and Xoff character to change an internal CTS (like) flag. Maybe that’s not required with the flow control configured in the serial port… Not sure but the wiki confirm.The SR is the default filtered one…
Is there a chat we can talk on ? It could be faster if you have a bit of time.psykoMemberIt looks like it happen on very short jog operation or, when stopping close to the generation of a new status report. Below is a copy of my capturing software : (double dot are actually CR and LF)
Requête:03/01/2014 00:33:26.84964 (+7.8780 seconds) G1X-1000.0F150. Réponse:03/01/2014 00:33:26.91164 (+0.0156 seconds) {"r":{"gc":"G1X-1000.0F150","f":[1,0,15,4488]}}..{"sr":{"posx":-17.581,"vel":0.28,"stat":5}}..{"qr":27}..{"sr":{"posx":-17.774,"vel":125.14}}.. Requête:03/01/2014 00:33:26.33464 (+0.1716 seconds) !%. Réponse:03/01/2014 00:33:27.64664 (+0.3120 seconds) {"sr":{"posx":-18.677,"vel":4.41,"stat":6}}..{"sr"{"sr":{"vel":0.00,"stat":3}}..
- This reply was modified 10 years, 10 months ago by psyko.
psykoMemberStrangely, it seems to always be at the same command. Always a status report, with null/zero velocity.
It might be my code, but I don’t really know where to look.I cannot reproduce it with Coolterm. It looks like I’m sending data incorrectly, but it’s not 100% reproductible…
psykoMemberOk here is an example of a really simple issue. Sending an homing command on X and Y. The issue is on the last line.
{"r":{"gc":"G28.2X0Y0","f":[1,0,12,2883]}} {"sr":{"coor":0,"dist":1}} {"qr":28} {"qr":27} {"sr":{"posx":223.489,"vel":147.00,"stat":9}} {"sr":{"posx":223.852,"vel":588.00}} {"sr":{"posx":224.345,"vel":600.00}} {"sr":{"posx":224.845}} {"sr":{"posx":225.295}} {"sr":{"posx":225.794}} {"sr":{"posx":226.294}} {"sr":{"posx":226.794}} {"sr":{"posx":227.237,"vel":453.00}} {"sr":{"posx":227.385,"vel":12.00}} {"sr"{"sr":{"vel":0.00,"stat":3}}
$si parameter is at 50 ms.
Below are the several issues I had after playing with it for a couple of minutes. Mainly emulating jog command (G0X-1000 and then stopping and flushing with !%)
{"sr"{"sr":{"vel":0.00,"stat":3}} {"sr{"sr":{"vel":0.00,"stat":3}} {"sr"{"sr":{"vel":0.00,"stat":3}} {"sr":{{"sr":{"vel":0.00,"stat":3}} {"r":{"sys":{"fb":380.05,"fv":0.960,"hv":8,"id":"9H3583-PXN","ja":2540000,"ct":0.0254,"st":1,"mt":180,"ej":1,"{"sr":{"stat":3}}
psykoMemberHi alden, thanks for the answer.
The space in the response is simply a format issue. I’m using Free Serial Port Monitor (not the best software…) and the output format adds a lot of spaces and CR\NL. When removing them, space appeared. I do not have them in the communication.
Firmware parameters are :
“sys”:{“fb”:380.05,”fv”:0.96}
The board is a TinyG v7.I’ll reproduce the issue and give you the exact commands.
I cannot tell you if there is any delay, because it appears while sending a file, and I notice this while reading the log after finishing.
I’ll also try with cooltermright now.psykoMemberHello,
I managed to get the board working by flashing the xboot and reinstalling the firmware.
Thanks
psykoMemberOk I forgot to chose the device as ATxmega192A3…
psykoMemberOk I tried with AVR Studio 4 and got the error while trying to read fuses :
“The selected device does not support ISP programming”
Is that normal ??
psykoMemberHello,
I received my AVRISP mkII
What is the software displayed in the screenshot and where can I download it ?Thanks
psykoMemberHello,
Thanks for the answer. I do not have the AVRISP MKII programmer. I think I’ll buy one because it’s always useful. I live in France so I’m afraid the shipping cost will be more than the price of a programmer…
psykoMemberHello,
I tried to reinstall the firmware, but avrdude cannot connect to the programmer.
C:\Program Files\arduino-1.0.4>avrdude -p x192a3 -P com4 -c avr109 -b 115200 -U flash:w:tinyg.hex Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding C:\Program Files\arduino-1.0.4>
I’m under Windows 7, using board v7. I already did that before on this thread :
But can’t do it anymore…Any idea ?
- This reply was modified 11 years, 2 months ago by psyko.
psykoMemberThanks for the answer.
A missing status report is not a problem.
I was simply expecting the GCode commande confirmation {“r”:{“gc”:…}}.I’ll have to look for the fd parameter, but I can’t find it in the Wiki… Any link ?
thanks
-
AuthorPosts