Home > Filter Wheel with Integrated Controller > Direct Control through Serial Port

 

Filter Wheel with Integrated Controller - Direct Control through Serial Port

Filter Wheel 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".

The Filter Wheel is assigned number 1 (this number can be changed by a rotary switch in the controller). 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.

We recommend using the following settings and commands:

Initialization:
/1j16h5m60V5000v500L12f0n0R - set microstep=1/16 of a step, hold current 5%, run current 60% of max (2A), slew velocity 5000, initial velocity 500, acceleration/deceleration 12, flag polarity 0, disable limits.

Home:
/1gD10S13G0D1gD1S03G0D2R - Faster move to the beginning of the home flag and slower move to the end of the flag, followed by an offset step.

For 12-position wheel a move to the next position is 266.6 microsteps. Since commands can have only integer number of microsteps for two moves with 267 microsteps make one move with 266 microsteps.

Move in + direction:
/1P267R or /1P266R
Move in - direction:
/1D267R or /1D266R

For 10-position wheel a move to the next position is 320 microsteps.

Move in + direction:
/1P320R
Move in - direction:
/1D320R

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: /1z0R

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

"?" command - read current position. Example: /1?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.