Changes for page LSS-PRO Communication Protocol
Last modified by Eric Nantel on 2024/09/06 14:52
Change comment: There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -212,75 +212,126 @@ 212 212 213 213 ====== __Position in Degrees (**D**)__ ====== 214 214 215 +{{html wiki="true" clean="false"}} 216 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 217 +Example: #5D1456<cr><div class="wikimodel-emptyline"></div> 215 215 216 - Example:#5D1456<cr>219 +This moves the servo to an angle of 145.6 degrees, where the center (0) position is centered. Negative values (ex. -176 representing -17.6 degrees) could also be used. A full circle would be from -1800 to 1800 degrees. A value of 2700 would be the same angle (absolute position) as -900, except the servo would move in a different direction. <div class="wikimodel-emptyline"></div> 217 217 218 - Thismovestheservotoan angleof145.6 degrees,wherethe center(0) positions centered.Negative values(ex. -176 representing-17.6 degrees)could also be used. A fullcirclewould be from -1800to1800 degrees. A valueof2700 would bethe same angle(absoluteposition)as -900,except the servo wouldmove inadifferentdirection.221 +Larger values are permitted and allow for multi-turn functionality using the concept of virtual position (explained above). <div class="wikimodel-emptyline"></div> 219 219 220 - Larger values arepermitted and allow for multi-turn functionalityusingtheconceptof virtualposition (explainedabove).223 +Query Position in Degrees (**QD**)<div class="wikimodel-emptyline"></div> 221 221 222 - QueryPositionin Degrees(**QD**)225 +Example: #5QD<cr> might return *5QD132<cr><div class="wikimodel-emptyline"></div> 223 223 224 - Example:#5QD<cr>mightreturn*5QD132<cr>227 +This means the servo is located at 13.2 degrees.<div class="wikimodel-emptyline"></div> 225 225 226 -This means the servo is located at 13.2 degrees. 229 +(% class="wikigeneratedid" id="H22.QueryTargetPositioninDegrees28QDT29" %) 230 +Query Target Position in Degrees (**QDT**)<div class="wikimodel-emptyline"></div> 227 227 228 - QueryTargetPositionin Degrees(**QDT**)232 +Ex: #5QDT<cr> might return *5QDT6783<cr><div class="wikimodel-emptyline"></div> 229 229 230 -Ex: #5QDT<cr> might return *5QDT6783<cr> 231 - 232 232 The query target position command returns the target virtual position during and after an action which results in a rotation of the servo horn. In the example above, the servo is rotating to a virtual position of 678.3 degrees. Should the servo not have a target position or be in wheel mode, it will respond with the last target position used. 235 +<div class="wikimodel-emptyline"></div></div></div> 236 +{{/html}} 233 233 234 234 ====== __(Relative) Move in Degrees (**MD**)__ ====== 235 235 240 +{{html wiki="true" clean="false"}} 241 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 242 +Example: #5MD123<cr><div class="wikimodel-emptyline"></div> 236 236 237 -Example: #5MD123<cr> 238 - 239 239 The relative move command causes the servo to read its current position and move the specified number of tenths of degrees in the corresponding position. For example if the servo is set to rotate CW (default) and an MD command of 123 is sent to the servo, it will cause the servo to rotate clockwise by 12.3 degrees. Negative commands would cause the servo to rotate in the opposite configured direction. 245 +<div class="wikimodel-emptyline"></div></div></div> 246 +{{/html}} 240 240 241 241 ====== __Wheel Mode in Degrees (**WD**)__ ====== 242 242 250 +{{html wiki="true" clean="false"}} 251 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 252 +Ex: #5WD90<cr><div class="wikimodel-emptyline"></div> 243 243 244 - Ex:#5WD90<cr>254 +This command sets the servo to wheel mode where it will rotate in the desired direction at the selected speed. The example above would have the servo rotate at 90.0 degrees per second clockwise (assuming factory default configurations).<div class="wikimodel-emptyline"></div> 245 245 246 - This command sets the servoto wheelmodewhereit will rotate inthedesired direction at theselectedspeed. The example abovewould have theservo rotate at 90.0 degreesper second clockwise (assuming factorydefaultconfigurations).256 +Query Wheel Mode in Degrees (**QWD**)<div class="wikimodel-emptyline"></div> 247 247 248 - QueryWheelModein Degrees(**QWD**)258 +Ex: #5QWD<cr> might return *5QWD90<cr><div class="wikimodel-emptyline"></div> 249 249 250 -Ex: #5QWD<cr> might return *5QWD90<cr> 251 - 252 252 The servo replies with the angular speed in degrees per second. A negative sign would indicate the opposite direction (for factory default a negative value would be counter clockwise). 261 +<div class="wikimodel-emptyline"></div></div></div> 262 +{{/html}} 253 253 254 254 ====== __Wheel Mode in RPM (**WR**)__ ====== 255 255 266 +{{html wiki="true" clean="false"}} 267 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 268 +Ex: #5WR40<cr><div class="wikimodel-emptyline"></div> 256 256 257 - Ex:#5WR40<cr>270 +This command sets the servo to wheel mode where it will rotate in the desired direction at the selected rpm. Wheel mode (a.k.a. "continuous rotation") has the servo operate like a geared DC motor. The servo's maximum rpm cannot be set higher than its physical limit at a given voltage. The example above would have the servo rotate at 40 rpm clockwise (assuming factory default configurations).<div class="wikimodel-emptyline"></div> 258 258 259 - This command sets the servoto wheelmodewhereit will rotate inthedesireddirection at the selected rpm. Wheel mode (a.k.a. "continuousrotation") hasthe servo operate like a geared DCmotor. Theservo'smaximum rpm cannotbe set higher than its physicallimit at a givenvoltage. The example above wouldhave the servo rotate at 40 rpm clockwise (assuming factory default configurations).272 +Query Wheel Mode in RPM (**QWR**)<div class="wikimodel-emptyline"></div> 260 260 261 -Q ueryWheelModeinRPM (**QWR**)274 +Ex: #5QWR<cr> might return *5QWR40<cr><div class="wikimodel-emptyline"></div> 262 262 263 -Ex: #5QWR<cr> might return *5QWR40<cr> 264 - 265 265 The servo replies with the angular speed in rpm. A negative sign would indicate the opposite direction (for factory default a negative value would be counter clockwise). 277 +<div class="wikimodel-emptyline"></div></div></div> 278 +{{/html}} 266 266 267 -====== ====== 280 +====== __Position in PWM (**P**)__ ====== 268 268 269 -====== __(Relative) Move in Degrees (**MD**)__ ====== 282 +{{html wiki="true" clean="false"}} 283 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 284 +Example: #5P2334<cr><div class="wikimodel-emptyline"></div> 270 270 271 -====== 272 -Example: #5M1500<cr> ====== 286 +The position in PWM pulses was retained in order to be backward compatible with the SSC-32 / 32U protocol. This relates the desired angle with an RC standard PWM signal and is further explained in the SSC-32 and [[SSC-32U manuals>>https://www.robotshop.com/media/files/pdf2/lynxmotion_ssc-32u_usb_user_guide.pdf#page=24]]. Without any modifications to configuration considered, and a ±90.0 degrees standard range where 1500 microseconds is centered, a PWM signal of 2334 would set the servo to 165.1 degrees. Valid values for P are [500, 2500]. Values outside this range are corrected / restricted to end points.<div class="wikimodel-emptyline"></div> 273 273 274 -(% class="wikigeneratedid" %) 275 -====== The relative move in PWM command causes the servo to read its current position and move by the specified number of PWM signal. For example if the servo is set to rotate CW (default) and an M command of 1500 is sent to the servo, it will cause the servo to rotate clockwise by 90 degrees. Negative PWM value would cause the servo to rotate in the opposite configured direction. ====== 288 +Query Position in Pulse (**QP**)<div class="wikimodel-emptyline"></div> 276 276 277 - ======__QueryStatus(**Q**)__======290 +Example: #5QP<cr> might return *5QP2334<div class="wikimodel-emptyline"></div> 278 278 292 +This command queries the current angular position in PWM "units". The user must take into consideration that the response includes any angular range and origin configurations in order to determine the actual angle. 293 +Valid values for QP are {-500, [500, 2500], -2500}. Values outside the [500, 2500] range are given a negative corresponding end point value to indicate they are out of bounds (note that if the servo is physically located at one of the endpoints, it may return a negative number if it is a fraction of a degree beyond the position). 294 +<div class="wikimodel-emptyline"></div></div></div> 295 +{{/html}} 279 279 280 - Thestatus query describes what the servo is currently doing. The query returnsan integer which must belookedupinthetablebelow.297 +====== __(Relative) Move in PWM (**M**)__ ====== 281 281 282 -Ex: #5Q<cr> might return *5Q6<cr>, which indicates the motor is holding a position. 299 +{{html wiki="true" clean="false"}} 300 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 301 +Example: #5M1500<cr><div class="wikimodel-emptyline"></div> 283 283 303 +The relative move in PWM command causes the servo to read its current position and move by the specified number of PWM signal. For example if the servo is set to rotate CW (default) and an M command of 1500 is sent to the servo, it will cause the servo to rotate clockwise by 90 degrees. Negative PWM value would cause the servo to rotate in the opposite configured direction. 304 +<div class="wikimodel-emptyline"></div></div></div> 305 +{{/html}} 306 + 307 +====== __Raw Duty-cycle Move (**RDM**)__ ====== 308 + 309 +{{html wiki="true" clean="false"}} 310 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 311 +Example: #5RDM512<cr><div class="wikimodel-emptyline"></div> 312 + 313 +The raw duty-cycle move command (or free move command) will rotate the servo at a specified duty cycle value in wheel mode (a.k.a. "continuous rotation") like a geared DC motor.<div class="wikimodel-emptyline"></div> 314 + 315 +The duty values range from 0 to 1023. Negative values will rotate the servo in the opposite direction (for factory default a negative value would be counter clockwise).<div class="wikimodel-emptyline"></div> 316 + 317 +Query Move in Duty-cycle (**QMD**)<div class="wikimodel-emptyline"></div> 318 + 319 +Example: #5QMD<cr> might return *5QMD512<div class="wikimodel-emptyline"></div> 320 + 321 +This command queries the raw duty-cycle move value. 512 value means that the motor is rotating at 50% duty-cycle. 322 +<div class="wikimodel-emptyline"></div></div></div> 323 +{{/html}} 324 + 325 +====== __Query Status (**Q**)__ ====== 326 + 327 +{{html wiki="true" clean="false"}} 328 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 329 +The status query describes what the servo is currently doing. The query returns an integer which must be looked up in the table below.<div class="wikimodel-emptyline"></div> 330 + 331 +Ex: #5Q<cr> might return *5Q6<cr>, which indicates the motor is holding a position.<div class="wikimodel-emptyline"></div> 332 +</div></div> 333 +{{/html}} 334 + 284 284 |(% style="width:25px" %) |***Value returned (Q)**|**Status**|**Detailed description** 285 285 | |ex: *5Q0<cr>|0: Unknown|LSS is unsure / unknown state 286 286 | |ex: *5Q1<cr>|1: Limp|Motor driving circuit is not powered and horn can be moved freely ... ... @@ -298,9 +298,12 @@ 298 298 Send a Q1 command to know which limit has been reached (described below). 299 299 ))) 300 300 301 -If a safety limit has been reached and exceeded, the LED will flash red and the servo will stop providing torque (no longer react to commands which cause the motor to rotate). In order to determine which limit has been reached, send a Q1 command. The servo must be RESET in order to return to normal operation, though if a limit is still detected (for example the servo is still too hot), it will revert back to Safe Mode. 352 +{{html wiki="true" clean="false"}} 353 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 354 +If a safety limit has been reached and exceeded, the LED will flash red and the servo will stop providing torque (no longer react to commands which cause the motor to rotate). In order to determine which limit has been reached, send a Q1 command. The servo must be RESET in order to return to normal operation, though if a limit is still detected (for example the servo is still too hot), it will revert back to Safe Mode.<div class="wikimodel-emptyline"></div> 355 +</div></div> 356 +{{/html}} 302 302 303 - 304 304 |(% style="width:25px" %) |***Value returned (Q1)**|**Status**|**Detailed description** 305 305 | |ex: *5Q0<cr>|No limits have been passed|Nothing is wrong 306 306 | |ex: *5Q1<cr>|Current limit has been passed|Something cause the current to either spike, or remain too high for too long ... ... @@ -309,17 +309,23 @@ 309 309 310 310 ====== __Limp (**L**)__ ====== 311 311 366 +{{html wiki="true" clean="false"}} 367 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 368 +Example: #5L<cr><div class="wikimodel-emptyline"></div> 312 312 313 -Example: #5L<cr> 370 +This action causes the servo to go "limp". The microcontroller will still be powered, but the motor will not. As an emergency safety feature, should the robot not be doing what it is supposed to or risks damage, use the broadcast ID to set all servos limp #254L<cr>. 371 +<div class="wikimodel-emptyline"></div></div></div> 372 +{{/html}} 314 314 315 -This action causes the servo to go "limp". The microcontroller will still be powered, but the motor will not. As an emergency safety feature, should the robot not be doing what it is supposed to or risks damage, use the broadcast ID to set all servos limp #254L<cr>. 316 - 317 317 ====== __Halt & Hold (**H**)__ ====== 318 318 376 +{{html wiki="true" clean="false"}} 377 +<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 378 +Example: #5H<cr><div class="wikimodel-emptyline"></div> 319 319 320 -Example: #5H<cr> 321 - 322 322 This command causes the servo to stop immediately and hold that angular position. It overrides whatever the servo might be doing at the time the command is received (accelerating, travelling, deccelerating, etc.) 381 +<div class="wikimodel-emptyline"></div></div></div> 382 +{{/html}} 323 323 324 324 == Motion Setup == 325 325