|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Sunday, February 27, 2011 1:07 AM
Posts: 8,
Visits: 38
|
|
| When using the servo command to position a servo, roughly every 3rd or 4th time I send a command I'll time out waiting for the response, sometimes I'll then receive a NACK, and most of the time the 3rd time will work. I get the same issue with SetIO, but only every once in a while. 75% of the time things work fine. Any suggestions? Can you tell me why setio would ever time out or nack? It seems like it is just sending a PWM signal to the servo, so I'm not sure why there' ever be much of a delay. I've got the timeout set to 5 seconds and I'm doing direct serial port communication (not using any of your .net libraries, etc.)
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| Hi Eric, Our Serializer .NET lib is sending the same commands down, and I don't recall it getting any NACKs. Double check the command strings you're sending down to make sure you're not sending an additional invisible character down, which would throw the parsing off. Can you type the commands in from PuTTY, and see the same behavior? If not, it is almost certainly your code that's speaking the protocol. Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Sunday, February 27, 2011 1:07 AM
Posts: 8,
Visits: 38
|
|
| I've been looking for race conditions or other issues that might be misformatting the command, and I'll continue, but I don't that is the issue. BTW I've seen this behavior on your old version of the board and the new one. What made me wonder about the setio command sending NACKs or timing out sometimes was this: When I look at the disassembled code for CommunicationTask.ProcessJob in the latest version of RoboticsConnection.Serializer.dll, I noticed that the code ignores NACK and timeout exceptions up to 3 times, thus I suspect these get masked in many situations for users of that library at least. See below. Any way you can check the firmware to see in what situations a NACK can come back from the setio command (outside of a malformed command string) or what could cause it to time out? [CODE REMOVED -- POSTED BELOW]
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Sunday, February 27, 2011 1:07 AM
Posts: 8,
Visits: 38
|
|
Oops, it looks like the code got munged when I posted it. Here's another try at it:private void ProcessJob(CommJobInfo jobInfo) { string s = jobInfo.Job.GenerateCommand(); string response = ""; uint num = 1; while (num <= 3) { try { this.SerialPortWriteLine(s); response = this.SerialPortReadLine(); if (response != "NACK") { break; } } catch (TimeoutException) { } num++; } if (num < 3) { jobInfo.Job.ProcessResponse(response); } }
|
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| Hi Eric, Yes, I will be glad to look into this. I'm leaving for vacation Monday morning, and will be gone all week. But I will look into this as soon as I get back. Yep, those NACKs would get filtered by the current .NET library wouldn't they...Thanks for the detailed debugging info...It always helps a ton!  I'll also get Ringo to start looking into it as well. Best Regards,
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| Hi Eric, I have verified that we see this behavior too. The .NET lib was masking the error. It seems to occur most often when servo commands are sent VERY frequently...I'll keep you posted on the fix.  Best Regards,
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| Eric, What firmware versions are you using? Thanks!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| Eric, We're still looking into this...The serializer seems to be getting corrupt commands, and we're trying to figure out if it's simply dropped characters, noise, or something else. I'll post more results, and hopefully a fix this weekend.  Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Sunday, February 27, 2011 1:07 AM
Posts: 8,
Visits: 38
|
|
| Sorry for the big delay in responding jason, I've had a whole bunch of work stuff going on and haven't been able to get back to the robot for a while. It's a little tricky to get the firmware ID at this point since my code doesn't have that built into it. Since you repro'd the problem, do you still need this? I can get it if you do. Also: is there a fix available yet?
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Sunday, February 27, 2011 1:07 AM
Posts: 8,
Visits: 38
|
|
|
|
|