Changes for page LSS Communication Protocol
Last modified by Eric Nantel on 2025/06/06 07:47
Change comment: There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (0 modified, 0 added, 3 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 - LynxmotionSmartServo(LSS).WebHome1 +lynxmotion-smart-servo.WebHome - Content
-
... ... @@ -3,7 +3,7 @@ 3 3 4 4 {{toc depth="3"/}} 5 5 6 -= Serial Protocol Concept=6 += Serial Protocol = 7 7 8 8 The custom Lynxmotion Smart Servo (LSS) serial protocol was created in order to be as simple and straightforward as possible from a user perspective ("human readable format"), while at the same time compact and robust yet highly versatile. The protocol was based on Lynxmotion's SSC-32 RC servo controller and almost everything one might expect to be able to configure for a smart servo motor is available. 9 9 ... ... @@ -79,7 +79,7 @@ 79 79 80 80 == Configuration Commands == 81 81 82 -Configuration commands and corresponding values affect a servo's defaults which are written to and read from the servo's EEPROM. These configurations are retained in memory after the servo is reset or power is cut / lost. Some configuration commands affect the session, while others do not. In the Command table below, the column "Session" denotes if the configuration command affects the session.. Not all action commands have a corresponding configuration command and vice versa. More information about which configuration commands are retained when in RC mode can be found on the [[LSS - RC PWM page>>doc: LynxmotionSmartServo(LSS).LSS-RC PWM.WebHome]]. Configuration commands are not cumulative, in that if two configurations are sent, one after the next, only the last configuration is used and stored. The format to send a configuration command is identical to that of an action command:82 +Configuration commands and corresponding values affect a servo's defaults which are written to and read from the servo's EEPROM. These configurations are retained in memory after the servo is reset or power is cut / lost. Some configuration commands affect the session, while others do not. In the Command table below, the column "Session" denotes if the configuration command affects the session.. Not all action commands have a corresponding configuration command and vice versa. More information about which configuration commands are retained when in RC mode can be found on the [[LSS - RC PWM page>>doc:lynxmotion-smart-servo.lss-radio-control-pwm.WebHome]]. Configuration commands are not cumulative, in that if two configurations are sent, one after the next, only the last configuration is used and stored. The format to send a configuration command is identical to that of an action command: 83 83 84 84 1. Start with a number sign # (U+0023) 85 85 1. Servo ID number as an integer ... ... @@ -134,7 +134,7 @@ 134 134 | 1|[[**L**imp>>||anchor="H1.Limp28L29"]]| L| | | | | ✓|none|(% style="width:510px" %) |(% style="text-align:center; width:113px" %) 135 135 | 2|[[**H**alt & **H**old>>||anchor="H2.Halt26Hold28H29"]]| H| | | | | ✓|none|(% style="width:510px" %) |(% style="text-align:center; width:113px" %) 136 136 | 3|[[**T**imed move>>||anchor="H3.Timedmove28T29modifier"]]| T| | | | | ✓|milliseconds|(% style="width:510px" %) Modifier only for {P, D, MD}|(% style="text-align:center; width:113px" %) 137 -| 4|[[**S**peed>>||anchor="H4.Speed28S29modifier"]]| S| 137 +| 4|[[**S**peed>>||anchor="H4.Speed28S29modifier"]]| S|QS| | | | ✓|microseconds per second|(% style="width:510px" %) Modifier only {P}|(% style="text-align:center; width:113px" %) 138 138 | 5|[[**M**ove in **D**egrees (relative)>>||anchor="H5.28Relative29MoveinDegrees28MD29"]]| MD| | | | | ✓|tenths of degrees (ex 325 = 32.5 degrees)|(% style="width:510px" %) |(% style="text-align:center; width:113px" %) 139 139 | 6|[[**O**rigin Offset>>||anchor="H6.OriginOffsetAction28O29"]]| O| QO|CO|✓| ✓| ✓|tenths of degrees (ex 91 = 9.1 degrees)|(% style="width:510px" %) |(% style="text-align:center; width:113px" %)((( 140 140 0 ... ... @@ -158,14 +158,14 @@ 158 158 159 159 SR overwrites SD / CSR overwrites CSD and vice-versa. 160 160 )))|(% style="text-align:center; width:113px" %)Max per servo 161 -| 14|[[**LED** Color>>||anchor="H14.LEDColor28LED29"]]| LED| QLED| CLED|✓| ✓| ✓|none (integer from 0 to 8)|(% style="width:510px" %)0=Off (black); 1=Red 2=Green; 3=Blue; 4=Yellow; 5=Cyan; 6=Magenta; 7=White;|(% style="text-align:center; width:113px" %) 7161 +| 14|[[**LED** Color>>||anchor="H14.LEDColor28LED29"]]| LED| QLED| CLED|✓| ✓| ✓|none (integer from 0 to 8)|(% style="width:510px" %)0=Off (black); 1=Red 2=Green; 3=Blue; 4=Yellow; 5=Cyan; 6=Magenta; 7=White;|(% style="text-align:center; width:113px" %)0 (OFF) 162 162 | 15|[[**G**yre direction (**G**)>>||anchor="H15.GyreRotationDirection28G29"]]| G| QG| CG|✓| ✓| ✓|none |(% style="width:510px" %)Gyre / rotation direction: 1= CW (clockwise) -1 = CCW (counter-clockwise)|(% style="text-align:center; width:113px" %)1 163 163 | 16|[[**ID** #>>||anchor="H16.IdentificationNumber28ID29"]]| | QID| CID| | | ✓|none (integer from 0 to 250)|(% style="width:510px" %)Note: ID 254 is a "broadcast" which all servos respond to. |(% style="text-align:center; width:113px" %)0 164 -| 17|[[**B**aud rate>>||anchor="H17.BaudRate"]]| | QB| CB| | | ✓|none (integer)|(% style="width:510px" %) |(% style="text-align:center; width:113px" %) 9600165 -| 18| [[**F**irst Position(**P**ulse)>>||anchor="H18.FirstPosition28Pulse2928FP29"]]| |QFP|CFP|X|✓|✓|none|(% style="width:510px" %)CFPoverwrites CFD and vice-versa|(% style="text-align:center; width:113px" %)(((166 - Limp164 +| 17|[[**B**aud rate>>||anchor="H17.BaudRate"]]| | QB| CB| | | ✓|none (integer)|(% style="width:510px" %) |(% style="text-align:center; width:113px" %)115200 165 +| 18|//{coming soon}//| | | | | | | |(% style="width:510px" %) |(% style="text-align:center; width:113px" %)((( 166 + 167 167 ))) 168 -| 19|[[**F**irst Position (**D**eg)>>||anchor="H19.FirstPosition28Degrees29 28FD29"]]| | QFD|CFD|X| ✓| ✓|none |(% style="width:510px" %)CFDoverwrites CFP and vice-versa|(% style="text-align:center; width:113px" %)Limp168 +| 19|[[**F**irst Position (**D**eg)>>||anchor="H19.FirstA0Position28Degrees29"]]| | QFD|CFD|X| ✓| ✓|none |(% style="width:510px" %) |(% style="text-align:center; width:113px" %)No Value 169 169 | 20|[[**M**odel **S**tring>>||anchor="H20.QueryModelString28QMS29"]]| | QMS| | | | |none (string)|(% style="width:510px" %) Returns the type of servo (ST, HS, HT)|(% style="text-align:center; width:113px" %) 170 170 | 21|[[Serial **N**umber>>||anchor="H21.QuerySerialNumber28QN29"]]| | QN| | | | |none (integer)|(% style="width:510px" %) Returns the unique serial number for that servo|(% style="text-align:center; width:113px" %) 171 171 | 22|[[**F**irmware version>>||anchor="H22.QueryFirmware28QF29"]]| | QF| | | | |none (integer)|(% style="width:510px" %) |(% style="text-align:center; width:113px" %) ... ... @@ -188,13 +188,13 @@ 188 188 | A3|[[**A**ngular **A**cceleration>>||anchor="HA3:AngularAcceleration28AA29"]]|AA|QAA|CAA|✓| | ✓|degrees per second squared|(% style="width:510px" %)Increments of 10 degrees per second squared 189 189 | A4|[[**A**ngular **D**eceleration>>||anchor="HA4:AngularDeceleration28AD29"]]|AD|QAD|CAD|✓| | ✓|degrees per second squared|(% style="width:510px" %)Increments of 10 degrees per second squared 190 190 | A5|[[**E**nable **M**otion Control>>||anchor="HA5:MotionControl28EM29"]]|EM|QEM| | | | ✓|none|(% style="width:510px" %)EM0 to disable motion control, EM1 to enable 191 -| A6|[[**C**onfigure **L**ED **B**linking>>||anchor="HA6.ConfigureLEDBlinking28CLB29"]]| | 191 +| A6|[[**C**onfigure **L**ED **B**linking>>||anchor="HA6.ConfigureLEDBlinking28CLB29"]]| |QLB| CLB| | ✓| ✓|none (integer from 0 to 63)|(% style="width:510px" %)((( 192 192 0=No blinking, 63=Always blink; 193 193 194 -Blink while: 1=Limp; 2=Holding 4=Accel; 8=Decel; 16=Free 32=Travel; 194 +Blink while: 1=Limp; 2=Holding; 4=Accel; 8=Decel; 16=Free 32=Travel; 195 195 ))) 196 196 197 -== Details == 197 +== Details - Basic == 198 198 199 199 ====== __1. Limp (**L**)__ ====== 200 200 ... ... @@ -222,6 +222,12 @@ 222 222 223 223 This command is a modifier only for a position (P) action and determines the speed of the move in microseconds per second. A speed of 750 microseconds would cause the servo to rotate from its current position to the desired position at a speed of 750 microseconds per second. This command is in place to ensure backwards compatibility with the SSC-32 / 32U protocol. 224 224 225 +Query Speed (**QS**) 226 + 227 +Example: #5QS<cr> might return *5QS300<cr> 228 + 229 +This command queries the current speed in microseconds per second. 230 + 225 225 ====== __5. (Relative) Move in Degrees (**MD**)__ ====== 226 226 227 227 Example: #5MD123<cr> ... ... @@ -291,7 +291,7 @@ 291 291 292 292 ====== __9. Position in Degrees (**D**)__ ====== 293 293 294 -Example: #5 PD1456<cr>300 +Example: #5D1456<cr> 295 295 296 296 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) are used. A full circle would be from -1800 to 1800 degrees. A value of 2700 would be the same angle as -900, except the servo would move in a different direction. 297 297 ... ... @@ -390,7 +390,7 @@ 390 390 391 391 This action sets the servo's RGB LED color for that session.The LED can be used for aesthetics, or (based on user code) to provide visual status updates. Using timing can create patterns. 392 392 393 -0=O FF1=RED2=GREEN3=LUE4=YELLOW5=CYAN6= 7=MAGENTA, 8=WHITE399 +0=Off (black); 1=Red 2=Green; 3=Blue; 4=Yellow; 5=Cyan; 6=Magenta; 7=White; 394 394 395 395 Query LED Color (**QLED**) 396 396 ... ... @@ -440,7 +440,7 @@ 440 440 441 441 ====== __17. Baud Rate__ ====== 442 442 443 -A servo's baud rate cannot be set "on the fly" and must be configured via the CB command described below. The factory default baud rate for all servos is 9600. Since smart servos are intended to be daisy chained, in order to respond to the same serial bus, all servos in a project should ideally be set to the same baud rate. Setting different baud rates will have the servos respond differently and may create issues. Available baud rates are: 9600 bps, 19200 bps, 38400 bps, 57600 bps, 115.2 kbps, 230.4 kbps, 250.0 kbps, 460.8 kbps, 500.0 kbps. Servos are shipped with a baud rate set to 9600. The baud rates are currently restricted to those above.449 +A servo's baud rate cannot be set "on the fly" and must be configured via the CB command described below. The factory default baud rate for all servos is 115200. Since smart servos are intended to be daisy chained, in order to respond to the same serial bus, all servos in a project should ideally be set to the same baud rate. Setting different baud rates will have the servos respond differently and may create issues. Available baud rates are: 9600 bps, 19200 bps, 38400 bps, 57600 bps, 115.2 kbps, 230.4 kbps, 250.0 kbps, 460.8 kbps, 500.0 kbps. Servos are shipped with a baud rate set to 9600. The baud rates are currently restricted to those above. 444 444 445 445 Query Baud Rate (**QB**) 446 446 ... ... @@ -456,37 +456,25 @@ 456 456 457 457 Sending this command will change the baud rate associated with servo ID 5 to 9600 bits per second. 458 458 459 -====== __18. First Position(Pulse) (**FP**)__ ======465 +====== __18. {//Coming soon//}__ ====== 460 460 461 - In certain cases, a user might want tohave the servomove to a specific angle upon power up; we refer to this as "first position" (a.k.a. "initial 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. If a first position pulse is assigned,theservowill move to that angle and hold there for up to 2 seconds before going limp should a new pulse not be received.467 +Command coming soon.... 462 462 463 - QueryFirstin Pulses(**QFP**)469 +====== __19. First Position (Degrees)__ ====== 464 464 465 - Ex:#5QFP<cr>might return*5QFP1550<cr>471 +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" (a.k.a. "initial 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. 466 466 467 -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"). 468 - 469 -Configure First Position in Pulses (**CFP**) 470 - 471 -Ex: #5CP1550<cr> 472 - 473 -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 (Ex. #5CFP<cr>) results in the servo remaining limp upon power up (i.e. disabled). 474 - 475 -====== __19. First Position (Degrees) (**FD**)__ ====== 476 - 477 -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" (a.k.a. "initial 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. 478 - 479 479 Query First Position in Degrees (**QFD**) 480 480 481 481 Ex: #5QFD<cr> might return *5QFD64<cr> 482 482 483 -The reply above indicates that servo with ID 5 has a first position pulse of 1550 microseconds. 477 +The reply above indicates that servo with ID 5 has a first position pulse of 1550 microseconds. If there is no first position value stored, the reply will be DIS 484 484 485 485 Configure First Position in Degrees (**CFD**) 486 486 487 487 Ex: #5CD64<cr> 488 488 489 -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 (Ex. #5CFD<cr>) results in the servo remaining limp upon power up. 483 +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 (Ex. #5CFD<cr>) results in the servo remaining limp upon power up. In order to remove the first position, send no value, ex: #5CFD<cr> 490 490 491 491 ====== __20. Query Model String (**QMS**)__ ====== 492 492 ... ... @@ -569,7 +569,7 @@ 569 569 570 570 This command would place the servo in RC wheel mode after a RESET or power cycle. Note that after a RESET or power cycle, the servo will be in RC mode and will not reply to serial commands. Using the command #5CRC<cr> or #5CRC3<cr> which requests that the servo remain in serial mode still requires a RESET command. 571 571 572 -Important note:** **To revert from RC mode back to serial mode, the [[LSS - Button Menu>>doc: LynxmotionSmartServo(LSS).LSS-ButtonMenu.WebHome]] is required. Should the button be inaccessible (or broken) when the servo is in RC mode and the user needs to change to serial mode, a 5V constant HIGH needs to be sent to the servo's Rx pin (RC PWM pin), ensuring a common GND and wait for 30 seconds. Normal RC PWM pulses should not exceed 2500 milliseconds. After 30 seconds, the servo will interpret this as a desired mode change and change to serial mode. This has been implemented as a fail safe.566 +Important note:** **To revert from RC mode back to serial mode, the [[LSS - Button Menu>>doc:lynxmotion-smart-servo.lss-button-menu.WebHome]] is required. Should the button be inaccessible (or broken) when the servo is in RC mode and the user needs to change to serial mode, a 5V constant HIGH needs to be sent to the servo's Rx pin (RC PWM pin), ensuring a common GND and wait for 30 seconds. Normal RC PWM pulses should not exceed 2500 milliseconds. After 30 seconds, the servo will interpret this as a desired mode change and change to serial mode. This has been implemented as a fail safe. 573 573 574 574 ====== __28. **RESET**__ ====== 575 575 ... ... @@ -601,7 +601,7 @@ 601 601 602 602 Note that after the CONFIRM command is sent, the servo will automatically perform a RESET. 603 603 604 -= Advanced = 598 +== Details - Advanced == 605 605 606 606 The motion controller used in serial mode is not the same as the motion controller use in RC mode. RC mode is intended to add functionality to what would be considered "normal" RC behavior based on PWM input. 607 607 ... ... @@ -683,8 +683,10 @@ 683 683 684 684 ====== __A5: Motion Control (**EM**)__ ====== 685 685 686 - {Moredetails to come}680 +The command EM0 disables use of the motion controller (acceleration, velocity / travel, deceleration). As such, the servo will move at full speed for all motion commands. The command EM1 enables use of the motion controller. 687 687 682 +Note that if the modifiers S or T are used, it is assumed that motion control is desired, and for that command, EM1 will be used. 683 + 688 688 ====== __A6. Configure LED Blinking (**CLB**)__ ====== 689 689 690 690 This command allows you to control when the RGB LED will blink the user set color (see [[16. RGB LED>>||anchor="H16.RGBLED28LED29"]] for details). This is very useful when visually seeing what the servo is doing. You can turn on or off blinking for various LSS status. The command requires that the servo be RESET. Here is the list and their associated value:
- XWiki.XWikiRights[0]
-
- Allow/Deny
-
... ... @@ -1,1 +1,0 @@ 1 -1 - Groups
-
... ... @@ -1,1 +1,0 @@ 1 -xwiki:XWiki.XWikiAdminGroup - Levels
-
... ... @@ -1,1 +1,0 @@ 1 -view
- XWiki.XWikiRights[1]
-
- Allow/Deny
-
... ... @@ -1,1 +1,0 @@ 1 -1 - Groups
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiAdminGroup - Levels
-
... ... @@ -1,1 +1,0 @@ 1 -view
- XWiki.XWikiRights[2]
-
- Allow/Deny
-
... ... @@ -1,1 +1,0 @@ 1 -1 - Groups
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Profiles (Lynxmotion).BETA Testers - Levels
-
... ... @@ -1,1 +1,0 @@ 1 -view