Home > Focus Drive with Integrated Controller > Direct Control through Serial Port

Focus Drive with Integrated Controller - Direct Control through Serial Port

Focus Drive with Integrated Controller can be controlled directly by sending commands to the built-in controller. The easiest way to try this is by using HyperTerminal, which should be set as follows: 9600 bits/sec., data bits 8, parity none, stop bits 1, flow control Xon/Xoff, select your COM port, in ASCII setup in the Send frame check "Send line ends with line feeds" and check "Echo typed characters locally", and in the Receive frame check "Append line feeds".

To use the drive you need to know at least two commands "P" - move by a given number of microsteps in the positive direction, and "D" - move by a given number of microsteps in the negative direction. The focus drive is assigned number 2 (this number can be changed by a rotary switch in the controller). After power up the microstep resolution is 1/256 of full step. So, assuming the full turn of the fine focus knob is 100 μm (this is typical), one microstep is 100 microns / 400 motor steps per revolution / 256 = 0.0009765625 μm.

The following command (after typing the command press Enter):

/2P10000R

will move the focus drive by 9.765625 μm in the positive direction. Commands begin with forward slash followed by the controller number and end with "R" and <Enter>.  All commands return a string, which does not need to be analyzed except to read the position (see below).  The structure of the return string is: start character (/), master address (0), status byte, possibly return information, terminator byte.

Other useful commands:

"z" command - set current position as zero. This command may cause a slight move of the motor as it moves to the nearest motor pole. Example: /2z0R

"A" command - move to absolute position. Example: /2A12345R  (moves to microstep position 12345)

"?" command - read current position. Example: /2?0 ("R" at the end is not needed). This command returns string /0`12345  . (assuming it is performed after the previous "A" command).

For more details on programming see the EZHR17EN command set.