10-13-2015 06:03 AM
Hello. I am trying to modify a labview program (witten in labview 7.1 on a 32 Bit system) on my labview 10 (64 Bit windows). The original program used certain VIs from the traditional DAQ package for e.g. AI Waveform Scan vi which can be opened (because traditional DAQ does not install on 64 Bit systems). I read about NI DAQmx, and was wondering - does that package have something similar to AI Waveform Scan vi which I can just replace in the original program. Or do I need to change the code all the way. I am uploading the VI that contains the AI Waveform Scan vi for reference. Thanks in advance.
10-13-2015 07:37 AM - last edited on 11-26-2024 11:39 AM by Content Cleaner
I "inherited" a pretty big data acquisition system written in LabVIEW 7.0, and went nuts trying to understand the intricacies of Traditional DAQ (plus there was no documentation, poor design decisions, etc.). I finally "bit the bullet" and started over, first in 8.6, but ultimately in LabVIEW 2010. I totally moved to DAQmx (read this excellent White Paper). I also strongly recommend using LabVIEW Project to create DAQmx Tasks right in the Project, where you can define many of the parameters of the A/D sub-system in advance, so your A/D input system consists of a Create Virtual Channels (to which you wire a Task Constant, then use the Selection Arrow to select the Task you've defined in your Project, taking care of sampling rate, input range, input configuration, timing source, etc. all at once), a DAQmx Read inside a While loop, and a DAQmx Dispose when you exit. So simple ...
Bob Schor
P.S. -- be careful when saying 64-bit system. There is the 64-bit Windows OS (which most of us use), but there are also 32-bit and 64-bit versions of LabVIEW. Most of us use 32-bit LabVIEW, which seems to be a bit more robust and complete.
10-13-2015 07:43 AM
Thanks for the reply. The thing is I am really no expert in labview nor do I have a lot of time to start everything over. Can you just clarify in the context of the VI I posted- i.e what vi from the DAQmx package shoud I use to replace the AI Waveform scan vi in the attachment. Because in doing so, I can use the original code. Hope you understand the urgency. Kudos.
10-13-2015 07:47 AM - last edited on 11-26-2024 11:39 AM by Content Cleaner
If you google "converting daq to daqmx" you will get some NI papers on converting from Traditional DAQ to DAQmx.
Here is one of them: https://www.ni.com/en/support/documentation/supplemental/06/transition-from-traditional-ni-daq--lega...
10-13-2015 08:18 AM
@sourav0089 wrote:
Thanks for the reply. The thing is I am really no expert in labview nor do I have a lot of time to start everything over. Can you just clarify in the context of the VI I posted- i.e what vi from the DAQmx package shoud I use to replace the AI Waveform scan vi in the attachment. Because in doing so, I can use the original code. Hope you understand the urgency. Kudos.
Considering these constraints you should really install the 32 Bit version of LabVIEW and try that. There is still a big chance that Traditional DAQ won't work on a 64 Bit Windows system as it includes quite a complex kernel driver architecture that was last tested on 32 Bit Windows XP systems and never been updated since.
But unless you intend to do GigaByte data acquisition or large resolution image analysis, 64 Bit LabVIEW has mostly only disadvantages until now.
10-13-2015 08:31 AM
I am using 32 Bit Labview. The windows is 64 Bit on whcih the traditional DAQ won't install. I need to use a VI that does a waveform scan from the DAQmx package. but there is nothing like that.
10-13-2015 08:36 AM
Thanks for the reply. The thing is all I need to do is convert the AI Waveform Scan vi(in traditional DAQ) to something that can used with the current labview version(using DAQmx). It would be really appreciated if someone could specifically suggest on that conversion as to how to do it or what vi in DAQmx to use. THanks a lot.
10-13-2015 08:42 AM
Just one small note, I would be using GPIB for the data acquisition, not USB. Please advice accordingly with specific instructions. I am working on a final year project and have a short time to complete this. Thanks again
10-13-2015 08:57 AM
@sourav0089 wrote:
Thanks for the reply. The thing is I am really no expert in labview nor do I have a lot of time to start everything over. Can you just clarify in the context of the VI I posted- i.e what vi from the DAQmx package shoud I use to replace the AI Waveform scan vi in the attachment. Because in doing so, I can use the original code. Hope you understand the urgency. Kudos.
Strange -- you say "Kudos", yet I see no Kudos ...
A major change in migrating from LabVIEW 7x is using the NI Project. Are you doing that? If not, migrate your "project" to NI Project immediately. NI has greatly improved the way LabVIEW deals with building executables, deploying code on remote systems, and handing DAQ devices (with DAQmx).
Have you used MAX to build a Task? I'll assume the answer is "No", and will walk you through building an Analog Input Task (as that's what you seem to need here).
These steps that you carried out in MAX can also be (and probably should be) done in the LabVIEW Project (so they "stick" with the Project, not the Input Device). In Project, choose New, Task, and proceed as you did for MAX.
Here is how you use this (just as I mentioned previously, except I'm using Start DAQ instead of Configure Virtual Channels).
The first function uses all of the settings you built into your Task Constant to set the device, channels, timing source, input settings, etc. The While loop is where the data are actually acquired (I'm simply writing them to a Samples Out variable -- what you should probably be doing is putting them on a Producer Queue as part of a Producer/Consumer Design Pattern), and when I'm done, stopping the task. All of the very tricky complexity associated with Traditional DAQ AI processing has "gone away" in DAQmx.
Bob Schor
10-13-2015 09:00 AM