User Tools

Site Tools


command_quick_start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
command_quick_start [2023/11/08 19:19] – [Command Syntax] joncommand_quick_start [2026/10/12 19:44] (current) – jon
Line 3: Line 3:
 This section is intended to quickly bring the users up to speed on the most common serial commands.  Find separately [[commands|an index of all commands]] and a [[products/serial_commands|compiled list of commands]]; separate documentation for each command are linked there. This section is intended to quickly bring the users up to speed on the most common serial commands.  Find separately [[commands|an index of all commands]] and a [[products/serial_commands|compiled list of commands]]; separate documentation for each command are linked there.
  
-There is a separate page detailing the [[tech_note_rs232_comm|communication details]] (also includes notes on various software that can be used to send serial commands directly or indirectly including Python, Julia, Micro-Manager, LabView, etc).  Serial commands are not case-sensitive.  For commands that require a numeric input, if none is specified then the value is taken to be 0.+There is a separate page detailing the [[tech_note_rs232_comm|communication details]] (also includes notes on various software that can be used to send serial commands directly or indirectly including [[python|Python]], Julia, [[micro-manager|Micro-Manager]], [[labview|LabView]], etc).  Serial commands are not case-sensitive.  For commands that require a numeric input, if none is specified then the value is taken to be 0.
  
 The most common commands are identical across both the MS-2000/RM-2000 controller and the TG-1000 "Tiger" controller.  Any "axis-specific" commands that specifies a physical axis that the command applies to will be identical (e.g. ''M'', ''R'', ''W'' for absolute and relative moves along with position query) along with the busy query ''/''.  Commands that use a letter to specify what the setting is (e.g. ''TTL X'' sets TTL input mode and ''TTL Y'' sets TTL output mode) are slightly different on Tiger in that the card address must be prepended.  There is a full description of [[tiger_ms2k_difference|TG-1000 and MS-2000’s instruction set differences]].  The most common commands are identical across both the MS-2000/RM-2000 controller and the TG-1000 "Tiger" controller.  Any "axis-specific" commands that specifies a physical axis that the command applies to will be identical (e.g. ''M'', ''R'', ''W'' for absolute and relative moves along with position query) along with the busy query ''/''.  Commands that use a letter to specify what the setting is (e.g. ''TTL X'' sets TTL input mode and ''TTL Y'' sets TTL output mode) are slightly different on Tiger in that the card address must be prepended.  There is a full description of [[tiger_ms2k_difference|TG-1000 and MS-2000’s instruction set differences]]. 
  
-Note that ASI filter wheels have a completely separate command set described in the [[:fw_1000#fw_1000_operation_and_programming|filter wheel documentation]].  along with a different serial terminator.  Also see the documentation for [[:fw_1000#communicating_with_tiger-based_filter_wheel_card|TG-1000 filter wheel communication]].+Note that ASI filter wheels have a completely separate command set described in the [[:fw_1000#fw-1000_ascii_command_set|filter wheel documentation]], along with a different serial terminator. Also see the documentation for [[:fw_1000#communicating_with_tiger_controller_filter_wheel_card|TG-1000 filter wheel communication]].
  
 ===== Most common commands ===== ===== Most common commands =====
Line 14: Line 14:
 ^ ''[[commands:move|MOVE]]'' ^ ''[[commands:move|M]]'' | Initiates move to absolute position | 10ths of microns | Axis | ''M X=10000'' moves to position 1.000 mm per current origin | ^ ''[[commands:move|MOVE]]'' ^ ''[[commands:move|M]]'' | Initiates move to absolute position | 10ths of microns | Axis | ''M X=10000'' moves to position 1.000 mm per current origin |
 ^ ''[[commands:movrel|MOVREL]]'' ^ ''[[commands:movrel|R]]'' | Initiates move a specified distance from current position | 10ths of microns | Axis | ''R X=-1000'' moves 100um in negative direction | ^ ''[[commands:movrel|MOVREL]]'' ^ ''[[commands:movrel|R]]'' | Initiates move a specified distance from current position | 10ths of microns | Axis | ''R X=-1000'' moves 100um in negative direction |
-^ ''[[commands:where|WHERE]]'' ^ ''[[commands:where|W]]'' | Queries the absolute position of the axis | 10ths of microns | Axis | ''W X'' returns '':A 1000 '' if the absolute position is 100um relative to the origin | +^ ''[[commands:halt|HALT]]'' ^ ''[[commands:halt|\]]'' | Stops all active motors and actuators | - | Broadcast; TG-1000 card address allowed, but only with the full ''HALT'' | ''\'' halts motion; follow with ''/'', which returns ''N'' once all axes have stopped | 
-^ ''[[commands:here|HERE]]'' ^ ''[[commands:here|H]]'' | Sets the origin of the coordinate system for the specified axis | 10ths of microns | Axis | ''H X'' sets the current position of the X axis to be 0  | +^ ''[[commands:where|WHERE]]'' ^ ''[[commands:where|W]]'' | Queries the absolute position of the axis | 10ths of microns | Axis | ''W X'' returns '':A 1000'' if the absolute position is 100um relative to the origin | 
-^ ''[[commands:status|STATUS]]'' ^ ''[[commands:movrel|/]]'' | Queries status of all axes on controller (MS-2000) or on card (TG-1000 if address is specified) | - | Address optionally (TG-1000 only) | ''/'' returns ''N'' if no axis is busy or ''B'' if one is | +^ ''[[commands:here|HERE]]'' ^ ''[[commands:here|H]]'' | Redefines the current position of the axis without moving it | 10ths of microns | Axis | ''H X=1000'' declares the current position of X to be 100 um; ''H X'' sets it to 0 | 
-^ ''[[commands:rdstat|RDSTAT]]'' ^ ''[[commands:rdstat|RS]]'' | When used with ''?'' qualifier, queries status specified axis | - | Axis | ''RS X?'' returns ''N'' if X axis is busy or ''B'' if it is | +^ ''[[commands:zero|ZERO]]'' ^ ''[[commands:zero|Z]]'' | Makes the current position the origin for all axes | - | Broadcast | ''Z'' zeroes every axis; use ''HERE'' to zero one axis | 
- +^ ''[[commands:status|STATUS]]'' ^ ''[[commands:status|/]]'' | Queries status of all axes on controller (MS-2000) or on card (TG-1000 if address is specified) | - | Address optionally (TG-1000 only) | ''/'' returns ''N'' if no axis is busy or ''B'' if at least one axis is busy | 
 +^ ''[[commands:rdstat|RDSTAT]]'' ^ ''[[commands:rdstat|RS]]'' | When used with ''?'' qualifier, queries status of the specified axis | - | Axis | ''RS X?'' returns ''N'' if the X axis is not busy or ''B'' if busy |
  
 ===== Command Syntax ===== ===== Command Syntax =====
Line 29: Line 29:
 The COMMAND is a string of ASCII characters such as ''MOVE'' or ''HOME'', which must be followed by a space.  All commands are case insensitive.  Most commands have abbreviated names that help cut down on typing time and serial bus traffic. The COMMAND is a string of ASCII characters such as ''MOVE'' or ''HOME'', which must be followed by a space.  All commands are case insensitive.  Most commands have abbreviated names that help cut down on typing time and serial bus traffic.
  
-Next comes one or more sets of strings that contain an axis name.  When setting a value the axis name is followed immediately by an equal sign and the corresponding value.  Decimal values are expressed in the US/UK convention with a period symbol '.' for the decimal point, and without any commas ',' or other delimeters.  Each axis must be separated from the one before by one blank space.  One or more axes may be specified on a single command line.+Next comes one or more sets of strings that contain an axis name.  When setting a value the axis name is followed immediately by an equal sign and the corresponding value.  Decimal values are expressed in the US/UK convention with a period symbol '.' for the decimal point, and without any commas ',' or other delimeters.  Each axis must be separated from the one before by one blank space.  One or more axes may be specified on a single command string, but note that the order of processing (and reply) is done is a controller-defined (and reproducible) order instead of in the order in the command string.
  
-The usual syntax is to set parameter values with an equal sign, and query them using a question mark.  However note that there are separate commands for setting and querying positions.+The usual syntax is to set parameter values with an equal sign, and query them using a question mark.  However note that there are separate commands for setting and querying stage positions.
  
 When a numeric value is expected but omitted then it usually is interpreted as ''=0''; the behavior is near-universal and works for the commonly-used ''MOVE'', ''MOVREL'', and ''HERE'' commands.  Truncation or rounding of numeric values may occur depending on the command. When a numeric value is expected but omitted then it usually is interpreted as ''=0''; the behavior is near-universal and works for the commonly-used ''MOVE'', ''MOVREL'', and ''HERE'' commands.  Truncation or rounding of numeric values may occur depending on the command.
Line 42: Line 42:
 ''…'' indicates more arguments can be sent with the same command. ''…'' indicates more arguments can be sent with the same command.
  
-All commands are completed with a Carriage Return (ASCII hex code: ''0D'').  The controllers receive ASCII characters one at a time and place them into their memory buffer.  With the exception of single hex code commands like the tilde ''~'' and halt ''/'', the controller will not process a command in the memory buffer until the Carriage Return ''<CR>'' has been received. +All commands are completed with a Carriage Return (ASCII hex code: ''0D'').  The controllers receive ASCII characters one at a time and place them into their memory buffer.  With the exception of single hex code commands like the tilde ''~'' and halt ''\'', the controller will not process a command in the memory buffer until the Carriage Return ''<CR>'' has been received. 
  
 ===== Reply Syntax ===== ===== Reply Syntax =====
Line 93: Line 93:
 X=4 Y=3 Z=1.5 <CR><LF> X=4 Y=3 Z=1.5 <CR><LF>
 $ WHERE Z Y X <CR> $ WHERE Z Y X <CR>
-Y=4 Y=3 Z=1.5 <CR><LF></asi>+X=4 Y=3 Z=1.5 <CR><LF></asi>
  
  
Line 127: Line 127:
 ===== A Note Regarding Units ===== ===== A Note Regarding Units =====
  
-The most common commands including ''MOVE'', ''MOVEREL'', ''HERE'', and ''WHERE'' use axis units, which can be changed using the ''UM'' command.  However, some commands such as ''SETUP'', ''SETLOW'', and ''PCROS'' use units of millimeter (mm), and the documentation page for the command specifies the unit.  By default, axis units where position is given in distance (e.g. for motorized stages and piezo stages) are represented in 0.1um increments, or 10,000 units per millimeter of travel.  For mirror scanner axes, default axis units are 0.001 degrees (uncalibrated), or 1000 units per degree of travel.  When a time is required, the unit is generally milliseconds.  Some commands use integer codes or other input units as described in the per-command documentation.+The most common commands including ''MOVE'', ''MOVREL'', ''HERE'', and ''WHERE'' use axis units, which can be changed using the ''UM'' command. 
 + 
 +By default, axis units are: 
 + - for distance (e.g. for motorized stages and piezo stages): each unit is 0.1um, or 10,000 units per millimeter of travel 
 + - for angle (e.g. rotary stages): each unit 0.001 degrees or 1000 units per degree of travel 
 + - for micro-mirrors: each unit is 0.001 degrees or 1000 units per degree (uncalibrated) 
 + 
 +Note that some commands including ''SETUP'', ''SETLOW'', and ''PCROS'' use distance units of millimeter (mm), and the documentation page for the command specifies the unit. 
 + 
 +To specify times including the ''AC'', ''WAIT'', ''SAF'' and similar commands the unit is generally milliseconds but occasionally seconds as described in the per-command documentation. 
 + 
 +A few commands use integer codes or other input units as described in the per-command documentation.
  
  
  
 {{tag>serial commands manual tech_note}} {{tag>serial commands manual tech_note}}
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
command_quick_start.1699489175.txt.gz · Last modified: by jon