Last modified by Eric Nantel on 2025/06/06 07:47

From version < 194.1 >
edited by Eric Nantel
on 2020/05/04 10:40
To version < 197.2 >
edited by Coleman Benson
on 2021/02/26 15:36
< >
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  
... ... @@ -510,15 +510,19 @@
510 510  
511 511  ====== __Enable Motion Profile (**EM**)__ ======
512 512  
513 -{{html wiki="true" clean="false"}}
513 +{{html clean="false" wiki="true"}}
514 514  <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
515 +EM1 (Enable Motion Profile #1) is the default mode of the LSS and is an easy way to control the servo's position with a single (serial) position command. This mode uses a trapezoidal motion profile which takes care of acceleration, constant speed travel and deceleration. Once the actual position is within a certain value of the target, it switches to a holding algorithm. The LSS commands for Angular Acceleration and Deceleration (AA/CAA/AD/CAD) Angular Stiffness (AS/CAS) and Angular holding stiffness (AH/CAH) affect this motion profile. Modifiers like SD/S and T can be used in EM1.<div class="wikimodel-emptyline"></div>
516 +
515 515  Ex: #5EM1&lt;cr&gt;<div class="wikimodel-emptyline"></div>
516 516  
517 -This command enables a trapezoidal motion profile. By default, the trapezoidal motion profile is enabled. If the motion profile is enabled, angular acceleration (AA) and angular deceleration(AD) will have an effect on the motion. Also, SD/S and T modifiers can be used.<div class="wikimodel-emptyline"></div>
519 +This command enables a trapezoidal motion profile for servo #5 <div class="wikimodel-emptyline"></div>
518 518  
519 519  Ex: #5EM0&lt;cr&gt;<div class="wikimodel-emptyline"></div>
520 520  
521 -This command will disable the trapezoidal motion profile. As such, the servo will move at full speed for D/MD action commands. Angular acceleration (AA) and angular deceleration(AD) won't have an effect on motion in this mode and modifiers SD/S or T cannot be used.<div class="wikimodel-emptyline"></div>
523 +This command will disable the built-in trapezoidal motion profile. As such, the servo will move at full speed to the target position using the D/MD action commands. Modifiers like SD/S or T cannot be used in EM0 mode. By default the Filter Position Counter, or "FPC" is active in EM0 mode to smooth out its operation.<div class="wikimodel-emptyline"><br><br>
524 +EM0 is suggested for applications where an external controller will be determining all incremental intermediate positions of the servo's motion, effectively replacing a trajectory manager.
525 +</div>
522 522  
523 523  Query Motion Profile (**QEM**)<div class="wikimodel-emptyline"></div>
524 524  
... ... @@ -536,8 +536,10 @@
536 536  
537 537  ====== __Filter Position Count (**FPC**)__ ======
538 538  
539 -{{html wiki="true" clean="false"}}
543 +{{html clean="false" wiki="true"}}
540 540  <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
545 +The FPC value relates to the depth of a first order filter (exponential weighted average) over the position change. This has the effect of slowing down both acceleration and deceleration while still allowing the LSS to try to reach the desired position at maximum power at all times. A smaller FPC value will reduce the smoothing effect and a larger value will increase it. To prevent having to send position commands continuously to reach the desired position in EM0/FPC active (FPC >= 2), an internal position engine (IPE) has been put in place, which is also active by default.
546 +<div class="wikimodel-emptyline"></div>
541 541  Ex: #5FPC10&lt;cr&gt;<div class="wikimodel-emptyline"></div>
542 542  This command allows the user to change the Filter Position Count value for that session. <div class="wikimodel-emptyline"></div>
543 543  
... ... @@ -773,7 +773,7 @@
773 773  
774 774  Ex: #5QMMDD&lt;cr&gt; might return *5QMMD512&lt;cr&gt; <div class="wikimodel-emptyline"></div>
775 775  
776 -This configuration command means the servo, when set to smart mode, will immediately move to 90.0 degrees upon power up. Sending a CFD command without a number (Ex. #5CFD&lt;cr&gt;) results in the servo remaining limp upon power up. In order to remove the first position, send no value, ex: #5CFD&lt;cr&gt;
782 +This command returns the configured limit of the duty cycle value sent from the servo's MCU to the Motor Controller. The default value is 1023.
777 777  <div class="wikimodel-emptyline"></div></div></div>
778 778  {{/html}}
779 779  
Copyright RobotShop 2018