LabVIEW drivers - CAT - Liquid Handling CaRo XYZ Autosampler
CAT - Liquid Handling CaRo XYZ Autosampler
The information provided by CAT (8 pages) is a good starting point for creating a vi to control the CaRo XYZ Autosampler. The following text describes the requirements for controlling a single autosampler.
Making the connection
On the rear of the autosampler there are 5 (or 6) connectors for your RS232 cable to choose from. You should use the DB9 female connector. Furthermore you should use a regular serial cable.
All connectors:
[a] DB9m |
[b] DB9m |
[c] DB9m |
[d] DB9m |
[e] DB25f |
[f] DB9f |
|
[a] auxilliary RS232 port of X-axis controller [b] auxilliary RS232 port of Y-axis controller [c] spare [d] auxilliary RS232 port of Z-axis controller [e] I/O ports [OPTIONAL] [f] RS232 <--> PC |
Establishing the right protocol
RS232 setting CAT CaRo XYZ
- baudrate 9600 (1200-38400)
- 8 databits
- 1 stopbit
- no pariy
Commands and responses are allways followed by a carriage return (ASCII code #OD, r in LabVIEW).
A command consists of the address, the actual command code and a comma separated parameter list.
After sending the command the autosampler will give the following responses:
- A string containing the original command (echo).
- A string for each axis (!) containing the address, the handshake code "HS", a return code and a varying number of parameters.
- In case of movements a string for each axis after the movement has finished (!) containing the address, the handshake code "HS", the return code (usually "OK") and "RDY" (for ready).
The right address
The autosampler can be given a base address from 101 upto 255; the default address is 101.
The base address can be used to control all axes at the same time. For individual control each axis has a slave address; for the X-axis use the base address - 100 (default is 1), for controlling the Y-axis use the X-axis address + 1 (default is 2) and for controlling the Z-axis use the X-axis address + 2 (default is 3).
The control commands
From all 36 commands the following 8 seem to be of interest for day-to-day practice:
control command |
description |
MA |
move absolute (1 axis) |
MAL |
move absolute (3 axes) |
MR |
move relative (1 axis) |
MRL |
move relative (3 axes) |
RAC |
read axis status |
RSS |
read system status |
RTY |
read system information |
SRF |
perform initialisation move |
The return code
The return code "OK" indicates the command was received and executed; the respone includes the appropriate list of parameters.
The return code "NA" indicates the command cannot be executed for example because move is still in progress; the respone includes the 'actual operation mode' and the 'servo condition'.
The other return codes (or error codes) are not followed by parameters:
error code |
description |
UC |
unknown command |
PA |
wrong number of parameters |
PR |
one (or more) parameters out of range |
PL |
one (or more) parameters too long |
DF |
unknown data format |
Testing the system
LabVIEW is not the easiest option for preliminary testing. It's much easier to use a simple DOS-based program (MASTER.EXE) to test the basic control commands. After establishing which commands should be used in what order one can start to create the (sub-)vi's. It will be proven that LabVIEW is in effect very easy to use to this end!
The following test-result were established by using MASTER.EXE:
- Although the RAC command parameter is a dummy, it should allways be 1.
- According to the RTY command the firmware version of the used device is V1.22 and the devicename is XYZ.
- The XYZ coordinates depend on the SRF move. This table shows the default settings for both the '1' and the '-1' reference point.
reference point |
'1' |
'-1' |
X-axis 0 |
right move left with -1..-5600 |
left move right with 1..5600 |
Y-axis 0 |
near move away with -1..-3000 |
far move closer with 1..3000 |
Z-axis 0 |
bottom move up with -1..-1300 |
top move down with 1..1300 |
|
- The table reads as follows: Setting the reference position for the X-axis with -1, will set position 0 on the far left and moving to the right can be established with values in the range form (about) 1 to 5600.
- This is with the powerline and RS232 connector at the rear of the autosampler and the 'arms' in front of you.
- The presented data are for the V1.22 version and may differ for other versions.
|
Downloads
support files
caro.ini
Support file (initialisation).
master.zip
This zip file contains MASTER.EXE, MASTER.INI and MASTER.TXT. Use this program to test simple commands like "1,SRF,-1".
rs232_readback.vi
This vi reads the response from the autosampler.
caro_global.vi
This vi holds the global variable with the path to the support file caro.ini. Before using any of the other vi's, first point to the right location!
caro_ini.llb
This LabVIEW library file contains vi's to read from and to write to caro.ini which holds the x, y and z position and a motion flag. Includes: caro_ini_read_motion.vi, caro_ini_read_position.vi, caro_ini_read_xyz_position.vi, caro_ini_write_motion.vi, caro_ini_write_position.vi and caro_ini_write_xyz_position.vi.
The following 4 sub-vi's can be used to bring the 'arms' to a known position.
caro_info_sub.vi
This vi issues a request for information on the CaRo autosampler. This vi can be used to properly start communication.
caro_up_sub.vi
This vi moves the 'Y-arm' to the highest position by using the SRF (set reference) command.
caro_home_sub.vi
This vi moves all 'arms' to their reference position by using the SRF command.
caro_return_sub.vi
This vi returns all 'arms' to their last known position.
caro_delay_sub.vi
This vi calculates, by approximation, the time (in ms) that it takes to move the 'arms'.
main programs
caro_connect.vi
This vi moves the individual 'arms'. This vi uses the above-mentioned sub-vi's and sub-vi's from caro_ini.llb.
caro_connect_3.vi
This vi moves three 'arms' simultaneously. This vi also uses the above-mentioned sub-vi's and sub-vi's from caro_ini.llb.
See also
Testrun..
Bart Boshuizen, 2004/12/22