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,126 +212,75 @@ 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> 218 218 219 - This moves the servo toan angleof145.6degrees, 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.<divclass="wikimodel-emptyline"></div>216 +Example: #5D1456<cr> 220 220 221 - Largervaluesarepermittedandallowformulti-turnfunctionalityusingthe conceptofvirtual position(explainedabove).<divclass="wikimodel-emptyline"></div>218 +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. 222 222 223 - QueryPosition inDegrees(**QD**)<divclass="wikimodel-emptyline"></div>220 +Larger values are permitted and allow for multi-turn functionality using the concept of virtual position (explained above). 224 224 225 - Example: #5QD<cr>mightreturn*5QD132<cr><div class="wikimodel-emptyline"></div>222 +Query Position in Degrees (**QD**) 226 226 227 - Thismeansthe servois locatedat 13.2degrees.<divclass="wikimodel-emptyline"></div>224 +Example: #5QD<cr> might return *5QD132<cr> 228 228 229 -(% class="wikigeneratedid" id="H22.QueryTargetPositioninDegrees28QDT29" %) 230 -Query Target Position in Degrees (**QDT**)<div class="wikimodel-emptyline"></div> 226 +This means the servo is located at 13.2 degrees. 231 231 232 - Ex: #5QDT<cr> might return*5QDT6783<cr><divclass="wikimodel-emptyline"></div>228 +Query Target Position in Degrees (**QDT**) 233 233 230 +Ex: #5QDT<cr> might return *5QDT6783<cr> 231 + 234 234 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}} 237 237 238 238 ====== __(Relative) Move in Degrees (**MD**)__ ====== 239 239 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> 243 243 237 +Example: #5MD123<cr> 238 + 244 244 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}} 247 247 248 248 ====== __Wheel Mode in Degrees (**WD**)__ ====== 249 249 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> 253 253 254 - This command sets the servo to wheel mode where it will rotate in the desired direction at the selected speed. The exampleabove would have the servo rotate at90.0 degrees per second clockwise (assuming factory default configurations).<divclass="wikimodel-emptyline"></div>244 +Ex: #5WD90<cr> 255 255 256 - QueryWheelMode inDegrees(**QWD**)<divclass="wikimodel-emptyline"></div>246 +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). 257 257 258 - Ex: #5QWD<cr> might return*5QWD90<cr><divclass="wikimodel-emptyline"></div>248 +Query Wheel Mode in Degrees (**QWD**) 259 259 250 +Ex: #5QWD<cr> might return *5QWD90<cr> 251 + 260 260 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}} 263 263 264 264 ====== __Wheel Mode in RPM (**WR**)__ ====== 265 265 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> 269 269 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 maximumrpm cannot be set higher than its physical limit at a given voltage. The example above would have the servo rotate at40rpm clockwise (assuming factory default configurations).<divclass="wikimodel-emptyline"></div>257 +Ex: #5WR40<cr> 271 271 272 - QueryWheelMode inRPM(**QWR**)<divclass="wikimodel-emptyline"></div>259 +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). 273 273 274 - Ex: #5QWR<cr> might return*5QWR40<cr><divclass="wikimodel-emptyline"></div>261 +Query Wheel Mode in RPM (**QWR**) 275 275 263 +Ex: #5QWR<cr> might return *5QWR40<cr> 264 + 276 276 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}} 279 279 280 -====== __Positionin PWM (**P**)__======267 +====== ====== 281 281 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> 269 +====== __(Relative) Move in Degrees (**MD**)__ ====== 285 285 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> 271 +====== 272 +Example: #5M1500<cr> ====== 287 287 288 -Query Position in Pulse (**QP**)<div class="wikimodel-emptyline"></div> 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. ====== 289 289 290 -Example: #5QP<cr> might return *5QP2334<div class="wikimodel-emptyline"></div> 291 - 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}} 296 - 297 -====== __(Relative) Move in PWM (**M**)__ ====== 298 - 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> 302 - 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 325 ====== __Query Status (**Q**)__ ====== 326 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 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}} 280 +The status query describes what the servo is currently doing. The query returns an integer which must be looked up in the table below. 334 334 282 +Ex: #5Q<cr> might return *5Q6<cr>, which indicates the motor is holding a position. 283 + 335 335 |(% style="width:25px" %) |***Value returned (Q)**|**Status**|**Detailed description** 336 336 | |ex: *5Q0<cr>|0: Unknown|LSS is unsure / unknown state 337 337 | |ex: *5Q1<cr>|1: Limp|Motor driving circuit is not powered and horn can be moved freely ... ... @@ -349,12 +349,9 @@ 349 349 Send a Q1 command to know which limit has been reached (described below). 350 350 ))) 351 351 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}} 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. 357 357 303 + 358 358 |(% style="width:25px" %) |***Value returned (Q1)**|**Status**|**Detailed description** 359 359 | |ex: *5Q0<cr>|No limits have been passed|Nothing is wrong 360 360 | |ex: *5Q1<cr>|Current limit has been passed|Something cause the current to either spike, or remain too high for too long ... ... @@ -363,23 +363,17 @@ 363 363 364 364 ====== __Limp (**L**)__ ====== 365 365 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> 369 369 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}} 313 +Example: #5L<cr> 373 373 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 + 374 374 ====== __Halt & Hold (**H**)__ ====== 375 375 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> 379 379 320 +Example: #5H<cr> 321 + 380 380 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}} 383 383 384 384 == Motion Setup == 385 385