From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to switch from DAQmx to NI-488.2 for use with a GPIB?

Hi there,

I have a quick question, but I am very much a Labview novice. I have a program for data aquisition and analysis that was written for use with a DAQ so it utilizes DAQmx and things like Read, Create Virtual Channel, Timing, Start and Stop task, Clear Task. I have the same setup but will be taking data through a GPIB. I'm wondering if there is a more straightforward way to do this. 

Is it possible to simply obtain the library necessary to call all of these things, install NI-488.2 and change only the Read function? Will all of the other things still work despite not having a physical DAQ card? 

If that doesn't work, do all of these functions have analogous ones for use with a GPIB?

I apologize if this is a trivial question, but I've only done basic things in LabView before and am in quite a time crunch. Any help or guidance would be extremely appreciated!

Thanks,
Chris

0 Kudos
Message 1 of 18
(3,085 Views)
There is no easy way to do this. Each GPIB instrument is going to have its own unique command set and there is no strict correlation between that and the DAQmx functions. You say you have the same setup but you really don't. The differences have nothing to do with LabVIEW. Have you looked at the programming manual for this new instrument? The differences should be very clear.
0 Kudos
Message 2 of 18
(3,082 Views)

Sorry, when I said same setup I meant the physical experiment. The GPIB instrument is just a GPIB card, NI-PCI-GPIB specifically. Does this have a unique command set? I unfortunately dont have any of the documentation from it, it was passed down to me by someone who is away for the week. I've tried to find some examples online but not had much luck. 

0 Kudos
Message 3 of 18
(3,070 Views)

@CFlower wrote:

Sorry, when I said same setup I meant the physical experiment. The GPIB instrument is just a GPIB card, NI-PCI-GPIB specifically. Does this have a unique command set? I unfortunately dont have any of the documentation from it, it was passed down to me by someone who is away for the week. I've tried to find some examples online but not had much luck. 


I have never heard of people using DAQmx with a GPIB card.

 

 

0 Kudos
Message 4 of 18
(3,065 Views)
You can't do a thing with just a gpib controller. You must have an actual gpib instrument connected. It is the instrument that has a unique command set. The commands will be passed with a VISA Write and the instrument response will be returned with a VISA Read. All of the physical connections have to be made to the instrument. Look for a driver for the instrument with Help> Find Instrument Drivers.
0 Kudos
Message 5 of 18
(3,055 Views)

The GPIB card is irrelevant.  All it does is send commands like a serial port.  The instrument you connect it to is the important part here.  The point we're trying to make clear is that since a DAQ card is a known entity in LabVIEW there are built-in drivers (DAQmx) to control it.  GPIB is totally different.  You will have to re-write everything that the DAQ used to do based on whatever functions are available in your GPIB-based instrument.  Bottom line is that you may be able to salvage some top-level functionality like sequence control, data analysis and file storage but you have to completely start over with the part that actually takes measurements of real-world signals.  You need to know exactly what the DAQ did, then figure out if your GPIB hardware can do the same, then re-write the bottom-level code to collect your data with GPIB (SCPI Commands).  Each instrument uses SCPI but it's up to the individual manufacturer to define what the commands do to their hardware.

 

Of course, since you haven't mentioned what the DAQ did or what GPIB instruments you're replacing them with we can't be much help.  

 

Sorry, I'm sure that's not the answer you were hoping for.  Smiley Sad

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 6 of 18
(3,048 Views)

@NIquist wrote:

Sorry, I'm sure that's not the answer you were hoping for.  Smiley Sad


As they say, garbage in = garbage out.

Insufficient information results in generally useless answers.

 

 

0 Kudos
Message 7 of 18
(3,042 Views)

This was actually very helpful, thank you, NIquist. I misinterpreted what was meant by GPIB instrument. In this case the instruments we are using are a wavemeter and two lock in amplifiers (which are reading signal from two photodiodes.) I never saw the DAQ being used in the other setup so I don't know the details, only that it was used to the same end as I am attempting. I guess the next step would be look for labview code that has been written for this same hardware and try and glean from it.

Thanks. 

0 Kudos
Message 8 of 18
(3,031 Views)

If you are new to LabVIEW, you may find that attempting to reverse engineer a program you cannot run because you do not have the associated equipment (DAQ device) to be an overwhelming task.

 

Consider these:

1. Do you understand the physics of the process you are trying to implement?

2. Can you make it work (even approximately) manually by "turning knobs" on the instruments?

3. How much time do you have to get a program running?

 

It may actaully be easier to get the system running with the instruments you will be using than with the DAQ-based equipment, but it will not be a trivial task for a beginner at LV.  We are glad to help people learn to use LabVIEW. Depending on the answers to the questions above, it might be better to get some professional help.

 

Lynn

0 Kudos
Message 9 of 18
(3,016 Views)

Well if your wavemeter and amps have GPIB then there is a good possibility that there will be LabVIEW drivers avaialable for it.  If the devices are connected to your PC LabVIEW can detect them, then search for and automatically install the appropriate software.

 

Help > Find Instrument Drivers

 

If they're not connected or aren't found you can still use that tool to search the NI Instrument Driver Network (IDN) and hopefully find them.  Searching for their model numbers in these forums, googling and checking the manufacturer websites are also options.  Once you can "talk to the animals" you'll need to write code to program them to perform the functions you require.  Make sure you have the relevant manuals.  As mentioned, if you can do your task manually first, it will be easier to code the automation.  We can help of course, see what you can find out about your devices and post back with more detailed info on them if you get stuck.

 

And by all means search for pre-existing code that comes close to what you're trying to do.  The odds are actually pretty good that you will be able to leverage something.  That's one of the great things about LabVIEW and its community. Smiley Happy

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 10 of 18
(2,983 Views)