Changes for page LSS Communication Protocol
Last modified by Eric Nantel on 2025/06/06 07:47
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 - Main.WebHome1 +lynxmotion:LSS - Overview (DEV).WebHome - Content
-
... ... @@ -39,7 +39,7 @@ 39 39 40 40 Results in the servo rotating from the current angular position to a pulse position of 1456 in 1263 milliseconds. 41 41 42 - Modifiedcommandsare commandpecific.42 +Action modifiers can only be used with certain commands. 43 43 ))) 44 44 45 45 ((( ... ... @@ -48,7 +48,7 @@ 48 48 49 49 == Configuration Commands == 50 50 51 -Configuration commands affect the servo's current session* but unlike action commands, configuration commands are written to EEPROM and are retained even if the servo loses power (therefore NOT session specific). Not all action commands have a corresponding configuration and vice versa. Certain configurations are retained for when the servo is used in RC model. More information can be found on the [[LSS - RC PWM page>>doc:LSS - RC PWM.WebHome]]. 51 +Configuration commands affect the servo's current session* but unlike action commands, configuration commands are written to EEPROM and are retained even if the servo loses power (therefore NOT session specific). Not all action commands have a corresponding configuration and vice versa. Certain configurations are retained for when the servo is used in RC model. More information can be found on the [[LSS - RC PWM page>>doc:LSS - Overview (DEV).LSS - RC PWM.WebHome]]. 52 52 53 53 1. Start with a number sign # (U+0023) 54 54 1. Servo ID number as an integer ... ... @@ -123,12 +123,12 @@ 123 123 | 9|Position in **D**egrees| D| QD| | | ✓| tenths of degrees (ex 325 = 32.5 degrees; 91 = 9.1 degrees)| 124 124 | 10|**W**heel mode in **D**egrees| WD| QWD| | | ✓| tenths of degrees per second (ex 248 = 24.8 degrees per second)| 125 125 | 11|**W**heel mode in **R**PM| WR| QWR| | | ✓| rpm| 126 -| 12|Max **S**peed in **D**egrees| SD| QSD| CSD| ✓| ✓| tenths of degrees per second (ex 248 = 24.8 degrees per second)|Add modifier "2" for instantaneous speed 127 -| 13|Max **S**peed in **R**PM| SR| QSR| CSR| ✓| ✓| rpm|Add modifier "2" for instantaneous speed 128 -| 14|**A**ngular **S**tiffness| AS| QAS| CAS| ✓| ✓|none| 126 +| 12|Max **S**peed in **D**egrees| SD| QSD| CSD| ✓| ✓| tenths of degrees per second (ex 248 = 24.8 degrees per second)|QSD: Add modifier "2" for instantaneous speed 127 +| 13|Max **S**peed in **R**PM| SR| QSR| CSR| ✓| ✓| rpm|QSR: Add modifier "2" for instantaneous speed 128 +| 14|**A**ngular **S**tiffness| AS| QAS| CAS| ✓| ✓|none|-4 to +4, but suggested values are between 0 to +4 129 129 | 15|//N/A (removed)//| | | | | | | 130 -| 16|**LED** Color| LED| QLED| CLED| ✓| ✓| none (integer from 1 to 8)|0=OFF 1=RED 2=GREEN 3= BLUE 4=YELLOW 5=CYAN 6= 7=MAGENTA,8=WHITE131 -| 17|**ID** #| ID| QID| CID| | ✓| none (integer from 0 to 250)|Note: ID 254 is a "broadcast" which all servos respond to130 +| 16|**LED** Color| LED| QLED| CLED| ✓| ✓| none (integer from 1 to 8)|0=OFF 1=RED 2=GREEN 3= BLUE 4=YELLOW 5=CYAN 6=MAGENTA, 7=WHITE 131 +| 17|**ID** #| | QID| CID| | ✓| none (integer from 0 to 250)|Note: ID 254 is a "broadcast" which all servos respond to 132 132 | 18|**B**aud rate| B| QB| CB| | ✓| none (integer)| 133 133 | 19|**G**yre direction (**G**)| G| QG| CG| ✓| ✓| none | Gyre / rotation direction where 1= CW (clockwise) -1 = CCW (counter-clockwise) 134 134 | 20|**F**irst Position (**P**ulse)| | QFP|CFP | ✓| ✓| none | ... ... @@ -139,10 +139,15 @@ 139 139 | 25|**F**irmware version| | QF| | | | none (integer)| 140 140 | 26|**Q**uery (general status)| | Q| | | ✓| none (integer from 1 to 8)| See command description for details 141 141 | 27|**V**oltage| | QV| | | ✓| tenths of volt (ex 113 = 11.3V; 92 = 9.2V)| 142 -| 28|**T**emperature| | QT| | | ✓| degrees Celsius| 142 +| 28|**T**emperature| | QT| | | ✓| degrees Celsius|Max temp before error: 85°C (servo goes limp) 143 143 | 29|**C**urrent| | QC| | | ✓| tenths of Amps (ex 2 = 0.2A)| 144 +| 30|**RC** Mode| | |CRC| |✓| |((( 145 +CRC: Add modifier "1" for RC-position mode. 146 +CRC: Add modifier "2" for RC-wheel mode. 147 +Any other value for the modifier results in staying in smart mode. 148 +Puts the servo into RC mode. To revert to smart mode, use the button menu. 149 +))) 144 144 | | | | | | | | | 145 -| | | | | | | | | 146 146 147 147 = Details = 148 148 ... ... @@ -232,10 +232,10 @@ 232 232 233 233 Query Position in Pulse (**QP**) 234 234 235 -Example: #5QP<cr> might return *5QP 240 +Example: #5QP<cr> might return *5QP2334 236 236 237 237 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. 238 -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. 243 +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). 239 239 240 240 __9. Position in Degrees (**D**)__ 241 241 ... ... @@ -247,8 +247,10 @@ 247 247 248 248 Query Position in Degrees (**QD**) 249 249 250 -Example: #5QD<cr> might return *5QD 0<cr>255 +Example: #5QD<cr> might return *5QD132<cr> 251 251 257 +This means the servo is located at 13.2 degrees. 258 + 252 252 __10. Wheel Mode in Degrees (**WD**)__ 253 253 254 254 Ex: #5WD900<cr> ... ... @@ -371,7 +371,7 @@ 371 371 372 372 Configure LED Color (**CLED**) 373 373 374 -Configuring the LED color via the CLED command sets the startup color of the servo after a reset or power cycle. 381 +Configuring the LED color via the CLED command sets the startup color of the servo after a reset or power cycle. Note that it also changes the session's LED color immediately as well. 375 375 376 376 __17. Identification Number__ 377 377 ... ... @@ -379,13 +379,13 @@ 379 379 380 380 Query Identification (**QID**) 381 381 382 -EX: #QID<cr> might return *QID5<cr> 389 +EX: #254QID<cr> might return *QID5<cr> 383 383 384 -When using the query ID command, it is best to only have one servo connected and thus receive only one reply. 391 +When using the query ID command, it is best to only have one servo connected and thus receive only one reply using the broadcast command (ID 254). Alternatively, pushing the button upon startup and temporarily setting the servo ID to 255 will still result in the servo responding with its "real" ID. 385 385 386 386 Configure ID (**CID**) 387 387 388 -Ex: #CID5<cr> 395 +Ex: #4CID5<cr> 389 389 390 390 Setting a servo's ID in EEPROM is done via the CID command. All servos connected to the same serial bus will be assigned that ID. In most situations each servo must be set a unique ID, which means each servo must be connected individually to the serial bus and receive a unique CID number. It is best to do this before the servos are added to an assembly. Numbered stickers are provided to distinguish each servo after their ID is set, though you are free to use whatever alternative method you like. 391 391 ... ... @@ -426,23 +426,23 @@ 426 426 427 427 __20. First / Initial Position (pulse)__ 428 428 429 -In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for s erialmode only.436 +In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for smart mode only. 430 430 431 431 Query First Position in Pulses (**QFP**) 432 432 433 433 Ex: #5QFP<cr> might return *5QFP1550<cr> 434 434 435 -The reply above indicates that servo with ID 5 has a first position pulse of 1550 microseconds. 442 +The reply above indicates that servo with ID 5 has a first position pulse of 1550 microseconds. If no first position has been set, servo will respond with DIS ("disabled"). 436 436 437 -Configure First Position in Pulses (CFP) 444 +Configure First Position in Pulses (**CFP**) 438 438 439 439 Ex: #5CP1550<cr> 440 440 441 -This configuration command means the servo, when set to RC mode, will immediately move to an angle equivalent to having received an RC pulse of 1550 microseconds upon power up. Sending a CFP command without a number results in the servo remaining limp upon power up. 448 +This configuration command means the servo, when set to RC mode, will immediately move to an angle equivalent to having received an RC pulse of 1550 microseconds upon power up. Sending a CFP command without a number results in the servo remaining limp upon power up (i.e. disabled). 442 442 443 443 __21. First / Initial Position (Degrees)__ 444 444 445 -In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for s erialmode only.452 +In certain cases, a user might want to have the servo move to a specific angle upon power up. We refer to this as "first position". The factory default has no first position value stored in EEPROM and therefore upon power up, the servo remains limp until a position (or hold command) is assigned. FP and FD are different in that FP is used for RC mode only, whereas FD is used for smart mode only. 446 446 447 447 Query First Position in Degrees (**QFD**) 448 448 ... ... @@ -454,7 +454,7 @@ 454 454 455 455 Ex: #5CD64<cr> 456 456 457 -This configuration command means the servo, when set to s erialmode, will immediately move to 6.4 degrees upon power up. Sending a CFD command without a number results in the servo remaining limp upon power up.464 +This configuration command means the servo, when set to smart mode, will immediately move to 6.4 degrees upon power up. Sending a CFD command without a number results in the servo remaining limp upon power up. 458 458 459 459 __22. Query Target Position in Degrees (**QDT**)__ 460 460 ... ... @@ -484,7 +484,7 @@ 484 484 485 485 Ex: #5Q<cr> might return *5Q6<cr>, which indicates the motor is holding a position. 486 486 487 -|*Value returned ****|**Status**|**Detailed description**494 +|*Value returned|**Status**|**Detailed description** 488 488 |ex: *5Q0<cr>|Unknown|LSS is unsure 489 489 |ex: *5Q1<cr>|Limp|Motor driving circuit is not powered and horn can be moved freely 490 490 |ex: *5Q2<cr>|Free moving|Motor driving circuit is not powered and horn can be moved freely ... ... @@ -509,12 +509,24 @@ 509 509 510 510 The units are in tenths of degrees Celcius, so in the example above, the servo's internal temperature is 56.4 degrees C. To convert from degrees Celcius to degrees Farenheit, multiply by 1.8 and add 32. Therefore 56.4C = 133.52F. 511 511 512 -__29. Query Current (QC)__ 519 +__29. Query Current (**QC**)__ 513 513 514 514 Ex: #5QC<cr> might return *5QC140<cr> 515 515 516 516 The units are in milliamps, so in the example above, the servo is consuming 140mA, or 0.14A. 517 517 525 +__30. RC Mode (**CRC**)__ 526 + 527 +This command puts the servo into RC mode (position or continuous), where it will only respond to RC pulses. Note that because this is the case, the servo will no longer accept serial commands. The servo can be placed back into smart mode by using the button menu. 528 + 529 +|**Command sent**|**Note** 530 +|ex: #5CRC<cr>|Stay in smart mode. 531 +|ex: #5CRC1<cr>|Change to RC position mode. 532 +|ex: #5CRC2<cr>|Change to RC continuous (wheel) mode. 533 +|ex: #5CRC*<cr>|Where * is any number or value. Stay in smart mode. 534 + 535 +EX: #5CRC<cr> 536 + 518 518 __**RESET**__ 519 519 520 520 Ex: #5RESET<cr> or #5RS<cr> ... ... @@ -553,14 +553,19 @@ 553 553 554 554 [[image:LSS-servo-positions.jpg]] 555 555 556 -Example: Gyre direction / rotation is positive (clockwise), and origin offset has not been modified. 575 +Example: Gyre direction / rotation is positive (clockwise), and origin offset has not been modified. Each square represents 30 degrees. 557 557 558 -#1D-300<cr> The servo is command erto move to -30.0 degrees (green arrow)577 +#1D-300<cr> The servo is sent a command to move to -30.0 degrees (green arrow) 559 559 560 560 #1D2100<cr> This second position command is sent to the servo, which moves it to 210.0 degrees (orange arrow) 561 561 562 -#1D-4200<cr> Th eservo rotates counterclockwise to a position of -420 degrees (red arrow), which means one full rotation of 360 degreesand (420.0-360.0)stopping at an absolute position of 60.0 degrees,but virtual position of -420.0.581 +#1D-4200<cr> This next command rotates the servo counterclockwise to a position of -420 degrees (red arrow), which means one full rotation of 360 degrees, stopping at an absolute position of 60.0 degrees (420.0-360.0), with a virtual position of -420.0 degrees. 563 563 564 -Although the final position would be the same as if the servo were commanded to move to -60.0 degrees, it is in fact at -420.0 degrees.583 +Although the final physical position would be the same as if the servo were commanded to move to -60.0 degrees, the servo is in fact at -420.0 degrees. 565 565 566 -#1D4800<cr> This new command is sent which would then cause the servo to rotate from -420.0 degrees to 480.0 degrees, which would be a total of 900 degrees of clockwise rotation, or 2.5 complete rotations. 585 +#1D4800<cr> This new command is sent which would then cause the servo to rotate from -420.0 degrees to 480.0 degrees (blue arrow), which would be a total of 900 degrees of clockwise rotation, or 2.5 complete rotations. 586 + 587 +#1D3300<cr> would cause the servo to rotate from 480.0 degrees to 330.0 degrees (yellow arrow). 588 + 589 + 590 +If / once the servo loses power or is power cycled, it also loses the virtual position associated with that session. For example, if the virtual position was 480.0 degrees before power is cycled, upon power up the servo's position will be read as +120.0 degrees from zero (assuming center position has not been modified).