Communications protocol
A simple text-based protocol is used. Commands are sent to the SMD4, checked and executed, and a response returned. Data are buffered on receipt and commands are evaluated and executed on a first in first out basis. Although not a requirement, it is usually easiest to send a command and evaluate the response before sending the next command.
Commands are in the form (Note that angle brackets are shown for clarity only, they are not part of the protocol):
<address prefix><mnemonic>,<argument 1>,<argument 2>,<argument n>…<CR><LF>
And responses are in the form:
<address prefix>,<SFLAGS>,<EFLAGS>,<data 1>,<data 2>,<data n>…<CR><LF>
If the command executed successfully, or:
<address prefix>,<SFLAGS>,<EFLAGS>,<error code><CR><LF>
If the command failed to execute correctly.
Where:
Item |
Description |
<address prefix> |
Optional prefix included when multiple SMD4s exist on the same bus. If not using addressing can be omitted. |
<mnemonic> |
Short sequence of characters representing a command, case insensitive |
<argument n> |
Zero or more command arguments |
<data n> |
Zero or more response data items |
<error code> |
An error code, see section Error Codes. This includes both a number and text description of the error to aid when using the SMD4 via a terminal program. |
<SFLAGS> |
Set of flags representing the status of the SMD4, such as the state of the limit inputs or whether the joystick is connected. See section Status Flags |
<EFLAGS> |
Set of flags representing the error state of the SMD4, such as invalid mnemonic, or motor over-temperature fault. |
<CR><LF> |
Message terminator; carriage return followed by line-feed (0x0D,0x0A) |
Addressing
This section is only applicable where multiple SMD4s are connected together on the same bus, using the serial interface in either RS232 or RS485 mode. The addressing logic described in this section works for all interfaces, but is redundant for USB and the network interface since those inherently implement addressing.
When multiple SMD4s exist on the same bus, a mechanism is required to allow them to be addressed uniquely or as a group. Likewise, only one device must use the bus at a time otherwise bus contention results when more than one device tries to drive the bus at a time.
This is accomplished via the address prefix, which is the at '@' symbol followed by a numeric address:
- 0 = Broadcast address, all SMD4s execute the command, but no response is sent
- 1 to 247 = Valid secondary address range. The addressed SMD4 executes the command and returns a response
- Any address outside this range is invalid, and the packet is silently ignored
Upon receipt of the first complete packet with an address prefix, the SMD4 enters addressing mode, and behaviour then changes as follows, until restart.
- Malformed packets are silently ignored. This includes any packet that does not include the addressing prefix but that is otherwise valid.
- Broadcast packets are silently parsed and executed. A response is not sent, and as such it cannot be determined whether the command executed successfully without submitting a further query addressed directly to the target SMD4.
- Packets that are otherwise correctly formed but having a target address that does not match that of the SMD4 are silently ignored.
Comma separation
All elements are comma-separated, except for the message terminator which immediately follows the last item. A response is always sent on receipt of a message terminator except where addressing criteria are not met. If an argument was supplied with a command, for example, to set a value, the value set will be returned in the response and serves as an additional confirmation of the command having executed as expected.
Many commands accept a real number argument when the underlying quantity is an integer, or finite set of real numbers. In this case, the supplied value being otherwise acceptable is rounded to the closest integer or real number from the allowed set, and it is this value that is returned in the response.
No data items to return
If there are no data items as part of a response, only the SFLAGS and EFLAGS are returned. If an error occurred, then this will be reflected in the EFLAGS.
Data types
The SMD4 uses the following data types. Arguments sent to and from the SMD4 will be one of these types. Bracketed values are notes or converted values and not part of the data sent to or from the SMD4. Same applies to quotes.
Type | SMD4 accepts | SMD4 responds |
INT |
Integer value, with or without sign:
100, -3, +7 |
Sign only included for negative numbers:
200, -3, 7 |
UINT |
Unsigned integer value, no sign: 0, 7, 1000
Hexadecimal format is also accepted:
0x38e3 (14,563) 0x005F (95) |
Unsigned integer value, no sign:
100, 200
Status and error flags are returned in upper case 2-byte hexadecimal format, E.g. 0x1234, 0xA4DE |
FLOAT |
Real number, with or without sign:
100, 34.5, 89.234234
Scientific format may also be used:
100e-3, 2.454E+1, 2e+3 |
Scientific format, with variable places after the decimal point and a 2-digit exponent:
1.23000E+04, 5.761592342E-06 |
STRING |
ASCII string, consisting of characters 0x20 to 0x7E inclusive:
"hello", "1234 abc" |
|
BOOL |
Binary, true/false value:
0, 1 |
|
DOTTED DECIMAL |
IPV4 address or mask, four numbers separated by dots:
"192.168.0.1", "255.255.255.255" |
|
MAC |
12 hexadecimal characters grouped into pairs separated by a colon:
"44:b7:d0:c7:16:75" |
|
OTHER |
The data type is described in the command reference section |
Flags
Flags are reported by the device in hexadecimal format as explained above. E.g. a value of 0x0002 means bit 1 is set. The value of reserved flags is undefined and no particular value should be assumed.
Error flags (EFLAGS)
These indicate error conditions and are latching (i.e. remain set even after the error condition that caused them no longer persists). Reset the fault using the clear command, or the reset fault input. The motor is disabled if one or more error flags are set.
Bit |
Name |
Description |
0 | Temperature sensor short | Selected temperature sensor is short-circuited (Not applicable to Thermocouple) |
1 | Temperature sensor open | Selected temperature sensor is open circuit |
2 | Motor over temperature | Selected temperature sensor is reporting temperature > 190 °C and power has been removed from the motor to protect the windings |
3 | Motor short | Motor phase to phase or phase to ground short has been detected |
4 | External disable | Motor disabled via external input |
5 | Emergency stop | Motor disabled via software |
6 | Configuration error | Motor configuration is corrupted |
7 | Reserved 7 | |
8 | Reserved 8 | |
9 | SDRAM | Memory self-test failed |
10 | Reserved 10 | |
11 | Reserved 11 | |
12 | Reserved 12 | |
13 | Reserved 13 | |
14 | Reserved 14 | |
15 | Motion control fault | One or more motion control features (EPC, ROML etc.) are in a fault state |
Status flags (SFLAGS)
Bit |
Name |
Description |
0 |
Joystick connected | Joystick is connected (determined via state of the |
1 |
Limit negative | Limit input is active (Note that the polarity is configurable, so active can mean high or low signal level) |
2 |
Limit positive | Limit input is active (Note that the polarity is configurable, so active can mean high or low signal level) |
3 |
External enable | External enable input state |
4 |
Ident | Ident mode is active, green status indicator is flashing to aid in identifying device |
5 |
EPC activity | Endpoint correction activity indicator; on when this feature is busy |
6 | ROML activity | Range of motion limiter activity indicator; true when this feature is busy |
7 |
Standby | Motor stationary. Check this bit before performing a function that requires the motor to be stopped first, such as changing mode |
8 |
Baking | Bake mode running |
9 |
Target Velocity Reached | Set when the motor is at target velocity |
10 |
GUARD activity | Guard activity indicator; true when this feature is busy |
11 |
Boost Operational | Internal 48 V to 67 V boost supply is operational |
12 |
Boost disable jumper | Boost supply disable jumper is fitted |
13 |
Boost UVLO | Boost supply is disabled because input voltage is too low (< 48 V approx.) |
14 |
Reserved 14 | |
15 |
Motion control warning | One or more motion control features (EPC, ROML etc.) are in a warning state |
Error codes
Error |
Description |
-1 (Stop motor first) |
Several actions, such as changing resolution or operating mode require that the motor is stopped first. Trying to run such a command before the motor has come to a stop and the standby flag in the status register is set will result in this error. |
-2 (Argument validation) |
An argument supplied to the command is invalid, for example, it is outside the allowable range. |
-3 (Unable to get) |
The command is write-only, read is not valid. This applies to commands such as stop, where read would have no meaning. |
-5 (Action failed) |
The command failed to execute due to an internal error, for example, the internal flash in which settings are stored has reached the end of life and data cannot be reliably written to it. |
-6 (Not possible in mode) |
The command is not applicable to this mode, for example, trying to start bake when not in bake mode. |
-7 (Not possible when motor disabled) |
The motor is disabled (due to a fault, or external enable) and the command is one that starts motion. |
-101 (Argument type) |
The argument is of the wrong type, for example a non-integer value was given where an integer value was required. |
-102 (Argument count) |
The argument count is incorrect, either too few or too many arguments have been supplied. |
-103 (Invalid Mnemonic) |
Command mnemonic is not valid |
-104 (Packet error) |
Packet is malformed |
Quick reference
Bake
Mnemonic |
Description |
R |
W |
Type |
Elapsed bake time in format h:mm:ss |
● |
|
STRING |
|
Start bake |
|
● |
|
|
Bake temperature setpoint |
● |
● |
UINT |
Boost
Mnemonic |
Description |
R |
W |
Type |
Boost enable | ● | ● | BOOL | |
Check if boost disable PCB jumper is fitted | ● | BOOL |
Coms
Mnemonic |
Description |
R |
W |
Type |
DHCP enable | ● | ● | BOOL | |
Gateway address | ● | ● | DOTTED DECIMAL | |
IP address | ● | ● | DOTTED DECIMAL | |
Summary of network configuration in human readable form | ● | STRING | ||
Ethernet interface link is up | ● | BOOL | ||
Ethernet interface MAC address | ● | MAC | ||
Ethernet subnet mask | ● | ● | DOTTED DECIMAL | |
Serial baud rate | ● | ● | UINT | |
Serial coms mode, RS232 or 485 | ● | ● | UINT | |
RS485 turnaround delay | ● | ● | UINT | |
Slave address | ● | ● | UINT | |
Enable RS485 line termination | ● | ● | BOOL |
Encoder
Mnemonic |
Description |
R |
W |
Arguments |
ENC:BSN | Encoder board serial number | ● | STRING | |
ENC:DAT | Encoder readout data | ● | OTHER | |
ENC:DPC | Encoder displacement per count | ● | ● | FLOAT |
ENC:FLIP | Reverse encoder direction | ● | ● | BOOL |
ENC:FLIP:AUTOSET | Auto configure flip | ● | ||
ENC:FW | Encoder firmware version | ● | STRING | |
ENC:INC:LIMITS:EN | Enable incremental PQ limits | ● | ● | BOOL |
ENC:INC:LIMITS:P:EN | Enable incremental P limit | ● | ● | BOOL |
ENC:INC:LIMITS:Q:EN | Enable incremental Q limit | ● | ● | BOOL |
ENC:INC:LIMITS:STOPMODE | Incremental PQ limits stop mode | ● | ● | UINT |
ENC:INC:LIMITS:SWAP | Incremental swap P and Q | ● | ● | BOOL |
ENC:INC:RSTZ | Incremental reset the Z counter | ● | ||
ENC:OFS | Encoder readout offset | ● | ● | FLOAT |
ENC:SEL | Select absolute or incremental encoder | ● | ● | |
ENC:USEINCE | Incremental use the E (error) signal | ● | ● |
Limit inputs
Mnemonic |
Description |
R |
W |
Arguments |
Global enable |
● |
● |
BOOL |
|
Limit positive (Limit 1) enable |
● |
● |
BOOL |
|
Limit negative (Limit 2) enable |
● |
● |
BOOL |
|
Limit polarity for both Limit positive (Limit 1) and negative (Limit 2), (0 for active high, 1 for active low) |
|
● |
BOOL |
|
Limit n polarity (0 for active high, 1 for active low) |
● |
● |
BOOL |
|
Limit n polarity (0 for active high, 1 for active low) |
● |
● |
BOOL |
|
How to stop on limit being triggered |
● |
● |
BOOL |
Motion control
Mnemonic |
Description |
R |
W |
Arguments |
Emergency stop. Stops the motor immediately |
|
● |
|
|
Mechanism presets |
● |
● |
UINT |
|
Execute negative nudge |
● |
● |
|
|
Execute positive nudge |
● |
● |
|
|
Nudge distance |
● |
● |
FLOAT |
|
Move motor absolute positioning mode |
|
● |
INT |
|
Start home mode procedure |
|
● |
STRING |
|
Move motor relative positioning mode |
|
● |
INT |
|
Move motor velocity mode |
|
● |
STRING |
|
MCON:SF:EPC |
Closed loop (Endpoint Correction, EPC) behaviour | ● | ● | UINT |
MCON:SF:EPC:N | Closed loop (Endpoint Correction, EPC) maximum iterations | ● | ● | UINT |
MCON:SF:EPC:T |
Closed loop (Endpoint Correction, EPC) tolerance | ● | ● | FLOAT |
MCON:SF:GUARD |
Guard behaviour | ● | ● | UINT |
MCON:SF:GUARD:1 |
Guard value one | ● | ● | FLOAT |
MCON:SF:GUARD:2 |
Guard value two | ● | ● | FLOAT |
MCON:SF:ROML |
Range of motion limiter behaviour | ● | ● | UINT |
MCON:SF:ROML:1 |
Range of motion limiter value one | ● | ● | FLOAT |
MCON:SF:ROML:2 |
Range of motion limiter value two | ● | ● | FLOAT |
MCON:SF:ROML:J |
Range of motion limiter, enable for step direction mode | ● | ● | BOOL |
Stop motor in 1 second on full step position independently of the current motion profile |
|
● |
|
|
Bring motor to a stop according to the current profile |
|
● |
|
|
MCON:U |
Mechanism displacement per step | ● | ● | FLOAT |
MCON:ZEROA |
Zero the absolute counter | ● | ||
MCON:ZEROAR |
Zero absolute and relative counters | ● | ||
MCON:ZEROR | Zero relative counter | ● |
Motor
Mnemonic |
Description |
R |
W |
Arguments |
Acceleration in Hz/s |
● |
● |
FLOAT |
|
Deceleration in Hz/s |
● |
● |
FLOAT |
|
Which edges of step input to generate a step on |
● |
● |
UINT |
|
Freewheel mode |
● |
● |
UINT |
|
Acceleration current in amps |
● |
● |
FLOAT |
|
Hold current in amps |
● |
● |
FLOAT |
|
Delay per current reduction step |
● |
● |
FLOAT |
|
Interpolate step input to 256 micro steps |
● |
● |
BOOL |
|
Run current in amps |
● |
● |
FLOAT |
|
Actual position |
● |
● |
FLOAT |
|
Power down delay in milliseconds |
● |
● |
FLOAT |
|
Relative position |
● |
● |
FLOAT |
|
Resolution |
● |
● |
UINT |
|
Step/direction mode |
● |
● |
UINT |
|
Temperature in °C |
● |
|
UINT |
|
Full step – micro stepping transition |
● |
● |
FLOAT |
|
Temperature sensor selection, T/C or RTD |
● |
● |
UINT |
|
Time to stop before moving again in seconds |
● |
● |
FLOAT |
|
Actual motor velocity |
● |
|
FLOAT |
|
Target motor velocity |
● |
● |
FLOAT |
|
Start velocity |
● |
● |
FLOAT |
|
Stop velocity |
● |
● |
FLOAT |
General
Mnemonic |
Description |
R |
W |
Arguments |
Get main board serial number |
● |
|
STRING |
|
Clear error flags |
|
● |
|
|
External enable used |
● |
● |
BOOL |
|
Get status and error flags |
● |
|
|
|
Get human readable summary of status and error flags |
● |
|
STRING |
|
Read main board firmware version number |
● |
|
STRING |
|
Set the status indicator flashing to help identify the device |
● |
● |
BOOL |
|
Enable or disable the joystick input |
● |
● |
BOOL |
|
Joystick mode |
● |
● |
UINT |
|
Load saved configuration |
|
● |
|
|
Load factory default settings |
|
● |
|
|
Mode of operation |
● |
● |
UINT |
|
Device name tag |
● |
● |
STRING |
|
Enter programming mode |
|
● |
|
|
Restart the SMD4 |
|
● |
|
|
SYS:SER | Product serial number | ● | STRING | |
SYS:STORE | Store settings | ● | ||
SYS:UNITS | Get or set the measurement unit | ● | ● | UINT |
SYS:UPTIME | Get the uptime in milliseconds | ● | UINT | |
SYS:UUID | Get a the products UUID (Universally Unique ID) | ● | STRING |
Command reference
In the examples red text is data transmitted to the SMD4, and blue text is data received from the SMD4. // Green text preceded by a double forward slash is a comment relating to that data. Arguments where present are given as an argument name in angle brackets.
Bake
BAKE:RUN – Start bake
Start bake. Configure the bake temperature setpoint using BakeTemperature.
Command: | BAKE:RUN<CR><LF> |
Examples
BAKE:RUN<CR><LF> 0x0000,0x0000<CR><LF> |
// Run bake
|
BAKE:ELAPSED – Elapsed bake time
Gets the elapsed bake time.
Query: |
BAKE:ELAPSED<CR><LF> |
||
Response: | <duration> |
||
Data | Type | Description |
|
duration | STRING |
Elapsed time in format h:mm:ss, where h is hours, m minutes and s seconds. |
Tx: BAKE:ELAPSED<CR><LF> Rx: 0x0000,0x0000,2:34:12<CR><LF> |
// Bake has run for 2 hours 34 minutes and 12 seconds |
BAKE:T – Bake temperature setpoint
Gets or sets the bake temperature setpoint. To run bake, select bake mode using the MODE, then start bake using the run bake command. Use stop command to end bake.
Command: | BAKE:T,<setpoint><CR><LF> |
||
Query: |
BAKE:T <CR><LF> |
||
Response: | <setpoint> |
||
Data | Type | Description |
|
setpoint | UINT |
[Default: 150 °C] Min. 0 °C Max. 200 °C |
Examples
BAKE:T,100<CR><LF> 0x0000,0x0000,100<CR><LF> BAKE:T<CR><LF> 0x0000,0x0000,100<CR><LF> |
// Set bake setpoint to 100 °C
// Query |
Boost
BOOST:EN – Boost enable
Gets or sets a value indicating whether the boost supply should be enabled. The boost supply steps up the input voltage from 48 V to 67 V to maximise motor dynamic performance. Enable for best performance. Regardless of this setting, the boost supply is disabled when input voltage falls below 48 V, and or the boost disable jumper is fitted.
Command: | BOOST:EN,<state><CR><LF> |
|
Query: |
BOOST:EN <CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disable [1: Enable] |
Examples
BOOST:EN,1<CR><LF> 0x0000,0x0000,1<CR><LF> BOOST:EN<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Enable boost
// Query
|
BOOST:JUMPER – Boost disable PCB jumper
Gets a value indicating whether the boost supply disable jumper is fitted. If the jumper is fitted, the boost supply is disabled and the maximum voltage supplied to the motor will equal the input voltage to the SMD4. This will compromise motor dynamic performance.
Query: |
BOOST:JUMPER <CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Jumper is not fitted, boost supply is enabled provided input voltage criteria met 1: Jumper is fitted, boost supply is disabled |
Coms: Network
COMS:NET:DHCP – DHCP
Gets or sets a value indicating whether DHCP is enabled. If enabled, DHCP (Dynamic Host Configuration Protocol) will be used to automatically assign network configuration, such as IP address and gateway, to the device.
Command: | COMS:NET:DHCP,<state><CR><LF> |
|
Query: |
COMS:NET:DHCP<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disable [1: Enable] |
Examples
COMS:NET:DHCP,1<CR><LF> 0x0000,0x0000,1<CR><LF> COMS:NET:DHCP<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Enable DHCP
// Query |
COMS:NET:GATEWAY – Gateway
Gets or sets the gateway address. When DHCP is enabled, the value read back will be the value assigned by DHCP rather than any value you might have set. Any value set however is retained, and will apply if DHCP is disabled at a later time.
Command: | COMS:NET:GATEWAY,<address><CR><LF> |
|
Query: | COMS:NET:GATEWAY<CR><LF> |
|
Response: | <address> | |
Data | Type | Description |
address | DOTTED DECIMAL | Gateway address |
Examples
COMS:NET:DHCP<CR><LF> 0x0000,0x0000,1<CR><LF> COMS:NET:GATEWAY,192.168.1.1<CR><LF> 0x0000,0x0000,10.0.96.1<CR><LF>
COMS:NET:DHCP,0<CR><LF> 0x0000,0x0000,0<CR><LF> COMS:NET:GATEWAY<CR><LF> 0x0000,0x0000,192.168.1.1<CR><LF> |
// Query DHCP state and find that it's enabled
// Set the gateway; the returned value is that assigned by DHCP // not the value we just set
// Turn DHCP off
// Query gateway again // Now DHCP is off, our assigned gateway value is used |
COMS:NET:IP – IP Address
Gets or sets the IP address. When DHCP is enabled, the value read back will be the value assigned by DHCP rather than any value you might have set. Any value set however is retained, and will apply if DHCP is disabled at a later time.
Command: | COMS:NET:IP,<address><CR><LF> |
|
Query: | COMS:NET:IP<CR><LF> |
|
Response: | <address> | |
Data | Type | Description |
address | DOTTED DECIMAL | IP address |
Examples
Tx: COMS:NET:IP<CR><LF> Rx: 0x0000,0x0000,10.0.97.70<CR><LF> |
// Query the IP address
|
COMS:NET:IPCONF – Get network config summary
Outputs a summary of network configuration in human readable form.
Query: | COMS:NET:IPCONF<CR><LF> |
|
Response: | <summary> | |
Data | Type | Description |
summary | STRING | ASCII table summarizing the network configuration, see example. |
Examples
Tx: COMS:NET:IPCONF<CR><LF> Rx: 0x0000,0x0000,<CR><LF> Ethernet interface:<CR><LF> IPv4 Address. . . . . . . . . . . :10.0.97.70<CR><LF> Subnet Mask . . . . . . . . . . .:255.255.248.0<CR><LF> Default Gateway . . . . . . . :10.0.96.1<CR><LF> DHCP State. . . . . . . . . . . . :Enabled<CR><LF> |
|
COMS:NET:LINK – Get link up status
Gets a value indicating whether the ethernet interface link is up. This will read back as false when the LAN connector is unplugged for example.
Query: | COMS:NET:LINK<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Link down 1: Link up |
Examples
Tx: COMS:NET:LINK<CR><LF> Rx: 0x0000,0x0000,1<CR><LF> |
// Query // Link is up |
COMS:NET:MAC – Get MAC address
Gets the Ethernet interface MAC address.
Query: | COMS:NET:MAC<CR><LF> |
|
Response: | <mac> | |
Data | Type | Description |
mac | MAC |
MAC address, 12 hexadecimal characters grouped into pairs separated by a colon, for example "44:b7:d0:c7:16:75" |
Examples
Tx: COMS:NET:MAC<CR><LF> Rx: 0x0000,0x0000,44:b7:d0:c7:16:75<CR><LF> |
// Query
|
COMS:NET:NETMASK – Subnet mask
Gets or sets the subnet mask. When DHCP is enabled, the value read back will be the value assigned by DHCP rather than any value you might have set. Any value set however is retained, and will apply if DHCP is disabled at a later time.
Command: | COMS:NET:NETMASK,<mask><CR><LF> |
|
Query: | COMS:NET:NETMASK<CR><LF> |
|
Response: | <mask> | |
Data | Type | Description |
mask | DOTTED DECIMAL | Mask |
COMS:NET:NETMASK<CR><LF> 0x0000,0x0000,255.255.248.0<CR><LF> |
// Query
|
Coms: Serial
COMS:SERIAL:BAUD – Baud rate
Gets or sets the baud rate.
Command: | COMS:SERIAL:BAUD,<baud><CR><LF> | ||
Query: |
COMS:SERIAL:BAUD<CR><LF> |
||
Response: | <baud> |
||
Data | Type | Description |
|
baud | UINT |
Baud rate:
4800 |
Examples
COMS:SERIAL:BAUD,9600<CR><LF> 0x0000,0x0000,9600<CR><LF> COMS:SERIAL:BAUD<CR><LF> 0x0000,0x0000,9600<CR><LF> |
// Set 9600 baud
// Query |
COMS:SERIAL:MODE – RS232/RS485 mode selection
Gets or sets the serial coms mode, either RS232 or RS485. Unplug from the host device before changing the mode.
Command: | COMS:SERIAL:MODE,<mode><CR><LF> | ||
Query: |
COMS:SERIAL:MODE<CR><LF> |
||
Response: | <mode> |
||
Data | Type | Description |
|
mode | UINT |
0: RS232 [1: RS485] |
Examples
COMS:SERIAL:MODE,1<CR><LF> 0x0000,0x0000,1<CR><LF> COMS:SERIAL:MODE<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Set RS485 mode
// Query |
COMS:SERIAL:RS485DEL – Turnaround delay
Gets or sets a value in milliseconds specifying the delay to execute between receipt of a command from the host and the client (SMD4) sending the response. Applicable to RS485 mode only.
The RS485 interface is half duplex (it can send or receive data, but cannot do both at once) and so by default is in the receive state. The interface switches to transmit mode when a command has been received, executed and a response is ready to send. The turnaround delay is used to insert an additional delay following execution of the command but preceding switching to transmit, to allow the host more time to switch into receive mode.
Experiment with increasing this setting if you find that host receives a response with a portion missing from the start of the response, for example missing some or all of the status an error flags.
Command: | COMS:SERIAL:RS485DEL,<delay><CR><LF> | ||
Query: |
COMS:SERIAL:RS485DEL<CR><LF> |
||
Response: | <delay> |
||
Data | Type | Description |
|
delay | UINT |
Delay in milliseconds.
Default: 0 Minimum: 0 Maximum: 1000 |
Examples
COMS:SERIAL:RS485DEL,10<CR><LF> 0x0000,0x0000,1<CR><LF> COMS:SERIAL:RS485DEL<CR><LF> 0x0000,0x0000,10<CR><LF> |
// Set delay of 10 ms
// Query |
COMS:SERIAL:SLAVEADDR – Slave address
Gets or sets the slave address. Only applicable when addressing mode is used, see addressing section.
Command: | COMS:SERIAL:SLAVEADDR,<address><CR><LF> | ||
Query: |
COMS:SERIAL:SLAVEADDR<CR><LF> |
||
Response: | <address> |
||
Data | Type | Description |
|
address | UINT |
Slave address.
Default: 1 Minimum: 1 Maximum: 247 |
Examples
Tx: COMS:SERIAL:SLAVEADDR,1<CR><LF> Rx: 0x0000,0x0000,1<CR><LF> Tx: COMS:SERIAL:SLAVEADDR<CR><LF> Rx: 0x0000,0x0000,1<CR><LF> |
// Disable termination
// Query |
COMS:SERIAL:TERM – Termination
Gets or sets a value indicating whether RS485 line termination should be used. If enabled, a 120 termination resistance is placed between the RS485 A and B pins. See section on termination.
Command: | COMS:SERIAL:TERM,<state><CR><LF> |
|
Query: |
COMS:SERIAL:TERM<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disable [1: Enable] |
Examples
COMS:SERIAL:TERM,0<CR><LF> 0x0000,0x0000,0<CR><LF> COMS:SERIAL:TERM<CR><LF> 0x0000,0x0000,0<CR><LF> |
// Disable termination
// Query |
Encoder
ENC:BSN – Board serial number
Gets the encoder board serial number. If the encoder module is not present an empty string is returned.
Query: |
ENC:BSN<CR><LF> |
|
Response: | <serial> | |
Data | Type | Description |
serial | STRING |
Encoder board serial number. |
Examples
ENC:BSN<CR><LF> 0x0000,0x0000,1232492<CR><LF> |
// Query |
ENC:DAT – Encoder readout
Gets the latest data from the encoder. If the encoder module is not present, all values read as zero. Data relating to a particular type of encoder (incremental, or BiSS absolute) are only applicable when that type of encoder connected and otherwise are of undefined value.
Query: |
ENC:DAT<CR><LF> |
|
Response: | <flags>,<incremental ab count>,<incremental z count>,<absolute count>,<absolute position>,<absolute velocity>,<relative position>,<relative velocity> | |
Data | Type | Description |
flags | UINT |
Encoder status flags. 16 bit value presented as an unsigned integer. The bits are:
Bit Description 0: Incremental P limit signal 1: Incremental Q limit signal 2: Incremental E (error) signal 3: BiSS CRC error 4: BiSS warning 5: BiSS error 6: reserved 6 7: reserved 7 8: Installed 9: Online 10: reserved 10 11: reserved 11 12: reserved 12 13: reserved 13 14: reserved 14 15: reserved 15 |
incremental ab count | INT |
Incremental encoder AB (position) count. |
incremental z count | UINT |
Incremental encoder Z (reference marker) count. The value increments once per transition, which means that the counter will increment by 2 if it passes cleanly over the reference mark in either direction. |
absolute count | INT |
Absolute encoder count |
absolute position | FLOAT |
Absolute position determined from the encoder. If the encoder is incremental then then the value is pseudo-absolute as explained <here>. |
absolute velocity | FLOAT |
Absolute velocity determined from the encoder |
relative position | FLOAT |
Relative position determined from the encoder. |
relative velocity | FLOAT |
Relative velocity determined from the encoder. |
Examples
ENC:DAT<CR><LF> 0x88c6,0x0000,888,7708795,128,0,5.00371093750000E+01,0.00000000000000E+00,5.00371093750000E+01,0.00000000000000E+00<CR><LF> |
// Query |
ENC:DPC – Displacement per count
Get or set the displacement per count, i.e. the distance represented by one encoder count.
Command: |
ENC:DPC,<dpc><CR><LF> |
|
Query: |
ENC:DPC<CR><LF> |
|
Response: | <dpc> | |
Data | Type | Description |
dpc | FLOAT |
Displacement per count. |
Examples
ENC:DPC<CR><LF> 0x0000,0x0000,50E-09<CR><LF> |
// The displacement per count is 50e-9. If this were a linear encoder and the units were meters, then this would mean 50 nm. |
ENC:FLIP – Flip
Gets or sets a value indicating whether the encoder readout should be flipped/inverted, such that positive is negative and vice versa. This is done internally by multiplying the encoder count by 1 when flip is disabled, and -1 when flip is enabled, and is applied as the last processing step (i.e. after offsets and other adjustments have been applied).
Command: |
ENC:FLIP,<state><CR><LF> |
|
Query: |
ENC:FLIP<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
[0: Disable] 1: Enable |
Examples
ENC:FLIP<CR><LF> 0x0000,0x0000,0<CR><LF> |
// Flip is disabled |
ENC:FLIP:AUTOSET - Autoset flip
Starts a process that automatically determines the correct flip setting. This takes a few seconds and is done by moving the motor a small amount, checking the resulting encoder displacement and then changing the flip setting if required. The motor is moved back to its initial position when the process completed.
Command: |
ENC:FLIP:AUTOSET<CR><LF> |
|
Response: |
Examples
ENC:FLIP:AUTOSET<CR><LF> 0x0000,0x0000<CR><LF> |
// Autoset flip ran successfully |
ENC:FW - Firmware version
Gets the encoder module firmware version.
Query: |
ENC:FW<CR><LF> |
|
Response: | <version> | |
Data | Type | Description |
version | STRING |
Encoder firmware version |
Examples
ENC:FW<CR><LF> 0x0886,0x0000,24285.79<CR><LF> |
// Firmware version is 24285.79 |
ENC:INC:LIMITS:EN - Incremental PQ limits enable
Gets or sets a value indicating whether incremental PQ limits should be enabled. PQ limits can be configured as desired with the other related settings, and this option used to enable or disable them.
Command: |
ENC:INC:LIMITS:EN,<state><CR><LF> |
|
Query: |
ENC:INC:LIMITS:EN<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
[0: Disable] 1: Enable |
ENC:INC:LIMITS:P:EN - Incremental P limit enable
Gets or sets a value indicating whether incremental P limit should be enabled.
Command: |
ENC:INC:LIMITS:P:EN,<state><CR><LF> |
|
Query: |
ENC:INC:LIMITS:P:EN<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
[0: Disable] 1: Enable |
ENC:INC:LIMITS:Q:EN - Incremental Q limit enable
Gets or sets a value indicating whether incremental Q limit should be enabled.
Command: |
ENC:INC:LIMITS:Q:EN,<state><CR><LF> |
|
Query: |
ENC:INC:LIMITS:Q:EN<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
[0: Disable] 1: Enable |
ENC:INC:LIMITS:STOPMODE - Incremental PQ limits stop mode
Gets or sets the incremental PQ limits stop mode.
Command: |
ENC:INC:LIMITS:STOPMODE,<mode><CR><LF> |
|
Query: |
ENC:INC:LIMITS:STOPMODE<CR><LF> |
|
Response: | <mode> | |
Data | Type | Description |
mode | UINT |
[0: Hard stop; the motor will stop immediately on a limit being triggered] 1: Soft stop; the motor decelerates according to the profile
|
Remarks
When using hard stop, keep in mind that steps may be lost depending on the slewing speed and load on the motor. Treat position counters with caution until the true position has been established. Conversely, when using soft stop, ensure that the motor can decelerate to a stop before the physical end of travel is reached and steps are lost.
ENC:INC:LIMITS:SWAP - Incremental PQ limits swap
Gets or sets a value indicating whether the P and Q limits should be swapped. The standard configuration is for the P limit to be positioned at the end of the scale reached by the encoder count incrementing, and the Q limit the end of the scale reached by the encoder count decrementing. If this does not match your configuration, enable swap.
Command: |
ENC:INC:LIMITS:SWAP,<state><CR><LF> |
|
Query: |
ENC:INC:LIMITS:SWAP<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
[0: Disable] 1: Enable |
ENC:INC:RSTZ - Incremental reset Z
Reset the incremental counter Z count.
Command: |
ENC:INC:RSTZ<CR><LF> |
ENC:OFS - Offset
Gets or sets the encoder position offset. This value is summed with the raw encoder position to arrive at the final readout. Use this to set the encoder zero as desired.
Command: |
ENC:OFS,<offset><CR><LF> |
|
Query: |
ENC:OFS<CR><LF> |
|
Response: | <offset> | |
Data | Type | Description |
offset | FLOAT |
Offset value. |
ENC:SEL - Selection
Gets or sets the encoder selection.
Command: |
ENC:SEL,<selection><CR><LF> |
|
Query: |
ENC:SEL<CR><LF> |
|
Response: | <selection> | |
Data | Type | Description |
selection | UINT |
[0: None] 1: Incremental 2: Absolute |
ENC:USEINCE - Use incremental E signal
Gets or sets a value indicating whether the incremental encoder E (error) signal should be used. Not all encoders have this signal so disable this option when that is the case.
Command: |
ENC:USEINCE,<state><CR><LF> |
|
Query: |
ENC:USEINCE<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disabled [1: Enabled] |
Hardware limits
LIMIT:EN – Limits global enable
Gets or sets global limit enable state. If this setting is false, limits are disabled regardless of the state of any other limits configuration item. This does not affect other limits configuration settings, allowing limits to be configured as desired, then globally enabled or disabled if required.
Command: |
LIMIT:EN, <state><CR><LF> |
|
Query: |
LIMIT:EN<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
[0: Disabled] 1: Enabled |
Examples
LIMIT:EN,0<CR><LF> 0x0000,0x0000,0<CR><LF> LIMIT:EN<CR><LF> 0x0000,0x0000,0<CR><LF> |
// Disable limits globally
// Query
|
LIMIT:EN-, LIMIT:EN+ Negative limit enable, positive limit enable
Gets or sets the negative limit (corresponding to decrementing step counter), or positive limit (corresponding to incrementing step counter) enable.
Command: |
LIMIT:ENx,<state><CR><LF> |
|
Query: |
LIMIT:ENx<CR><LF> |
|
Response: | <state> | |
Where 'x' is '-' for negative or '+' for positive limit. | ||
Data | Type | Description |
state | BOOL |
[0: Disabled] 1: Enabled |
Examples
LIMIT:EN+,1<CR><LF> 0x0000,0x0000,1<CR><LF> LIMIT:EN-<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Set positive limit enable
// Query negative limit enable state
|
LIMIT:POL – Global limit polarity
Set the polarity for both limits at once.
Command: |
LIMIT:POL,<polarity><CR><LF> |
|
Response: | <polarity> | |
Where 'x' is '-' for negative or '+' for positive limit. | ||
Data | Type | Description |
polarity | UINT |
[0: Active high] 1: Active low |
Examples
Tx: LIMIT:POL,1<CR><LF> Rx: 0x0000,0x0000,1<CR><LF> |
// Set polarity of both limits to active low
|
LIMIT:POL-, LIMIT:POL+ Negative limit polarity, positive limit polarity
Gets or sets the negative or positive limit polarity.
Command: |
LIMIT:POLx,<polarity><CR><LF> |
|
Query: |
LIMIT:POLx<CR><LF> |
|
Response: | <state> | |
Where 'x' is '-' for negative or '+' for positive limit. | ||
Data | Type | Description |
polarity | UINT |
[0: Active high] 1: Active low |
Examples
LIMIT:POL-,1<CR><LF> 0x0000,0x0000,1<CR><LF> LIMIT:POL+<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Set negative limit polarity to active low
// Query positive limit polarity
|
LIMIT:STOPMODE – Limit stop mode
Gets or sets the limits stop mode, which determines behaviour on limit being triggered.
Command: |
LIMIT:STOPMODE,<mode><CR><LF> |
|
Query: |
LIMIT:STOPMODE<CR><LF> |
|
Response: | <mode> | |
Data | Type | Description |
mode | UINT |
[0: Hard stop; the motor will stop immediately on a limit being triggered] 1: Soft stop; the motor decelerates according to the profile |
Remarks
When using hard stop, keep in mind that steps may be lost depending on the slewing speed and load on the motor. Treat position counters with caution until the true position has been established. Conversely, when using soft stop, ensure that the motor can decelerate to a stop before the physical end of travel is reached and steps are lost.
Examples
LIMIT:STOPMODE,1<CR><LF> 0x0000,0x0000,1<CR><LF> LIMIT:STOPMODE<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Set soft stop mode
// Query
|
Motion control
MCON:ESTOP – Emergency stop
Stop motor immediately disregarding deceleration profile and disable the motor. This should not be relied on as a safety interlock.
Command: |
MOTOR:ESTOP<CR><LF> |
Remarks
The motor may stop on a fractional step position, but this is irrelevant as motor power is removed and the motor will snap to a full step position. Steps may be lost.
Examples
MCON:ESTOP<CR><LF> 0x0000,0x0000<CR><LF> |
// Stop the motor immediately
|
MCON:MPRESET - Mech preset
Apply a preset mechanism configuration. Drive properties including displacement per step, encoder and limits configuration will be set to suit the chosen mechanism. All AML standard mechanisms are available to chose from. Notice that the response is always 0, for both command and query. New presets will be added via firmware update as new mechanisms are released. Presets are discussed <here>.
Command: |
MCON:MPRESET,<preset><CR><LF> |
|
|
|
Query: |
MCON:MPRESET<CR><LF> |
|
|
|
Response: | <0> | |||
Data | Type | Description |
||
preset | UINT | 0: None 1: VSM17-X-050 2: VSM17-X-100 3: VSM17-X-150 4: VSM17-X-200 5: VSM17-X-050-HR 6: VSM17-X-100-HR 7: VSM17-X-150-HR 8: VSM17-X-200-HR 9: VSM17-X-050-LS 10: VSM17-X-100-LS 11: VSM17-X-150-LS 12: VSM17-X-200-LS 13: VSM17-X-050-HR-LS 14: VSM17-X-100-HR-LS 15: VSM17-X-150-HR-LS 16: VSM17-X-200-HR-LS 17: VSM17-X-050-EA 18: VSM17-X-100-EA 19: VSM17-X-150-EA 20: VSM17-X-200-EA 21: VSM17-X-050-HR-EA 22: VSM17-X-100-HR-EA 23: VSM17-X-150-HR-EA 24: VSM17-X-200-HR-EA 25: VSM17-X-050-ER 26: VSM17-X-100-ER 27: VSM17-X-150-ER 28: VSM17-X-200-ER 29: VSM17-X-050-HR-ER 30: VSM17-X-100-HR-ER 31: VSM17-X-150-HR-ER 32: VSM17-X-200-HR-ER 33: VSM23-X-100 34: VSM23-X-150 35: VSM23-X-200 36: VSM23-X-250 37: VSM23-X-300 38: VSM23-X-350 39: VSM23-X-400 40: VSM23-X-450 41: VSM23-X-100-HR 42: VSM23-X-150-HR 43: VSM23-X-200-HR 44: VSM23-X-250-HR 45: VSM23-X-300-HR 46: VSM23-X-350-HR 47: VSM23-X-400-HR 48: VSM23-X-450-HR 49: VSM23-X-100-LS 50: VSM23-X-150-LS 51: VSM23-X-200-LS 52: VSM23-X-250-LS 53: VSM23-X-300-LS 54: VSM23-X-350-LS 55: VSM23-X-400-LS 56: VSM23-X-450-LS 57: VSM23-X-100-HR-LS 58: VSM23-X-150-HR-LS 59: VSM23-X-200-HR-LS 60: VSM23-X-250-HR-LS 61: VSM23-X-300-HR-LS 62: VSM23-X-350-HR-LS 63: VSM23-X-400-HR-LS 64: VSM23-X-450-HR-LS 65: VSM23-X-100-EA 66: VSM23-X-150-EA 67: VSM23-X-200-EA 68: VSM23-X-250-EA 69: VSM23-X-300-EA |
70: VSM23-X-350-EA 71: VSM23-X-400-EA 72: VSM23-X-450-EA 73: VSM23-X-100-HR-EA 74: VSM23-X-150-HR-EA 75: VSM23-X-200-HR-EA 76: VSM23-X-250-HR-EA 77: VSM23-X-300-HR-EA 78: VSM23-X-350-HR-EA 79: VSM23-X-400-HR-EA 80: VSM23-X-450-HR-EA 81: VSM23-X-100-ER 82: VSM23-X-150-ER 83: VSM23-X-200-ER 84: VSM23-X-250-ER 85: VSM23-X-300-ER 86: VSM23-X-350-ER 87: VSM23-X-400-ER 88: VSM23-X-450-ER 89: VSM23-X-100-HR-ER 90: VSM23-X-150-HR-ER 91: VSM23-X-200-HR-ER 92: VSM23-X-250-HR-ER 93: VSM23-X-300-HR-ER 94: VSM23-X-350-HR-ER 95: VSM23-X-400-HR-ER 96: VSM23-X-450-HR-ER 97: VSM30-X-500 98: VSM30-X-600 99: VSM30-X-700 100: VSM30-X-800 101: VSM30-X-900 102: VSM30-X-1000 103: VSM30-X-500-HR 104: VSM30-X-600-HR 105: VSM30-X-700-HR 106: VSM30-X-800-HR 107: VSM30-X-900-HR 108: VSM30-X-1000-HR 109: VSM30-X-500-EA 110: VSM30-X-600-EA 111: VSM30-X-700-EA 112: VSM30-X-800-EA 113: VSM30-X-900-EA 114: VSM30-X-1000-EA 115: VSM30-X-500-HR-EA 116: VSM30-X-600-HR-EA 117: VSM30-X-700-HR-EA 118: VSM30-X-800-HR-EA 119: VSM30-X-900-HR-EA 120: VSM30-X-1000-HR-EA 121: VSM30-X-500-ER 122: VSM30-X-600-ER 123: VSM30-X-700-ER 124: VSM30-X-800-ER 125: VSM30-X-900-ER 126: VSM30-X-1000-ER 127: VSM30-X-500-HR-ER 128: VSM30-X-600-HR-ER 129: VSM30-X-700-HR-ER 130: VSM30-X-800-HR-ER 131: VSM30-X-900-HR-ER 132: VSM30-X-1000-HR-ER 133: VSM17-Z-050 134: VSM17-Z-070 135: VSM17-Z-050-LS 136: VSM17-Z-070-LS 137: VSM17-Z-050-EA 138: VSM17-Z-070-EA 139: VSM17-Z-050-ER |
140: VSM17-Z-070-ER 141: VSM17-R-72K 142: VSM17-R-72K-LS 143: VSM17-R-72K-EA 144: VSM17-R-72K-ER 145: VSM17-R-3K6 146: VSM17-R-3K6-LS 147: VSM17-R-3K6-EA 148: VSM17-R-3K6-ER 149: VSM24-R 150: VSM24-R-LS 151: VSM24-R-EA 152: VSM24-R-ER 153: VSM17-G-070 154: VSM17-G-070-LS 155: VSM17-G-114 156: VSM17-G-114-LS 157: VSM17-G-114-EA 158: VSM17-G-114-ER |
Examples
MCON:MPRESET,3<CR><LF> 0x0000,0x0000,0<CR><LF> |
// Set preset for "VSM17-X-150" // Note response is 0, not 3 |
MCON:NUDGE:RUN:NEG – Nudge negative
Trigger a relative move of a distance specified by <MCON:NUDGE:VALUE> in the negative direction. A nudge is a preset relative move, and is the same as using the move relative command, except that in this case the distance is preset beforehand.
Command: |
MCON:NUDGE:RUN:NEG<CR><LF> |
MCON:NUDGE:RUN:POS – Nudge positive
Trigger a relative move of a distance specified by <MCON:NUDGE:VALUE> in the positive direction. A nudge is a preset relative move, and is the same as using the move relative command, except that in this case the distance is preset beforehand.
Command: |
MCON:NUDGE:RUN:NEG<CR><LF> |
MCON:NUDGE:VALUE - Nudge distance
A nudge is a preset relative move, and is the same as using the move relative command, except that in this case the distance is preset beforehand. Use this command to specify the preset distance to move, then MCON:NUDGE:RUN:NEG or MCON:NUDGE:RUN:POS to trigger the move.
Command: |
MCON:NUDGE:VALUE,<displacement><CR><LF> |
|
Query: |
LIMIT:STOPMODE<CR><LF> |
|
Response: | <displacement> | |
Data | Type | Description |
displacement | FLOAT |
Distance to move when nudge is triggered. The value is signed, and the actual relative move executed is displacement * 1 for positive nudge and displacement * -1 for negative nudge. |
MCON:RUNA – Run, absolute position
Move the motor to a specified absolute position.
Command: |
MCON:RUNA,<position><CR><LF> |
|
Response: | <position> | |
Data | Type | Description |
position | FLOAT |
Absolute position to move to.
See <section> for notes on limiting values. |
Examples
SYS:UNIT,0 0x0000,0x0000,0<CR><LF> MCON:RUNA,10<CR><LF> 0x0000,0x0000,1.00000E+1<CR><LF> SYS:UNIT,102 0x0000,0x0000,102<CR><LF> MCON:RUNA,23.5<CR><LF> 0x0000,0x0000<CR><LF> |
// Set units to steps
// Move to position 10 steps
// Set units to mm
// Move to position 23.5 mm (assumes that we've set // displacement per step appropriately first) |
MCON:RUNH - Run, home
Initiate a homing sequence to the specified limit.
Command: |
MCON:RUNH,<direction><CR><LF> |
|
Response: | ||
Data | Type | Description |
direction | STRING |
'+' : Home towards positive limit, step count increases '-': Home towards negative, step count decreases |
Examples
MCON:RUNH,+<CR><LF> 0x0000,0x0000<CR><LF> MCON:RUNH,-<CR><LF> 0x0000,0x0000<CR><LF> |
// Home motor in positive direction
// Home motor in negative dire |
MCON:RUNR - Run, relative position
Move the motor a specified number of steps, relative to the current position.
Command: |
MCON:RUNR,<displacement><CR><LF> |
|
Response: | <displacement> | |
Data | Type | Description |
displacement | FLOAT |
Relative distance to move by.
See <section> for notes on limiting values. |
Examples
MCON:RUNR,2000<CR><LF> 0x0000,0x0000,1<CR><LF> MCON:RUNR,-2000<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Move motor in positive direction by 2000 steps
// Move motor in negative direction by 2000 steps |
MOTOR:RUNV – Run, velocity
Start continuous rotation in specified direction.
Command: |
MCON:RUNV,<direction><CR><LF> |
|
Response: | ||
Data | Type | Description |
direction | STRING |
'+' : Spin in positive direction, step count increases '-': Spin in negative direction, step count decreases |
Examples
MCON:RUNV,+<CR><LF> 0x0000,0x0000<CR><LF> MCON:RUNV,-<CR><LF> 0x0000,0x0000<CR><LF> |
// Spin motor in positive direction
// Spin motor in negative direction |
MCON:SF:EPC - Closed loop (EPC) behaviour
Get or set the EPC behaviour.
Command: |
MCON:SF:EPC,<behaviour><CR><LF> |
|
Query: |
MCON:SF:EPC<CR><LF> |
|
Response: | <behaviour> | |
Data | Type | Description |
behaviour | UINT |
[0: None] 1: Warn 2: Error |
MCON:SF:EPC:EG - Closed loop (EPC) error guard
Get or set the error guard feature. When enabled, if EPC detects that corrections appear to be resulting in positive feedback (i.e. the error is growing with each successive correction rather than reducing) then the current round of EPC is stopped.
Command: |
MCON:SF:EPC:EG,<state><CR><LF> |
|
Query: |
MCON:SF:EPC:EG<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disabled [1: Enabled] |
MCON:SF:EPC:N - Closed loop (EPC) number of iterations
Get or set the EPC number of iterations. Zero has the special meaning of infinity.
Command: |
MCON:SF:EPC:N,<iterations><CR><LF> |
|
Query: |
MCON:SF:EPC:N<CR><LF> |
|
Response: | <iterations> | |
Data | Type | Description |
iterations | UINT |
0: Infinite/unlimited Maximum: 2^32 |
MCON:SF:EPC:T - Closed loop (EPC) tolerance
Get or set the EPC tolerance.
Command: |
MCON:SF:EPC:T,<tolerance><CR><LF> |
|
Query: |
MCON:SF:EPC:T<CR><LF> |
|
Response: | <tolerance> | |
Data | Type | Description |
tolerance | FLOAT |
Position tolerance |
Examples
SYS:UNIT,100 0x0000,0x0000,102<CR><LF> MCON:SF:EPC:T,0.5e-6<CR><LF> 0x0000,0x0000<CR><LF> |
// Set units to meter
// Set tolerance to 0.5 um
|
MCON:SF:GUARD - Guard behaviour
Get or set the guard behaviour.
Command: |
MCON:SF:GUARD,<behaviour><CR><LF> |
|
Query: |
MCON:SF:GUARD<CR><LF> |
|
Response: | <behaviour> | |
Data | Type | Description |
behaviour | UINT |
[0: None] 1: Warn 2: Error |
MCON:SF:GUARD:n - Guard value n
Get or set the guard value, where n is 1 or 2.
Command: |
MCON:SF:GUARD:n,<position><CR><LF> |
|
Query: |
MCON:SF:GUARD:n<CR><LF> |
|
Response: | <position> | |
Data | Type | Description |
position | FLOAT |
See <section> for notes on limiting values. |
MCON:SF:ROML- Range of motion limiter behaviour
Get or set the range of motion limiter behaviour.
Command: |
MCON:SF:ROML,<behaviour><CR><LF> |
|
Query: |
MCON:SF:ROML<CR><LF> |
|
Response: | <behaviour> | |
Data | Type | Description |
behaviour | UINT |
[0: None] 1: Warn 2: Error |
MCON:SF:ROML:n - Range of motion limiter value n
Get or set the range of motion limiter value, where n is 1 or 2.
Command: |
MCON:SF:ROML:n,<position><CR><LF> |
|
Query: |
MCON:SF:ROML:n<CR><LF> |
|
Response: | <position> | |
Data | Type | Description |
position | FLOAT |
See <section> for notes on limiting values. |
MCON:SF:ROML:J - Range of motion limiter enable for joystick and step/direction
Get or set a value indicating whether the function should be applied when using the joystick or step direction mode.
Command: |
MCON:SF:ROML:J,<state><CR><LF> |
|
Query: |
MCON:SF:ROML:J<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disabled [1: Enabled] |
MCON:SSTOP – Stop motor in <=1 s
Decelerates the motor to a stop within 1 second, disregarding the current profile to do so.
Command: |
MOTOR:SSTOP<CR><LF> |
Remarks
This command does not consider the deceleration set in the profile. Instead, it calculates the deceleration required to stop in 1 second, according to the actual velocity. The motor will stop in a full step position. Steps may be lost if the load requires greater than this duration to stop.
Examples
MCON:SSTOP<CR><LF> 0x0000,0x0000<CR><LF> |
// Stop the motor in 1 seconds
|
MCON:STOP – Stop motor
Stop the motor, decelerating according to the current profile
Command: |
MCON:SF:STOP<CR><LF> |
Remarks
During the deceleration phase that stops the motor, any modifications to the acceleration or deceleration interrupt the stopping phase. Re-send the command to restart the motor stopping phase.
Examples
MCON:STOP<CR><LF> 0x0000,0x0000<CR><LF> |
// Stop the motor
|
MCON:U - Displacement per step
Get or set a value representing the displacement per step of the mechanism. That is, the distance the mechanism moves per step. This property must be configured correctly to use units other than steps.
Command: |
MCON:U,<displacement><CR><LF> |
|
Query: |
MCON:U<CR><LF> |
|
Response: | <displacement> | |
Data | Type | Description |
displacement | FLOAT |
Displacement per step. |
MCON:ZEROA – Zero absolute position counter
Zero the absolute position counter.
Command: |
MCON:ZEROA<CR><LF> |
MCON:ZEROAR – Zero absolute and relative position counters
Zero the absolute and relative position counters.
Command: |
MCON:ZEROAR<CR><LF> |
MCON:ZEROR – Zero relative position counter
Zero the relative position counter.
Command: |
MCON:ZEROR<CR><LF> |
Motor
MOTOR:xMAX - Acceleration and deceleration
Gets or sets acceleration or deceleration.
Command: |
MOTOR:xMAX,<user value><CR><LF> |
|
Query: |
MOTOR:xMAX<CR><LF> |
|
Response: | <user value>,<real value> | |
Where 'x' is 'A' for acceleration and 'D' for deceleration. | ||
Data | Type | Description |
user value | FLOAT |
See <section> for notes on limiting values. For the response, this is the value as entered. |
real value | FLOAT |
The value, rounded to the closest real value the SMD4 can achieve. |
Examples
MOTOR:AMAX,150<CR><LF> 0x0000,0x0000,1.5000E+02,1.4988E+02<CR><LF> MOTOR:AMAX<CR><LF> 0x0000,0x0000,1.5000E+02,1.4988E+02<CR><LF> |
// Assuming unit is steps, set acceleration to 150Hz/s // Note that the target value of 150 has been adjusted to the // closest real value, which deviates from the requested value // by 0.12 Hz/s |
MOTOR:EDGE – Edge to step on
Gets or sets which edge(s) a step occurs on when in step direction mode.
Command: |
MOTOR:EDGE,<edge><CR><LF> |
|
Query: |
MOTOR:EDGE <CR><LF> |
|
Response: | <edge> | |
Data | Type | Description |
edge | UINT |
[0: Rising edge only] 1: Both rising and falling edges |
Remarks
Use option for both edges to halve the frequency on the step input required to obtain a given step rate.
Examples
MOTOR:EDGE,1<CR><LF> 0x0000,0x0000,1<CR><LF> MOTOR:EDGE<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Set step on both edges
// Query |
MOTOR:F – Freewheel mode
Gets or sets the freewheel mode. For maximum passive braking use phases shorted. Use freewheel to electrically disconnect the motor and allow it to freewheel. Hold current must be set to zero for this option to work.
The chosen mode becomes active after a time period specified by ‘<MOTOR:PDDEL>’ and ‘<MOTOR:IHD>’
Command: |
MOTOR:F,<mode><CR><LF> |
|
Query: |
MOTOR:F <CR><LF> |
|
Response: | <mode> | |
Data | Type | Description |
mode | UINT |
0: Normal |
Remarks
Use the freewheel mode to allow the motor shaft to spin freely when the motor current is zero. The phases shorted to GND option supplies no power to the motor, but by shorting the phases together a holding torque is produced, and the motor shaft offers considerable resistance to movement. This is enough in many applications to remove the need for any holding current, with the benefit that no heat is generated because the motor phases are not energised.
Examples
MOTOR:F,1<CR><LF> 0x0000,0x0000,1<CR><LF> MOTOR:F<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Set to freewheel mode // motor shaft can be turned easily // Query |
MOTOR:Ix – Acceleration, run and hold currents
Gets or sets the motor current in amps RMS applied during acceleration, run and hold phases of operation.
Command: |
MOTOR:Ix,<current><CR><LF> |
|
Query: |
MOTOR:Ix <CR><LF> |
|
Response: | <current> | |
Where 'x' is 'A' for acceleration, 'R' for run and 'H' for hold current. | ||
Data | Type | Description |
current | FLOAT |
[Default: 1.044] |
Remarks
Motor current is rounded to the closest multiple of 1.044 A / 31 (approx. 33 mA), so the queried value may differ slightly from that set for this reason.
Acceleration current must be set equal to or greater than run current. Acceleration current is not adjusted to match run current if acceleration current is smaller than run current.
Run current must be set equal to or smaller than acceleration current. Acceleration current is automatically adjusted to be equal to run current, if a change to run current makes it greater than acceleration current.
If your application allows it, set MOTOR:PDDEL, MOTOR:IHD and MOTOR:IH to zero in order to reduce run current to zero as quickly as possible after stopping which minimises motor temperature rise.
Examples
MOTOR:IA,1.044<CR><LF> 0x0000,0x0000,1.0440E+00<CR><LF> MOTOR:IA<CR><LF> 0x0000,0x0000,1.0440E+00<CR><LF> |
// Set acceleration current to 1.044 A
// Query acceleration current
|
MOTOR:IHD – Delay per current reduction step
Gets or sets the delay in seconds per current reduction step that occurs when run current is reduced to hold current. Non-zero values result in a smooth reduction in current which reduces the chance of a jerk upon power down. The range is 0 to 328 ms, with a resolution of 4 bits or approx. 20 ms. Current setting has a resolution of 5 bits, or 32 steps, and consequently the current reduction process will only have as many steps as exist between the configured run and hold current. See also MOTOR:PDDEL.
If your application allows it, set MOTOR:PDDEL, MOTOR:IHD and MOTOR:IH to zero in order to reduce run current to zero as quickly as possible after stopping which minimises motor temperature rise.
Command: |
MOTOR:IHD,<seconds><CR><LF> |
|
Query: |
MOTOR:IHD <CR><LF> |
|
Response: | <seconds> | |
Data | Type | Description |
seconds | FLOAT |
[Default: 0]
Notice that the duration is in seconds, so to set the value to 100 ms for example, you'd enter '100e-3' or '0.1' |
Remarks
See also section Going to standby
Examples
MOTOR:IHD,328E-3<CR><LF> 0x0000,0x0000,3.2800E-01<CR><LF> MOTOR:IHD<CR><LF> 0x0000,0x0000,3.2800E-01<CR><LF> |
// Set to 328 ms
// Query
|
MOTOR:INTERP – Step interpolation
Gets or sets a value indicating whether the step input should be interpolated to 256 microsteps. Applicable in step direction mode only.
Command: |
MOTOR:INTERP,<mode><CR><LF> |
|
Query: |
MOTOR:INTERP <CR><LF> |
|
Response: | <mode> | |
Data | Type | Description |
mode | UINT |
[0: Normal; each step input will cause one step at the current resolution] 1: Interpolate; each step input will be interpolated to 256 microsteps. |
Remarks
Enabling this feature affords the benefits of high-resolution microstepping, without the drawback of very high step clock rates. Internal logic tracks the rate at which steps are supplied and smooths them out into 256 microsteps; e.g. if resolution is set to full-step and see edge to step on is set to rising, then each rising edge on the step input generates a series of 256 microsteps at the motor.
Examples
MOTOR:INTERP,1<CR><LF> 0x0000,0x0000,1<CR><LF> MOTOR:INTERP<CR><LF> 0x0000,0x0000,1<CR><LF> |
// Enable interpolation
// Query |
MOTOR:PACT – Actual position
Gets or sets the actual position. The usual way to position the motor is to initialise the actual position to some reference value, usually 0, then adjust the target position to move the motor. In this way, by setting MOTOR:RUNA to 0 the motor can be homed to the initial 0 position. If you wish to perform relative movements, while still retaining an absolute reference, see MOTOR:PREL command.
It is best to use the <MCON:ZERO> commands to zero the absolute or relative positions, then use this command to read the position.
Command: |
MOTOR:PACT,<position><CR><LF> |
|
Query: |
MOTOR:PACT<CR><LF> |
|
Response: | <position> | |
Data | Type | Description |
position | FLOAT |
See <section> for notes on limiting values. |
Remarks
Query is applicable any time, Set requires the motor in standby condition.
Examples
MOTOR:PACT<CR><LF> Rx: 0x0000,0x0000,1000.00<CR><LF> MOTOR:PACT,0<CR><LF> Rx: 0x0000,0x0000,0.00<CR><LF> |
// Query
// Set actual position 0 |
MOTOR:PDDEL – Power down delay
Gets or sets the delay time in seconds between stand still occurring and the motor current being reduced from the acceleration current to the hold current. The range is 0 to 5.5 seconds, with approximately 8 bit / 20 ms resolution. See also DelayPerCurrentReductionStep.
If your application allows it, set MOTOR:PDDEL, MOTOR:IHD and MOTOR:IH to zero in order to reduce run current to zero as quickly as possible after stopping which minimises motor temperature rise.
Command: |
MOTOR:PDDEL,<delay><CR><LF> |
|
Query: |
MOTOR:PDDEL<CR><LF> |
|
Response: | <delay> | |
Data | Type | Description |
delay | FLOAT |
Delay in seconds. The response value is rounded to the closest value the SMD4 can set, so may not match the set value exactly.
[Default: 0] Minimum: 0 Maximum: 5.5] |
Examples
MOTOR:PDDEL,100E-3<CR><LF> 0x0000,0x0000,1.0000E-01<CR><LF> MOTOR:PDDEL<CR><LF> 0x0000,0x0000,1.0000E-01<CR><LF> |
// Set to 100 ms
// Query
|
MOTOR:PREL – Relative position
Gets or sets the relative position counter in steps.
Use this function to perform relative movement, while still retaining reference to absolute position via MOTOR:PACT. Set the desired value then use the MOTOR:RUNR command to initiate movement.
Command: |
MOTOR:PREL,<displacement><CR><LF> |
|
Query: |
MOTOR:PREL<CR><LF> |
|
Response: | <displacement> | |
Data | Type | Description |
displacement | FLOAT |
See <section> for notes on limiting values. |
Remarks
Set requires the motor be in standby condition.
Examples
MOTOR:PREL<CR><LF> 0x0000,0x0000,1000.00<CR><LF> MOTOR:PREL,0<CR><LF> 0x0000,0x0000,0.00<CR><LF> |
// Query
// Set relative position 0 |
MOTOR:RES - Resolution
Gets or sets the microstep resolution.
Command: |
MOTOR:RES,<res><CR><LF> |
|
Query: |
MOTOR:RES<CR><LF> |
|
Response: | <res> | |
Data | Type | Description |
res | UINT |
Microstep resolution as an integer.
[Default: 256] Possible values: 8, 16, 32, 64, 128, 256] |
Remarks
Motor must be in standby to set the resolution.
The resolution applies globally, including for the step/direction interface. Each step on the step/direction interface generates a 1/8, 1/16, 1/32 etc. step according to the resolution set here.
Above a configurable step frequency, the drive switches from the microstepping resolution specified here to full step mode in any case. See section <MOTOR:THIGH>
Examples
MOTOR:RES,256<CR><LF> 0x0000,0x0000,256<CR><LF> MOTOR:RES<CR><LF> 0x0000,0x0000,256<CR><LF> |
// Set resolution to 256
// Query
|
MOTOR:SDMODE - Step/direction mode
Gets of sets the step/direction mode. In normal mode, edges on the step input generate steps according to the edge setting, see edge. In triggered mode, continuous motion is triggered by an edge on the step input; this is akin to how continuous mode works for the joystick, see joystick continuous mode.
Command: |
MOTOR:SDMODE,<mode><CR><LF> |
|
Query: |
MOTOR:SDMODE<CR><LF> |
|
Response: | <mode> | |
Data | Type | Description |
mode | UINT |
[0: Normal] 1: Triggered] |
Examples
MOTOR:SDMODE,0<CR><LF> 0x0000,0x0000,0<CR><LF> |
// Set mode 0, normal |
MOTOR:T – Motor temperature
Get the motor temperature in °C.
Query: |
MOTOR:T<CR><LF> |
|
Response: | <temperature> | |
Data | Type | Description |
temperature | INT |
Motor temperature in degrees centigrade. |
Remarks
The reported temperature is intended for monitoring motor temperature only and should not be used for or relied upon for any other purpose.
Examples
MOTOR:T<CR><LF> 0x0000,0x0000,25<CR><LF> |
// Get motor temperature // Response is 25 degrees Celsius |
MOTOR:THIGH – Microstep transition
Gets or sets the full step / microstepping transition. When frequency falls below this threshold (approximately), the motor switches from full step to the selected microstep resolution. The product determines the upper threshold automatically and applies hysteresis to avoid possible jitter between the two stepping modes. The upper threshold cannot be adjusted.
Command: |
MOTOR:THIGH,<user value><CR><LF> |
|
Query: |
MOTOR:THIGH<CR><LF> |
|
Response: | <user value>,<real value> | |
Data | Type | Description |
user value | FLOAT |
See <section> for notes on limiting values. For the response, this is the value as entered. |
real value | FLOAT |
The value, rounded to the closest real value the SMD4 can achieve. |
Remarks
AML Device control software calculates and displays the upper threshold value for reference, although as noted above it cannot be adjusted.
Examples
MOTOR:THIGH,500<CR><LF> 0x0000,0x0000,5.0000E+02,5.0400E+02<CR><LF> MOTOR:THIGH<CR><LF> 0x0000,0x0000,5.0000E+02,5.0400E+02<CR><LF> |
// Set threshold to 500 Hz (assuming units are steps)
// Query |
MOTOR:TSEL – Temperature sensor selection
Gets or sets the motor temperature sensor type.
Command: |
MOTOR:TSEL,<selection><CR><LF> |
|
Query: |
MOTOR:TSEL<CR><LF> |
|
Response: | <selection> | |
Data | Type | Description |
selection | UINT |
[0: Thermocouple] 1: RTD |
Remarks
To protect the motor from possible damage, the motor is disabled if the temperature sensor is faulty or missing. The response is not immediate, and several seconds may elapse between emergence of a fault and the motor being disabled.
Examples
MOTOR:TSEL,0<CR><LF> 0x0000,0x0000,0<CR><LF> MOTOR:TSEL<CR><LF> 0x0000,0x0000,0<CR><LF> |
// Select thermocouple sensor
// Get selected sensor, returning 0 for thermocouple |
MOTOR:TZW – Zero wait time
Gets or sets the waiting time after ramping down to a stop before the next movement or direction inversion can start. Can be used to avoid excess acceleration, e.g. from MOTOR:VSTOP to MOTOR:VSTART.
When using higher values for the start and stop frequency, a subsequent move in the opposite direction would result in a jerk equal to start frequency + stop frequency. The motor may not be able to follow this. Zero wait time can be used to introduce a short delay between the two and eliminate the jerk.
Command: |
MOTOR:TZW,<duration><CR><LF> |
|
Query: |
MOTOR:THIGH<CR><LF> |
|
Response: | <duration> | |
Data | Type | Description |
duration | FLOAT |
Waiting time in seconds:
[Default: 0] Minimum: 0 Maximum: 2.7 s |
Examples
MOTOR:TZW,0.1<CR><LF> 0x0000,0x0000,1.0000E+02<CR><LF> MOTOR:TZW<CR><LF> 0x0000,0x0000,1.0000E+02<CR><LF> |
// Set TZW to 100 ms
// Query |
MOTOR:VACT – Actual velocity
Gets the actual velocity of the motor from the step counters. This value is derived from the stepper motor control logic; there is no feedback from the motor itself. Hence, the motor could be stalled while which continues to indicate the expected.
Query: |
MOTOR:VACT<CR><LF> |
|
Response: | <velocity> | |
Data | Type | Description |
velocity | FLOAT |
Motor velocity. |
Examples
Tx: MOTOR:VACT<CR><LF> Rx: 0x0000,0x0000,1.50E+01<CR><LF> |
// Motor velocity is 15 (assuming units are steps, 15 steps per // second) |
MOTOR:VMAX – Target motor speed
Gets or sets the target motor speed to use when positioning. This is the maximum speed the motor will be run at. This will only be reached if there is enough time or distance to do so; if moving for a short time, for example, the motor may only accelerate to some fraction of the target speed before it is time to decelerate to a stop.
Command: |
MOTOR:VMAX,<user value><CR><LF> |
|
Query: |
MOTOR:VMAX<CR><LF> |
|
Response: | <user value>,<real value> | |
Data | Type | Description |
user value | FLOAT |
See <section> for notes on limiting values. For the response, this is the value as entered. |
real value | FLOAT |
The value, rounded to the closest real value the SMD4 can achieve. |
Remarks
Motor torque decreases with speed, and each motor will have a different maximum speed that it can achieve while reliably maintaining synchronicity (when synchronicity is lost, the motor fails to complete the steps that it is commanded to, leading to a difference between the true and actual positions), depending on the load it is driving.
Target motor speed must be set equal to or greater than start speed and stop speed. Target motor speed is not adjusted to match start speed and stop speed if target speed is smaller than start speed and stop speed.
Examples
MOTOR:VMAX,12.3<CR><LF> 0x0000,0x0000,1.0000E+03,1.0000E+03<CR><LF> MOTOR:VMAX<CR><LF> 0x0000,0x0000,1.0000E+03,1.0000E+03<CR><LF> |
// Set speed to 12.3 (assuming units are degrees, this means // 12.3°/second |
MOTOR:VSTART – Start speed
Get or set the start speed. Must be set less than or equal to MOTOR:VSTOP. The acceleration ramp starts from this speed.
The start speed is the initial step rate, and helps to allow the motor to overcome inertia and start moving smoothly; if start speed were zero, the duration of the initial few steps might be long enough that the motor would overcome inertia on the first step, then effectively stop for a time, then have to overcome inertia once more for the second step, and so on, until the steps were frequent enough that the motor remains moving.
Command: |
MOTOR:VSTART,<user value><CR><LF> |
|
Query: |
MOTOR:VSTART<CR><LF> |
|
Response: | <user value>,<real value> | |
Data | Type | Description |
user value | FLOAT |
Valid range in steps per second (if using other units, convert these values to your unit using the displacement per count value to determine the limits in your unit):
[Default: 100] Minimum: 1 Maximum: 700
For the response, this is the value as entered. |
real value | FLOAT |
The value, rounded to the closest real value the SMD4 can achieve. |
Remarks
Start speed must be set equal to or less than stop speed. If a change to start speed makes it bigger than stop speed, stop speed is automatically adjusted to be equal to start speed.
Start speed must be set equal to or less than target speed. Start speed is not adjusted to match target speed if start speed is greater than target speed.
Examples
MOTOR:VSTART,0<CR><LF> 0x0000,0x0000,0.0000+00,0.0000+00<CR><LF> MOTOR:VSTART<CR><LF> 0x0000,0x0000,0.0000+00,0.0000+00<CR><LF> |
// Assuming units are steps... // Set start frequency to 0 Hz
// Query |
MOTOR:VSTOP – Stop speed
Get or set the stop speed. Must be greater than or equal to MOTOR:VSTART. The deceleration ramp ends at this speed. The final step before stop will occur at this speed.
The stop speed is the speed at which the deceleration ramp ends; i.e. the deceleration ramp does not go from the target speed linearly down to 0, but from the target speed linearly down to the stop speed.
Command: |
MOTOR:VSTOP,<user value><CR><LF> |
|
Query: |
MOTOR:VSTOP<CR><LF> |
|
Response: | <user value>,<real value> | |
Data | Type | Description |
user value | FLOAT |
Valid range in steps per second (if using other units, convert these values to your unit using the displacement per count value to determine the limits in your unit):
[Default: 100] Minimum: 1 Maximum: 700
For the response, this is the value as entered. |
real value | FLOAT |
The value, rounded to the closest real value the SMD4 can achieve. |
Remarks
Start speed must be set equal to or less than stop speed. If a change to start speed makes it bigger than stop speed, stop speed is automatically adjusted to be equal to start speed.
Start speed must be set equal to or less than target speed. Start speed is not adjusted to match target speed if start speed is greater than target speed
Examples
MOTOR:VSTOP,10<CR><LF> 0x0000,0x0000,1.0000+01,9.9996+00<CR><LF> MOTOR:VSTOP<CR><LF> 0x0000,0x0000,1.0000+01,9.9996+00<CR><LF> |
// Assuming units are steps... // Set stop frequency to 10 Hz // Notice the closest real value of 9.9996 Hz set // Query |
System
SYS:BSN – Get motherboard serial number
Gets the serial number of the motherboard.
Query: |
SYS:BSN<CR><LF> |
|
Response: | <serial> | |
Data | Type | Description |
serial | STRING |
Board serial number |
Examples
SYS:BSN<CR><LF> 0x088e,0x0000,1234ABCD<CR><LF> |
// Query
|
SYS:CLR – Clear faults
Clear all error flags.
Command: |
SYS:CLR<CR><LF> |
SYS:EXTEN – External enable used
Gets or sets a value indicating whether the external enable signal should be respected. If not using the external enable and it remains disconnected, set to false.
Command: |
SYS:EXTEN,<state><CR><LF> |
|
Query: |
SYS:EXTEN<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disabled [1: Enabled] |
Remarks
The external enable input requires a voltage to be applied between SDE COM and EN on the I/O connector which may be inconvenient if you do not wish to use the enable input. In that case, disable the enable input by sending this command with the argument set to false.
SYS:FLAGS – Get status and error flags
Gets status and error flags, per <section>.
SYS:FLAGSV – Get status and error flags summary
Gets a human readable summary of status and error flags. Set flags are marked by an 'x'.
Query: |
SYS:FLAGSV<CR><LF> |
|
Response: | <verbose flags> | |
Data | Type | Description |
verbose flags | BOOL |
0: Disabled [1: Enabled] |
SYS:FLAGSV<CR><LF> 0x0886,0x0000,
-------Status flags------
-------Error flags------- |
SYS:FW – Get firmware version
Gets firmware version string.
Query: |
SYS:FW<CR><LF> |
|
Response: | <version> | |
Data | Type | Description |
version | STRING |
Firmware version. |
Examples
Tx: SYS:FW<CR><LF> Rx: 0x088e,0x0000,24044.12<CR><LF> |
// Query
|
SYS:IDENT - Blink the status indicator to help identify the unit
Gets or sets a value indicating whether the identify function is enabled. When set to true, the green status light on the front of the product flashes. This can be used to help identify one device amongst several.
Command: |
SYS:IDENT,<state><CR><LF> |
|
Query: |
SYS:IDENT<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
[0: Disabled] 1: Enabled |
Examples
Tx: SYS:IDENT,1<CR><LF> Rx: 0x0000,0x0000,1<CR><LF> Tx: SYS:IDENT<CR><LF> Rx: 0x0000,0x0000,1<CR><LF> |
// Set ident function on
// Query state of ident function
|
SYS:JS:EN – Enable joystick input
Gets or sets a value indicating whether the joystick input should be enabled.
Command: |
SYS:JS:EN,<state><CR><LF> |
|
Query: |
SYS:JS:EN<CR><LF> |
|
Response: | <state> | |
Data | Type | Description |
state | BOOL |
0: Disabled [1: Enabled] |
SYS:JS:MODE – Joystick mode
Gets or sets the joystick mode. See <section>.
Command: |
SYS:JS:MODE,<mode><CR><LF> |
|
Query: |
SYS:JS:MODE<CR><LF> |
|
Response: | <mode> | |
Data | Type | Description |
state | UINT |
[0: Single step] 1: Continuous 2: Nudge |
SYS:LOAD – Load last stored settings
Load the last saves configuration.
Command: |
SYS:LOAD<CR><LF> |
SYS:LOADFD – Load factory default settings
Load the factory default configuration. Use the store command if you want to persist the changes.
Command: |
SYS:LOADFD,<mode><CR><LF> |
SYS:MODE - Choose mode of operation
Gets or sets the operating mode. See section Operating Modes for an explanation of each mode. The motor must be stopped before changing mode.
Command: |
SYS:MODE,<mode><CR><LF> |
|
Query: |
SYS:MODE<CR><LF> |
|
Response: | <mode> (name) | |
Data | Type | Description |
mode | UINT |
Mode number:
0: Step/direction 1: Normal 3: Bake |
name | STRING |
A space follows the mode number, then the mode name in round brackets. |
SYS:MODE,1<CR><LF> 0x0000,0x0000,1 (Remote)<CR><LF> SYS:MODE<CR><LF> 0x0000,0x0000,1 (Remote)<CR><LF> |
// Set mode to remote
// Query state of mode
|
SYS:NAME – Device name tag
Gets or sets a name tag for the SMD4.
Query: |
SYS:NAME<CR><LF> |
|
Response: | <name> | |
Data | Type | Description |
name | STRING |
Name for this SMD4. |
Examples
Tx: SYS:NAME<CR><LF> Rx: 0x088e,0x0000,MyDevice<CR><LF> |
// Query
|
SYS:PROG – Enter programming mode
Reboot the SMD4 into programming mode. Used by AML device control software to initiate a firmware update. Power cycle to cancel this mode. There is no response to this command.
Command: |
SYS:PROG<CR><LF> |
Examples
SYS:PROG<CR><LF> |
SYS:RESET– Restart the SMD4
Reboot the SMD4. There is no response to this command.
Command: |
SYS:RESET<CR><LF> |
SYS:SER – Get product serial number
Gets the serial number of the product. This matches the serial number label installed on the product.
Query: |
SYS:SER<CR><LF> |
|
Response: | <serial> | |
Data | Type | Description |
serial | STRING |
Serial number of the SMD4. |
Examples
Tx: SYS:SER<CR><LF> Rx: 0x088e,0x0000,00000-000<CR><LF> |
// Query
|
SYS:STORE
Save the current settings. These settings will be loaded on restart.
Command: |
SYS:STORE<CR><LF> |
SYS:UNITS
Get or set the measurement units used.
Command: |
SYS:UNITS,<units><CR><LF> |
|
Query: |
SYS:UNITS<CR><LF> |
|
Response: | <units> | |
Data | Type | Description |
units | UINT |
[0: Step]
100: Meter 101: Inch 102: Millimeter 103: Micron
200: Degree 201: Radian 202: Revolution |
SYS:UPTIME – Get uptime
Gets the elapsed time since start up in milliseconds.
Query: |
SYS:UPTIME<CR><LF> |
|
Response: | <uptime> | |
Data | Type | Description |
uptime | UINT |
Uptime in milliseconds. |
SYS:UPTIME<CR><LF> 0x088e,0x0000,10000<CR><LF> |
// Query // Uptime is 10 seconds |
SYS:UUID – Get UUID
Gets a unique ID number which is included in the data reported when using SSDP. See SSDP. Not the same as the MAC address.
Query: |
SYS:UUID<CR><LF> |
|
Response: | <uuid> | |
Data | Type | Description |
uuid | STRING |
UUID string |
Examples
Tx: SYS:UUID<CR><LF> Rx: 0x088e,0x0000,f4562fb1-d002-11ee-b3e5-44b7d0c71675<CR><LF> |
// Query
|