LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with interfacing old SPEX 270M spectrometer

Well then I would double-check the cables.....

 

Is the serial port working for other tasks except the SPEX?

0 Kudos
Message 21 of 23
(1,305 Views)

I solved my issue months ago and forgot to post the solution:

 

The problem was mainly the syntax that the SPEX270M wanted to see, which differed slightly from that used in the programs available on the internet. Things like capotolization really matter. It also is important to decide wether you are going to use string variables in "normal" mode of "\codes", as code written in "normal" mode for a given string variable will not function properly. Some commands may be more straightforward in the "\code" mode, e.g. the Reboot command. Below are the basic commands:

 

Where am I?: Write "A", read 256 bytes, if buffer reads "o" then the message was received

Change from Boot mode to Main mode: Write "O2000" + " " + carriage return, read 10 bytes, then send command for Where Am I?

Reboot: Write "\DE", wait 500ms, then send command for Where Am I?

Initialize Grating: Write "A", be prepared to wait for about 1-2min

Get Grating Position: Write "H0", read 20 bytes and format to "o%f"

Get Slit Position: Write "j0," + SlitNumber* + carriage return, read 20 bytes and format to "o%f"

*the slit numbers are 0=front entrance, 1=side entrance, 2=front exit, 3=side exit

Check if Busy: Write "E", read 20 bytes and format to "o%[^]", if buffer reads "q" then the SPEX270M is busy

Move Grating: Write "F0," + NumberOfSteps + carriage return

Move Slit: Write "k0," + SlitNumber + "," + NumberOfSteps + carriage return

 

note: the '+' sign indicates appending strings to one another.

 

Initialization Procedure: Where Am I?, Change from Boot mode to Main mode, Initialize Grating, Get Grating Position, Get Slit Positions (Entrance & Exit)

 

Movement Procedure for either Slit or Grating: Get Position, determine steps to move, Move, Loop ( Check if Busy, Read Position ) till no longer busy

 

Backlash Correction: If the number of steps to move are <0 there will be backlash (i.e. you move backwards). To correct, e.g. if position / 32 is wavelength in nm and backlash is 10nm, first tell the device to move the number of steps desired - 320 steps, then once the device has moved tell it to move again +320 steps.

 

That should pretty much cover most use

0 Kudos
Message 22 of 23
(1,290 Views)

For anyone still sturggling with the Spex 270M RS232 LabView interface, I successfully accomplshed this in the following manner.  First, I used the HWCFG232.EXE program downloaded from the Horiba site to verify the hardware connections and COM Port settings (9600, 8, no,1,no, in my case) were correct.  Next, I downloaded SerialMonos_LV2012.zip from the Horiba site and extracted the files.  The VIs in this package have already been compiled using LabView 2011 but they are compatible with the LabView 2013 I am using.  I carefully followed the directions in the LabView Driver Supplement to the Spectrometer Control Manual that is part of the zip file in entering the correct values (found in MONOPAR.TXT) in the Spectrometer Setup.GBL file. 

 

Open Start Up.VI and power on the Spex 270M.  Run Start Up until you hear the self-calibration and the Main and Boot Controller version numbers are returned.  Generally, the Error LED remains green in the first Run with no values returned and turns red in the second Run.  Power off/on the Spex 270M and now with Run the Error LED typically turns green and the values are returned.  All other VIs now run successfully.

 

Incidentally, I have found the Horiba technical support to be very good even with this legacy monochromator.

0 Kudos
Message 23 of 23
(1,093 Views)