QP (Query Pulse Width) command only works sometimes

Greetings,

I’ve noticed that the QP command only seems to work for a short time after interacting with the servo at the position I’m trying to query.

For example, if I come back to LynxTerm after being idle for a while, all attempts to QP any of my servos returns nothing. However, if I then go and move a servo a bit and try QP on it again, it works. But, I still cannot QP any OTHER servo that did not recently move.

What gives?

Here’s an example of the broken output…
qp1 <-------Nothing came back
#1 P1000 <-------Gave a servo move command which works fine
qp1 <-------Try QP again
d <-------It worked! This is the output!

Thanks!

It’s important to note that this only seems to happen after long periods of inactivity. If I reboot the servo controller, it gets back into a state of working fine.

This is problematic for me because my robot sits idle for long periods of time.

Could be a longhaul bug in the firmware? Maybe a small memory leak causing large problems over time?

I don’t suppose we could get a copy of the firmware code anywhere…

After the time period is the green LED on the ssc-32 lit indicating it has reset? If you only close lynxterm, then reopen it and try the query, do you get the same result?

Sorry. I should have given more info to start…

I’m actually not sure if the green light was on or not because the last time I reproduced this, I was doing it remotely and did not have a view of the board. However, servo move commands were working fine so I’m guessing the controller was not reset.

Closing and re-opening lynxterm did indeed produce the same result. The problem also repro’s in my controller program so I’m guessing it’s not an issue with the software.

What is the power supply to the ssc-32? A momentary power interruption or low voltage condition on the ssc-32 will cause a reset, losing any previous servo position commands.

Power is coming from an iRobot Create switched Vpwr pin (battery voltage at 1.5 amps when the Create is ON) and then regulated with a switching voltage regulator down to 6 volts.

I’m pretty sure it’s not a power loss because I am able to MOVE the servos. The controller responds fine to move commands. It’s just QP that doesn’t work consistently. Also, I’m sure the Create is still on because it is responding to other commands and the battery is full (because it’s still docked).

Would losing previous servo position commands cause QP to not work? I think QP works even on servo indexes that have never been given a command because I can QP them all day long.

I’ll try again tomorrow after work and the problem should be back (after sitting a night and a day). Maybe I can watch the reset light in person and see what happens.

Oh btw, if you want to see my robot (DarwinBot) in action (When it’s working :slight_smile:) see below. You can see the SSC-32 mounted on the back when I turn it around. :slight_smile:

youtube.com/watch?v=KXblD__Z8ro

Well, as luck would have it, of course the issue is not happening again tonight after sitting for ~24 hours.

I guess I’ll revive this thread if it happens again.

Thanks!

Timing for receiving the query could be the issue. If you are close to a threshold of some sort… These timing values can be changed in the registers.