LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with interfacing old SPEX 270M spectrometer

I am also trying to communicate with the SPEX 270M via GPIB using labview v10.0 on a pc. I have the old labview drivers written for Labview7.1. They encounter a communication error upon running the "set up.vi" that initializes communication. Unfortunately, the directions for these drivers (mmrc.caltech.edu/Stark/manuals/Spex%20270%20Labview%20Driver.pdf) give no advice on how to proceed. I've tried starting from scratch with VISA commands. I can read from the device, though the responses seem to be nonsense, e.g.'<-Y+". I've tried following the device manual (attached file) and sending "<space><cr>", which is the 'where am i' command, but i get an error. Sending "o2000<null><cr>", to change from BOOT mode to MAIN mode, yields a response of "*", as the manual expects. If I again send "<space><cr>", as the manual says to do, I again get an error. If I instead said "o2000<null><cr>" again I get a response of "b", meaning the device is still in BOOT mode.

 

I am unclear how to proceed. Any help would be appreciated.

Are there any more modern VI's available for this or similar devices? I am open to trying to reverse engineer a VI written for similar monochromator from the same manufacturer.

 

thank you

0 Kudos
Message 11 of 23
(3,291 Views)

Hi PDC,

 

Thank you for bringing this to our attention. We usually recommend going through the programming manual. Unfortunately, that doesn't seem to work. Since this is a third party hardware, I would suggest at this point to contact the manufacturer for additional programming support.

 

I've also included a tutorial on GPIB, VISA, and serial communication below for your reference. 

 

http://zone.ni.com/devzone/cda/tut/p/id/4058

 

I hope this helps.

 

Josh L.

 

 

Applications Engineer
National Instruments
0 Kudos
Message 12 of 23
(3,257 Views)

I've had no trouble with Labview for a Spex 1403 and SpectraAcq signal interface.  I've downloaded the Labview code that is accessed after filling out the form at the link:

http://www.horiba.com/scientific/products/optical-spectroscopy/software/labview/

 

I presently use a serial com for the spectrometer and IEEE488 connection for the SpectraAcq.  I've found the routines to be clear and reliable going from Labview 8.6 up through presently operating with Labview 10.

 

There are 3 .llbs

Isa_comm

Idsa_user

ISA_UTL2

The first one has a couple dozen vi's. 

 Use SPECTROMETER SETUP.GBL to specify RS232 or HPIB, then Start Up.VI can be run.  I use RS232.  Sometimes the interface that should respond with Main and Boot as something like V3.6 will not respond without a power cycle, or sometimes won't respond unless some other vi is used first, such as Spectral Position.VI.

 

I use HP-IB on the SpectraAcq and set DETECTOR SETUP.GBL for HP-IB on channel 3.  Start Up.VI will then still respond with V3.6 (coming from the Spex, not the V1.0 from the SpectraAcq).  I can't remember how I got the V1.0 from the SpectraAcq to come up - maybe I* had the spectrometer turned off?  In any event, both spectrometer and spectracq run fine with this pre-VISA code for everything I do.  I can even control the shutter which didn't work with the Win95 spectramax.

 

 

Message 13 of 23
(3,242 Views)

I currently have lsa_comm.llb, lsa_usr.llb and lsa_utl2.llb for Labview 7.1

As I mentioned, these drivers do not seem to work for my application of using GPIB to communicate with the SPEX270M. Changes I make to Spectrometer Setup.GBL do not remain after I save, despite setting these new values as "default". SetUp.VI encounters an error; which may simply stem from the wrong values in setup since they seem not to save. I can't tell what the issue there is, as they provide insufficient directions to trouble shoot this error.

 

I know simpler custom VIs can be written for other SPEX products, e.g. using the older 'GPIB send' command instead of 'visa write,' and I plan to try some of the commands successfully used in those cases. As I can read and write using VISA to this spectrometer but seem to get unexpected responses, and have succesfully used VISA to interface with numerous peices of equipment, I think that the issue is in syntax: probably the termination. 

0 Kudos
Message 14 of 23
(3,234 Views)

Now that you mention it, I don't think I ever got the Retro interface for the spectrometer to run HP-IB, just the serial connection.  My computer has just one COM port.  I've attached the setup global page i you want to see a working COM port connection

 

 

 

0 Kudos
Message 15 of 23
(3,228 Views)

The new(er) 2009 Haribo 232-488 drivers (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=942B7E7D947474A5E04400144F1EF8...) work well with GPIB. They use VISA and should also work with RS232. 

 

I have however noticed, while trying to write my own VIs that I usually prefer over drivers, that the syntax isn't terribly consistent nor is the <cr> termination, suggested in the manual, always necessary. That is why sending "_" or "\s" didn't work before, apparently there the <cr> or "\r" is not necessary. Also, occationally the spectrometer gets locked up when 1st turned on responds with "*Version #.... ...Press <Enter>" and does not respond to the Reboot command <222> or "\DE". Capitolization also seems to matter as sending "o2000\00" work more consistantly than "O2000\00" and "\DE" seems to work while in the MAIN program yet "\de" works while in BOOT mode, though this seems only to affect the custom VI i'm writing and the capitolized commands work in the Haribo drivers - haven't tracked down that quirk yet.

 

But essentially i'd recommend these new drivers, at leats as a starting point, to anyone trying to work with these old SPEX products.

0 Kudos
Message 16 of 23
(3,211 Views)

Yes I have written a driver for GPIB, years ago. You're welcome to it. Programming this instrument was really troublesome. The interface is just done so poorly.

 

Bye,

 

Wytze

0 Kudos
Message 17 of 23
(3,138 Views)

I found my old VISA drivers for the SPEX 270M.

 

Here they are (if I can attach a 2MB file.....)

 

Shane

0 Kudos
Message 18 of 23
(3,134 Views)

There may be unneccessary baggage in my ZIP file but I don't have a spectrometer to test the code on.......

 

If someone wants to test it and re-post only the neccessary files then feel free.

 

Shane.

0 Kudos
Message 19 of 23
(3,131 Views)

I just tried the same thing: Interfacing a SPEX270M to a COM port using Labview. I don't have a free COM port so I needed a COM-2-USB cable/driver. It didn't work initially because:

 

1) I used the 25D to 9D cable that connects the HandScan to the spectrometer. This cable is not wired appropriately as a null-modem cable

2) I used what I thought is a 9D serial cable but it wasn't wired correctly as a cross-over cable.

 

The configuration that I'm using is as follows:

Connection to the SPEX270M is made via

D25 RS232 Serial (straight-through) cable +
D25 Null-Modem Converter +
D25 Gender Changer +
D25 to D9 Converter +
D9 to USB cable/adapter

 

I'm using the Labview drivers from the HORIBA website using Labview 7.1 or 8.2.

The codes don't work with Labview 2011.

The code which was posted above (by Intaris) using VISA did not work, nor could I get the "SPEX 232-488-RETRO" codes (2009 Haribo 232-488 drivers) to work.

 

Regards,

S.B.

 

0 Kudos
Message 20 of 23
(3,003 Views)