ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Oxford Mercury series instruments : Works with NI-MAX but fails with Labview

Hi,

  I am trying to interface an Oxford Instruments "Mercury Series" power supply for superconducting magnets, I am using Labview 2013 and an NI USB-GPIB-HS.

The problem I have is the following:

1.  After connecting the instruments I run NI-MAX (ver 14.0) to check that the instruments are recognized by the GPIB-bus. Everything goes fine, the instruments are detected and I can communicate with it by typing commands in the 488.2 communicator. Read and write both work fine.

 

2. Then I try to write my own code in Labview to run the instrument.  The standard 488.2 commands Send/Recieve or GPIB-Write anf GPIB-Read do not work.

There are other instruments on the same bus also - which work fine with both NI-MAX as well as my vi-s from Labview.  I have tried doing the "obvious" things

like intialising the GPIB before sending any command and then do a Device Clear for the specific instruments before sending other commands.

 

3. So the question is : What can be the reason for an instrument to respond correctly via NI-MAX but fail to do when addressed from Labview with essentially

similar basic commands?

 

I have tried tracing the origin of the errors via I/O trace (NI-spy), but they didn't help in locating the precise problem.

 

Would be grateful if somebody could suggest an answer.

Have other people faced this before?

Thanks-

Kanti

 

 

0 Kudos
Message 1 of 8
(4,117 Views)
You have not provided your code, exactly what you sent in MAX, or the I/O Trace file. I'll make a guess that it's an older instrument that requires a cr or lf termination.

0 Kudos
Message 2 of 8
(4,099 Views)

The instruments are actually newer  (rather than an older version). You are correct that they need an extra "\n" after the command string - which I had provided.

 

The command tryped in NIMAX was simply  "*IDN?\n"   in response to which  the instrument sends its identification string correctly. 

All other commands also worked properly.

 

I then tried the same in Labview using   "Send" and "Recieve". The Recieve generates the error.

 

I am attaching the trace file (converted to txt) and the VI. Line 10-14 has the error.

 

Thanks

 

 

Download All
0 Kudos
Message 3 of 8
(4,087 Views)

You need to change the data string to '\' Codes Display before typing \n will generate a line feed.

 

Lynn

0 Kudos
Message 4 of 8
(4,078 Views)
And in addition, any GPIB instrument that requires a termination character besides EOI, is not compliant with IEEE-488.2 so no matter how 'new' you think the instrument is, the firmware is incredibly old.
0 Kudos
Message 5 of 8
(4,059 Views)

Checking the "\ Codes Display" fixed the problem. Labview now communicates correctly with it.

Thanks to Dennis_Knutson & Lynn! 

-Kanti

0 Kudos
Message 6 of 8
(4,017 Views)
Why does the idn query return Stanford Research instead of Oxford Instruments?
0 Kudos
Message 7 of 8
(4,005 Views)

I had a "Stanford Research" instrument also on the same bus - I was also sending a query to it as a check that the bus itself was not hanging.

So the IO-trace captured that also.

0 Kudos
Message 8 of 8
(3,987 Views)