PSC get position command
Peter Verkaik
Posts: 3,956
The psc manual states
Syntax: “!SCRSP” x $0D
Reply: x y z(where x is the channel number, and z:y is the value reported)
The basic stamp example in the manual says
SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCRSP", ch, CR]
SERIN Sdat, Baud, 1000, Init,[noparse][[/noparse]STR Buff\3]
DEBUG "Servo ", DEC buff(0), " ", HEX2 buff(1), " :", HEX2 buff(2), CR
which would indicate the position is y:z (and not z:y)
Can anyone tell what the correct byte order of the position value is?
regards peter
Syntax: “!SCRSP” x $0D
Reply: x y z(where x is the channel number, and z:y is the value reported)
The basic stamp example in the manual says
SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCRSP", ch, CR]
SERIN Sdat, Baud, 1000, Init,[noparse][[/noparse]STR Buff\3]
DEBUG "Servo ", DEC buff(0), " ", HEX2 buff(1), " :", HEX2 buff(2), CR
which would indicate the position is y:z (and not z:y)
Can anyone tell what the correct byte order of the position value is?
regards peter
Comments
the get position command returns the position
highbyte before the lowbyte, which is the reverse
order as stated in the manual. The example
in the manual is therefore correct.
regards peter