Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble communicating with a GPIB instrument using VISA functions

Solved!
Go to solution

Hi all,

 

I am trying to create subvi's that will allow communication between a computer and a MS260i spectrometer. This is an old spectrometer, and can only be interfaced via GPIB or RS232. I have chosen to use a GPIB-USB-HS adapter to connect it to the computer. The following settings in NI-MAX allow me to easily send commands to the spectrometer when using the NI-488.2 communicator. I have also attached an image of a successful wavelength query.

 

NIMAX _settings.JPG

NI_comm_success.JPG

However, I am unable to make a subVI with the same settings. For instance, the following VI

block_diag.JPG

returns the following error

error_gpibtestvi.JPG

 

Is there something I am forgetting? I also noticed that even though I saved the GPIB interface properties, these do not come up by default when using the NI-488.2 Communicator. Indeed, I have to manually configure the EOS settings each time I reopen the tool.

Any help would be greatly appreciated.

 

0 Kudos
Message 1 of 4
(3,785 Views)
Solution
Accepted by topic author fthouin
Did you right click on the string control and select '\'Codes Display? If you don't, the termination character is not being sent.
0 Kudos
Message 2 of 4
(3,768 Views)

I suggest to write EOI automatically

And please attach you vi.

Are you editing the string in \ mode or in normal mode?

You can check that by selecting the string and rightclick and look at the display mode of your commandstring.

 

If \ mode is active there is something strange happening, but otherwise you are not sending the end character 10 but a real \ and an n.

This is different in LabVIEW compared with MAX.

greetings from the Netherlands
0 Kudos
Message 3 of 4
(3,765 Views)

My good sir, you are a genius.

0 Kudos
Message 4 of 4
(3,744 Views)