beautypg.com

Direct serial communication (ascii commands), Ascii commands, Mono_setposition – Ocean Optics MonoScan2000 User Manual

Page 15: Mono_getposition

background image

2: Programming Information

000-10000-150-02-201011

7

MONO_SetPosition

short __stdcall MONO_SetPosition(long Handle,unsigned short Node,long Position);

call this function to set an absolute user defined position. Wavelength is not linear to position
Returns 0 in case of error else 1
long Handle: Handle of the comport returned by MONO_OpenConnection
unsigned short Node: must be 0 (zero)
long position: absolute position value

MONO_GetPosition

long __stdcall MONO_GetPosition(long Handle,unsigned short Node);

call this function to get the absolute position in steps (arbitrary unit)
long Handle: handle of the comport returned by MONO_OpenConnection
unsigned short Node: must be 0 (zero)

Direct Serial Communication (ASCII Commands)

If you do not want to use the DLL-functions you can directly communicate with the MonoScan2000
using ASCII commands.

Procedure

The following steps are required:

1. Establish serial connection from PC to MonoScan-2000

2. Read device information such as calibration data and serial number (not necessarily needed)

3. Set an absolute position. Repeat this step as needed.

4. Close serial connection

ASCII Commands

Command

Description

Example

GOHOSEQ

Reference run is executed. Runs to the lower endpoint
(approx 200nm) and sets this position to 0 (zero)

GOHOSEQ [CR]

LA

Sets absolute position in steps
Command M starts positioning

LA-5000 [CR]M [CR]

LR

Sets relative position in steps
Command M starts positioning

LR100 [CR]M [CR]

POS

Returns actual position in steps

POS [CR]