Last modified by Eric Nantel on 2024/11/21 09:43

From version < 194.1 >
edited by Eric Nantel
on 2020/05/04 10:40
To version < 194.2 >
edited by Coleman Benson
on 2020/05/11 14:59
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.ENantel
1 +xwiki:XWiki.CBenson
Content
... ... @@ -7,7 +7,7 @@
7 7  
8 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 everything one might expect to be able to configure for a smart servomotor is available.
9 9  
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 CID [[here>>doc:||anchor="HIdentificationNumber28ID29"]]). Once this has been done, only the servo(s) which have been assigned to the ID sent as part of the command will follow that command. There is currently no CRC or checksum implemented as part of the protocol.
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 12  == Session ==
13 13  
... ... @@ -15,21 +15,21 @@
15 15  <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
16 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 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 -You can ensure the LSS is ready by using a query command to check for response (ex: #[id]Q\r or #[id]QID\r). 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.
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 21  <div class="wikimodel-emptyline"></div></div></div>
22 22  {{/html}}
23 23  
24 24  == Action Commands ==
25 25  
26 -{{html wiki="true" clean="false"}}
26 +{{html clean="false" wiki="true"}}
27 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"]]. Action commands are sent serially to the servo's Rx pin and must be sent in the following format:<div class="wikimodel-emptyline"></div>
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 29  
30 30  1. Start with a number sign **#** (Unicode Character: U+0023)
31 -1. Servo ID number as an integer
32 -1. Action command (one or more letters, no whitespace, capital or lower case)
31 +1. Servo ID number as an integer (assigning an ID described below)
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 34  1. End with a carriage return **&#92;r** or **&lt;cr&gt;** Unicode Character (U+000D)
35 35  
... ... @@ -42,15 +42,15 @@
42 42  
43 43  == Modifiers ==
44 44  
45 -{{html wiki="true" clean="false"}}
45 +{{html clean="false" wiki="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  
49 49  1. Start with a number sign **#** (Unicode Character: U+0023)
50 50  1. Servo ID number as an integer
51 -1. Action command (one to three letters, no spaces, capital or lower case)
51 +1. Action command (one to three letters, no spaces, capital or lowercase from a subset of action commands below)
52 52  1. Action value in the correct units with no decimal
53 -1. Modifier command (one letter to too letters)
53 +1. Modifier command (one or two letters from the list of modifiers below)
54 54  1. Modifier value in the correct units with no decimal
55 55  1. End with a carriage return **&#92;r** or **&lt;cr&gt;** Unicode Character (U+000D)
56 56  
... ... @@ -62,7 +62,7 @@
62 62  
63 63  == Query Commands ==
64 64  
65 -{{html wiki="true" clean="false"}}
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,7 +71,7 @@
71 71  1. Query command (one to four letters, no spaces, capital or lower case)
72 72  1. End with a carriage return **&#92;r** or **&lt;cr&gt;** Unicode Character (U+000D)<div class="wikimodel-emptyline"></div>
73 73  
74 -Ex: #5QD&lt;cr&gt; Query position in (tenth of) degrees for servo #5<div class="wikimodel-emptyline"></div>
74 +Ex: #5QD&lt;cr&gt; Query the position in (tenth of) degrees for servo with ID #5<div class="wikimodel-emptyline"></div>
75 75  
76 76  The query will return a serial string (almost instantaneously) via the servo's Tx pin with the following format:
77 77  
... ... @@ -91,11 +91,11 @@
91 91  
92 92  == Configuration Commands ==
93 93  
94 -{{html wiki="true" clean="false"}}
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  
98 -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. This means that if two same configuration commands are sent, one after the next, only the last configuration is used and stored.<div class="wikimodel-emptyline"></div>
98 +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. This means that if two of the same configuration commands are sent, one after the next, only the last configuration is used and stored.<div class="wikimodel-emptyline"></div>
99 99  
100 100  The format to send a configuration command is identical to that of an action command:<div class="wikimodel-emptyline"></div>
101 101  
Copyright RobotShop 2018