05-02-2015 11:14 AM
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
05-02-2015 12:12 PM
05-02-2015 12:42 PM
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
05-02-2015 12:57 PM
You need to change the data string to '\' Codes Display before typing \n will generate a line feed.
Lynn
05-02-2015 03:48 PM
05-03-2015 03:42 PM
Checking the "\ Codes Display" fixed the problem. Labview now communicates correctly with it.
Thanks to Dennis_Knutson & Lynn!
-Kanti
05-03-2015 03:53 PM
05-03-2015 05:12 PM
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.