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 (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ENantel1 +xwiki:XWiki.CBenson - Content
-
... ... @@ -1,3 +1,6 @@ 1 +{{warningBox warningText="More information coming soon"/}} 2 + 3 + 1 1 (% class="wikigeneratedid" id="HTableofContents" %) 2 2 **Page Contents** 3 3 ... ... @@ -5,44 +5,28 @@ 5 5 6 6 = Serial Protocol = 7 7 8 -The 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 staying compact and robust yet highly versatile. The protocol was based on Lynxmotion's SSC-32 & SSC-32U RC servo controllers and almost e verything onemight expecttobebletoconfigure forasmartservomotor isavailable.11 +The Lynxmotion Smart Servo (LSS) PRO 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 staying compact and robust yet highly versatile. The protocol was based on Lynxmotion's Smart Servo (LSS) protocol, which itself was based on the SSC-32 & SSC-32U RC servo controllers. The LSS PRO series and normal LSS share many of the same commands, but because of higher angular precision, slightly different operation and different features, the two protocols do not fully overlap. 9 9 10 10 In order to be able to control each servo individually with commands, the first step should be to assign a different ID number to each servo (see details on the Configure ID, or "CID" command [[here>>doc:||anchor="HIdentificationNumber28ID29"]]). Only the servo(s) which have been configured to a specific ID will act on a command sent to that ID. There is currently no CRC or checksum implemented as part of the protocol. 11 11 12 -= =Session ==15 += Action Commands = 13 13 14 -{{html clean="false" wiki="true"}} 15 -<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 16 -A "session" is defined as the time between when the servo is powered ON to when it is powered OFF or reset.<div class="wikimodel-emptyline"></div> 17 +Action commands tell the servo, within that session, to do something (i.e. "take an action"). The types of action commands which can be sent are described below, and they cannot be combined with other commands such as queries or configurations. Only one action command can be sent at a time. Action commands are session-specific, therefore once a servo is power cycled, it will not have any "memory" of previous actions or [[virtual positions>>||anchor="HVirtualAngularPosition"]] (described below). Action commands are sent serially to the servo's Rx pin and must be sent in the following format: 17 17 18 -**Note 1:** For a given session, the action related to a specific command overrides the stored value in EEPROM.<div class="wikimodel-emptyline"></div> 19 -**Note 2:** During the power-on / reset process the LSS cannot accept commands for a small amount of time (~1.25 s).<div class="wikimodel-emptyline"></div> 20 -**Note 3:** You can ensure the LSS is ready by using a query command to check for response (ex: #[id]Q\r or #[id]QID\r described below). If the LSS is ready for commands (initialized) it will respond to the query. A timeout between 50-100 ms is recommended to compensate for drivers, OS and buffering delays. 21 -<div class="wikimodel-emptyline"></div></div></div> 22 -{{/html}} 23 - 24 -== Action Commands == 25 - 26 -{{html clean="false" wiki="true"}} 27 -<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 28 -Action commands tell the servo, within that session, to do something (i.e. "take an action"). The types of action commands which can be sent are described below, and they cannot be combined with other commands such as queries or configurations. Only one action command can be sent at a time. Action commands are session-specific, therefore once a servo is power cycled, it will not have any "memory" of previous actions or [[virtual positions>>||anchor="HVirtualAngularPosition"]] (described below). Action commands are sent serially to the servo's Rx pin and must be sent in the following format:<div class="wikimodel-emptyline"></div> 29 - 30 30 1. Start with a number sign **#** (Unicode Character: U+0023) 31 31 1. Servo ID number as an integer (assigning an ID described below) 32 32 1. Action command (one or more letters, no whitespace, capital or lowercase from the list below) 33 33 1. Action value in the correct units with no decimal 34 -1. End with a carriage return ** \r** or **<cr>**23 +1. End with a carriage return **\r** or **<cr>** Unicode Character (U+000D) 35 35 36 36 ((( 37 -Ex: #5D1 800<cr><divclass="wikimodel-emptyline"></div>26 +Ex: #5D130000<cr> 38 38 39 -This sends a serial command to all servo's RX pins which are connected to the bus and only servo(s) with ID #5 will move to a position (1800 in tenths of degrees) of 180.0 degrees. Any servo on the bus which does not have ID 5 will take no action when receiving this command. 40 -<div class="wikimodel-emptyline"></div></div></div> 41 -{{/html}} 28 +This sends a serial command to all servo's RX pins which are connected to the bus and only servo(s) with ID #5 will move to a position (13000 in hundredths of degrees) of 130.00 degrees. Any servo on the bus which does not have ID 5 will take no action when receiving this command. 42 42 43 43 == Modifiers == 44 44 45 -{{html clean="false" wiki="true"}} 32 +{{html clean="false" wiki="true" __cke_selected_macro="true"}} 46 46 <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 47 47 Modifiers can only be used with certain **action commands**. The format to include a modifier is:<div class="wikimodel-emptyline"></div> 48 48 ... ... @@ -54,15 +54,11 @@ 54 54 1. Modifier value in the correct units with no decimal 55 55 1. End with a carriage return **\r** or **<cr>** Unicode Character (U+000D) 56 56 57 -Ex: #5D1 800T1500<cr><div class="wikimodel-emptyline"></div>44 +Ex: #5D13000T1500<cr><div class="wikimodel-emptyline"></div> 58 58 59 -This results in the servo with ID #5 rotating to a position (1800 in tenths of degrees) of 1 80.0 degrees in a time ("T") of 1500 milliseconds (1.5 seconds).<div class="wikimodel-emptyline"></div>46 +This results in the servo with ID #5 rotating to a position (1800 in tenths of degrees) of 130.00 degrees in a time ("T") of 1500 milliseconds (1.5 seconds).<div class="wikimodel-emptyline"></div> 60 60 <div class="wikimodel-emptyline"></div></div></div> 61 -{{/html}} 62 62 63 -== Query Commands == 64 - 65 -{{html clean="false" wiki="true"}} 66 66 <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 67 67 Query commands request information from the servo. They are received via the Rx pin of the servo, and the servo's reply is sent via the servo's Tx pin. Using separate lines for Tx and Rx is called "full duplex". Query commands are also similar to action and configuration commands and must use the following format:<div class="wikimodel-emptyline"></div> 68 68 ... ... @@ -71,9 +71,9 @@ 71 71 1. Query command (one to four letters, no spaces, capital or lower case) 72 72 1. End with a carriage return **\r** or **<cr>** Unicode Character (U+000D)<div class="wikimodel-emptyline"></div> 73 73 74 -Ex: #5QD<cr> Query the position in ( tenth of) degrees for servo with ID #5<div class="wikimodel-emptyline"></div>57 +Ex: #5QD<cr> Query the position in (hundredths of) degrees for servo with ID #5<div class="wikimodel-emptyline"></div> 75 75 76 -The query will return a serial string (almost instantaneously) via the servo's Tx pinwiththe following format:59 +The query will return a serial string (almost instantaneously) via the servo's Tx in the following format: 77 77 78 78 1. Start with an asterisk * (Unicode Character: U+0023) 79 79 1. Servo ID number as an integer ... ... @@ -83,15 +83,11 @@ 83 83 84 84 There is currently no option to control how fast a servo replies after it has received a query command, therefore when sending a query command to the bus, the controller should be prepared to immediately "listen" for and parse the reply. Sending multiple queries to multiple servos on a bus in fast succession may result in replies overlapping and giving incorrect or corrupt data. As such, the controller should receive a reply before sending a new query command. A reply to the query sent above might be:<div class="wikimodel-emptyline"></div> 85 85 86 -Ex: *5QD1 800<cr><div class="wikimodel-emptyline"></div>69 +Ex: *5QD13000<cr><div class="wikimodel-emptyline"></div> 87 87 88 -This indicates that servo #5 is currently at 1 80.0 degrees (1800 tenths of degrees).71 +This indicates that servo #5 is currently at 130.00 degrees (13000 tenths of degrees). 89 89 <div class="wikimodel-emptyline"></div></div></div> 90 -{{/html}} 91 91 92 -== Configuration Commands == 93 - 94 -{{html clean="false" wiki="true"}} 95 95 <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 96 96 Configuration commands and corresponding values affect a servo's defaults which are written to and read from the servo's EEPROM.<div class="wikimodel-emptyline"></div> 97 97 ... ... @@ -121,11 +121,7 @@ 121 121 122 122 #5QSR1<cr> would return *5QSR20<cr> which represents the value in EEPROM 123 123 <div class="wikimodel-emptyline"></div></div></div> 124 -{{/html}} 125 125 126 -== Virtual Angular Position == 127 - 128 -{{html wiki="true" clean="false"}} 129 129 <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 130 130 The ability to store a "virtual angular position" is a feature which allows for rotation beyond 360 degrees, permitting multiple rotations of the output horn, moving the center position and more. The "absolute position" would be the angle of the output shaft with respect to a 360.0 degree circle and can be obtained by taking the modulus (with respect to 360 degrees) of the value. For example if the virtual position is reported as 15335 (or 1533.5 degrees), taking the modulus would give 93.5 degrees (3600 * 4 + 935 = 15335) as the absolute position (assuming no origin offset).<div class="wikimodel-emptyline"></div> 131 131 ... ... @@ -147,11 +147,13 @@ 147 147 148 148 If 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). The virtual position range at power-up is [-180.0°, 180.0°]. 149 149 <div class="wikimodel-emptyline"></div></div></div> 125 + 150 150 {{/html}} 127 +))) 151 151 152 152 = Command List = 153 153 154 -**Latest firmware version currently : 368.29.14**131 +**Latest firmware version currently : v0.0.780** 155 155 156 156 |(% colspan="10" style="color:orange; font-size:18px" %)[[**Communication Setup**>>||anchor="HCommunicationSetup"]] 157 157 |(% style="width:25px" %) |(% style="width:200px" %)**Description**|(% style="text-align:center; width:100px" %)**Action**|(% style="text-align:center; width:75px" %)**Query**|(% style="text-align:center; width:75px" %)**Config**|(% style="text-align:center; width:75px" %)**RC**|(% style="text-align:center; width:75px" %)**Serial**|(% style="width:100px" %)**Default**|(% style="width:170px" %)**Unit**|**Notes** ... ... @@ -272,25 +272,8 @@ 272 272 </div></div> 273 273 {{/html}} 274 274 275 -====== __ConfigureRC Mode (**CRC**)__======252 +====== ====== 276 276 277 -{{html wiki="true" clean="false"}} 278 -<div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt"> 279 -This command puts the servo into RC mode (position or continuous), where it will only respond to RC PWM signal on the servo's Rx pin. In this mode, the servo will no longer accept serial commands. The servo can be placed back into smart mode by using the button menu.<div class="wikimodel-emptyline"></div> 280 - 281 -|**Command sent**|**Note** 282 -|ex: #5CRC1<cr>|Change to RC position mode. 283 -|ex: #5CRC2<cr>|Change to RC continuous rotation (wheel) mode. 284 -|ex: #5CRC*<cr>|Where * is any value other than 1 or 2 (or no value): stay in smart mode.<div class="wikimodel-emptyline"></div> 285 - 286 -EX: #5CRC2<cr><div class="wikimodel-emptyline"></div> 287 - 288 -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.<div class="wikimodel-emptyline"></div> 289 - 290 -**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.<div class="wikimodel-emptyline"></div> 291 -</div></div> 292 -{{/html}} 293 - 294 294 ====== __Identification Number (**ID**)__ ====== 295 295 296 296 {{html wiki="true" clean="false"}} ... ... @@ -1009,8 +1009,6 @@ 1009 1009 </div></div> 1010 1010 {{/html}} 1011 1011 1012 -== RGB LED Patterns==972 +== RGB LED == 1013 1013 1014 -The LED patterns below do not include those which are part of the button menu, which can be found here: [[LSS Button Menu>>doc:lynxmotion-smart-servo.lss-button-menu.WebHome]] 1015 - 1016 -[[image:LSS - LED Patterns.png]] 974 +The LED can be
- LSS-servo-ar-o-1.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.CBenson - Size
-
... ... @@ -1,0 +1,1 @@ 1 +11.8 KB - Content
- LSS-servo-ar.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.CBenson - Size
-
... ... @@ -1,0 +1,1 @@ 1 +11.8 KB - Content
- LSS-servo-default.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.CBenson - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.3 KB - Content
- LSS-servo-origin.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.CBenson - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.2 KB - Content
- LSS-servo-positions.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.CBenson - Size
-
... ... @@ -1,0 +1,1 @@ 1 +13.0 KB - Content