User Tools

Site Tools


tech_note_rs232_comm

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
tech_note_rs232_comm [2021/04/21 07:27] – moved section about command syntax to command quick-start jontech_note_rs232_comm [2026/09/22 20:19] (current) – remove references to sending serial commands with Tiger Controller Console brandon
Line 5: Line 5:
 ===== Physical interface ===== ===== Physical interface =====
  
-MS2000 and RM2000 controllers have a physical RS-232 serial port (a 9-pin D-sub connector).  There is a USB Type B connector on all controllers built since ~2008 including TG-1000/Tiger controllers ((For TG-1000/Tiger controllers a separate TG232 card can be added to provide a physical RS-232 port)), which is used with a standard USB cable with Type-B connector on the controller end and the ubiquitous Type-A connector on the computer end.  If your controller can accept more than one physical connector type it does not make a difference which you use.+MS2000 and RM2000 controllers have a physical RS-232 serial port (a 9-pin D-sub connector).  Use with a null modem RS-232 cable.  Since 2008, controllers also have a USB Type B connector.  Use this with a standard USB Type-B to Type-A cable to connect to ubiquitous Type-A USB receptacle on the host PC.  New controllers ship with both a RS-232 and USB cable, and the customer can choose which one to use.
  
-For USB connections, the controller includes a serial comm port emulator chip that requires drivers on the host PC.  Usually the operating system will automatically install the drivers but if not they can be found at https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.  As of early 2018 there was a bug affecting the "Universal" version of the SiLabs driver when used with the ASI Console programs (depending on .NET), so if you run into trouble with the automatically-installed drivers use the Windows 7/8/10 version 6.x instead.+TG-1000 "Tiger" controllers have USB Type B connector in the required TGCOM communication card.  An optional TG232 card can be added to provide a physical RS-232 port if required.
  
-==== Table 1: Serial Link Info ====+If your controller can accept more than one physical connector it does not make a difference which you use.
  
-^ ^MS2000 and RM2000 ^TG-1000/Tiger ^ +===== Serial Link Info ===== 
-^Baud Rate | <wrap>9600 (default), \\  + 
- 19200, 28800, or 115200 \\  +^ ^MS2000 and RM2000 ^TG-1000 "Tiger" ^ 
-([[ms2000_operation#dip_switches|set by DIP switch]]) </wrap> | 115200 |+^Baud Rate | [[ms2000_operation#dip_switches|set by DIP switch:]] 9600 (default), 19200, 28800, or 115200 | 115200 |
 ^Data Bits | 8 || ^Data Bits | 8 ||
 ^Parity | None || ^Parity | None ||
 ^Stop Bits | 1|| ^Stop Bits | 1||
 ^ Flow Control | None ||    ^ Flow Control | None ||   
 +
 +===== Serial Port Drivers =====
 +
 +For USB connections, the controller includes a serial COM port emulator chip that requires drivers on the host PC.  Usually the operating system will automatically install the drivers, but if not the drivers can be found at the Silicon Labs [[https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers|CP210x USB to UART Bridge VCP Drivers]] downloads page.  
 +
 +As of early 2018 there was a bug affecting the "Universal" version of the SiLabs driver when used with the ASI Console programs (depending on .NET).  If you run into trouble with the automatically-installed drivers then uninstall and use the Windows 7/8/10 version 6.x instead.
 +
 +For troubleshooting connectivity issues in Windows with a USB cable: open Windows Device Manager and expand the section "Ports (COM & LPT)".  There should be an entry with name beginning "Silicon Labs CP210x" that appears when you plug the cable into the controller and disappears when you unplug the cable.  If this happens then the Windows driver is working correctly; note the port name (e.g. "COM3") for use with software.  If you don't see such an entry appearing and disappearing with the cable connection then there is a problem unrelated to software, likely in the Windows drivers but perhaps in the cable or controller.
 +
 +[{{documentation/device_manager.jpg| Windows Device Manager}}]
  
 ===== Software ===== ===== Software =====
Line 24: Line 34:
 All software control is using the serial commands sent over the serial port (or virtual serial port with USB connection).  There are many software choices available. All software control is using the serial commands sent over the serial port (or virtual serial port with USB connection).  There are many software choices available.
  
-Only one program can use the serial port at a time due to the nature of serial ports.  So only one of these softwares can be used at a given time to send commands and receive replies from the ASI controller.+Only one program can use the serial port at a time due to the nature of serial ports.  So only one of these softwares can be used at any one time to send commands and receive replies from the ASI controller.
  
  
-==== ASI Console, ASI Tiger Console, and ASI Tiger Control Panel ====+==== ASI Console, Tiger Controller Console, and Tiger Control Panel ====
  
-ASI Console: for MS2000, RM2000 and FW1000 controllers.  Info and download at [[http://www.asiimaging.com/index.php/support/downloads/asi-console/|here]].  This is the only software that can be used to update firmware on MS2000, RM2000, and FW1000 controllers.+[[:asi_console|ASI Console]]: for MS-2000, RM-2000 and FW-1000-SA controllers. This is the only software that can be used to update firmware on those controllers. It has some control buttons and the ability to send serial commands.
  
-ASI Tiger Console: for TG-1000/Tiger controllers.  Info and download at [[http://www.asiimaging.com/index.php/support/downloads/tiger-controller-console/|here]].  You can send serial commands using the input box at the bottom of the scripting tab once you have it set up.  This is the only software that can be used to update firmware on TG-1000/Tiger controllers. +[[:tiger_controller_console|Tiger Controller Console]]: for TG-1000/Tiger controllers. This is the only software that can be used to update firmware on TG-1000/Tiger controllers.
- +
-Tiger Control Panel: for TG-1000/Tiger controllers.  Like the Tiger Console it lets user send serial commands to the controller, but it is generally easier to use and has a few additional utilities like displaying live axis position and states.  Info and download [[tiger_control_panel|here]].+
  
 +[[tiger_control_panel|Tiger Control Panel]]: for TG-1000/Tiger controllers. Lets you send serial commands to the controller, and has utilities like displaying live axis position and states.
 ==== Micro-manager ==== ==== Micro-manager ====
  
Line 57: Line 66:
    - Send serial commands directly using the pyserial library    - Send serial commands directly using the pyserial library
    - Use pymmcore package to access the MMCore layer of Micro-Manager where ASI devices have excellent support    - Use pymmcore package to access the MMCore layer of Micro-Manager where ASI devices have excellent support
-   - Use Pycro-manager to access the full Micro-Manager API including MMCore+   - Use pycromanager to access the full Micro-Manager API including MMCore
      
 See the [[python|Python]] page for details. See the [[python|Python]] page for details.
- 
  
 ==== LabView ==== ==== LabView ====
Line 73: Line 81:
 === Termite === === Termite ===
  
-An free and easy to use terminal program is Termite ( https://www.compuphase.com/software_termite.htm ). Below is a screenshot of the setup dialog and how it should be configured for talking with our controllers (through RS232 or USB):+A free and easy to use terminal program is [[https://www.compuphase.com/software_termite.htm|Termite]]. Below is a screenshot of the setup dialog and how it should be configured to communicate with our controllers using either an RS232 cable or USB cable:
  
 {{document:termite-setup.png|Termite Setup Dialog }} {{document:termite-setup.png|Termite Setup Dialog }}
  
-Note: your //Port// and //Baud rate// setting requirements may be different than shown, e.g. baud rate is 112500 for Tiger controllers.+Note: your //Port// and //Baud rate// setting requirements may be different than shown, e.g. baud rate is always 115200 for Tiger controllers.
  
  
Line 102: Line 110:
  
 Because the TG-1000/Tiger controllers are modular, servicing most commands require that the communication card parse them, relay the message to the relevant card (e.g. for motorized axes or micro-mirror or PLC), and then relay the response.  This adds some extra time compared with the MS2000 family of controllers.  For instance, querying a position using home-built serial software takes 7ms on Tiger and about half that on MS2000.  The intra-controller communication happens at 57600 baud, though it could be extended to 115200 if needed.  For use with Micro-Manager, for example, this extra intra-controller communication time is irrelevant because it happens within the 10ms polling period that Micro-Manager appears to use. Because the TG-1000/Tiger controllers are modular, servicing most commands require that the communication card parse them, relay the message to the relevant card (e.g. for motorized axes or micro-mirror or PLC), and then relay the response.  This adds some extra time compared with the MS2000 family of controllers.  For instance, querying a position using home-built serial software takes 7ms on Tiger and about half that on MS2000.  The intra-controller communication happens at 57600 baud, though it could be extended to 115200 if needed.  For use with Micro-Manager, for example, this extra intra-controller communication time is irrelevant because it happens within the 10ms polling period that Micro-Manager appears to use.
 +
 +=== Low Level Commands ===
  
 If communication speed is of the utmost importance, it is possible to use binary commands in which case the controller doesn't need to parse the human-readable commands.  For MS2000 these are called low level commands and [[low_level_command|documentation is here]].  For TG-1000 these are called W commands and the [[tiger_w_commands|documentation is here]].  Avoiding the parsing will save about a millisecond or so.  Depending on the exact nature of the command the number of bytes transmitted can be more or less than with the usual high-level commands. If communication speed is of the utmost importance, it is possible to use binary commands in which case the controller doesn't need to parse the human-readable commands.  For MS2000 these are called low level commands and [[low_level_command|documentation is here]].  For TG-1000 these are called W commands and the [[tiger_w_commands|documentation is here]].  Avoiding the parsing will save about a millisecond or so.  Depending on the exact nature of the command the number of bytes transmitted can be more or less than with the usual high-level commands.
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
tech_note_rs232_comm.1619004420.txt.gz · Last modified: (external edit)