LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying old VI for LabVIEW 2015

Hi LabVIEW community,

              I am trying to modify an old VI to run on LV 2015. The old VI used “AI Update Channel.vi” and “AO Sample Channel.vi” for DAQ. I am trying to substitute them with DAQmx.

              My problem is that I can’t know exactly what the two old DAQ VIs’ function. The icons in Block Diagram become a question marks. I can understand some of the parameters that are connected to the question mark icon, from the captions and context help.

There are two parameters that I can’t understand their functions at all. One is a blue parameter called “I16 device”, which is probably has something to do with the for loop that included both sub-VIs. The description in the context help reads: “the device number you assigned to the plug-in DAQ board during configuration. This parameter defaults to 1”. This parameter is connected to both question marks. The other parameter is a pink string of 1. Context help shows that “No description available”. Each question mark has individual such parameter connected to it.

              The DAQ card we have is PCI-MIO-16XE-50. Only one AI (33) and one AO (21) is wired (the grounding for AI (66) is wired too). Hope that someone can provide me a hint for making new DAQ from DAQmx. Please find the program attached. Thanks!

 

Bo-Hong

0 Kudos
Message 1 of 14
(2,928 Views)

Device I16 is probably the numeric identifier for a specific DAQ board.  That went away with DAQmx when the purple wire came along where you select the DAQ device by its assigned name.

 

Don't worry about that.  You probably won't need to worry about replicating every input.  YOu just need to replace the functionality of the old DAQ functions with the new DAQmx function without worrying about exactly replicating every single wire.

0 Kudos
Message 2 of 14
(2,896 Views)

The Good News is that your code, in LabVIEW 8.2.1, can be opened in LabVIEW 2016 with no problem.  There are some missing VIs, including "AI Simple Channel" and "AO Update Channel", but DAQmx is so far superior to Legacy DAQ (and MAX is also much improved) that you should have little trouble writing code for your DAQ device.

 

There are excellent tutorials about DAQmx on the Web (and at NI.com).

 

Bob Schor

0 Kudos
Message 3 of 14
(2,893 Views)

Here is the context help of your missing functions, which might help you out.

 

About a year ago I took a copy of the latest Traditional DAQ LabVIEW drivers I could find and gutted out the DLL calls.  I was useful for doing a similar task (converting from Traditional DAQ to DAQmx).  It is still a little large to post here.  Perhaps after the community merger I will be able to post it


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Download All
0 Kudos
Message 4 of 14
(2,836 Views)

So these are wrappers to map Traditional DAQ calls to DAQmx?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 14
(2,829 Views)

@billko wrote:

So these are wrappers to map Traditional DAQ calls to DAQmx?


No.  They are just the shell of the Traditional DAQ VIs.  But it was enough to figure out what functions were used where and how the DAQ system was supposed to be working.  I could then do the same with DAQmx and replace.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 14
(2,806 Views)

@crossrulz wrote:

@billko wrote:

So these are wrappers to map Traditional DAQ calls to DAQmx?


No.  They are just the shell of the Traditional DAQ VIs.  But it was enough to figure out what functions were used where and how the DAQ system was supposed to be working.  I could then do the same with DAQmx and replace.


Oh, I get it.  It was too good to be true.  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 14
(2,774 Views)

Crossrulz,

 

     If you put your Traditional DAQ Handbook file (or files) in a folder and compressed (or directly .zipped it), would it shrink enough to post here?  This seems like an extremely useful resource (maybe NI would like to host it somewhere ...).

 

Bob Schor

0 Kudos
Message 8 of 14
(2,758 Views)

  Thank you guys, I followed the tutorial video and managed to get an AI channel to produce DC voltage and control it by a slide bar. However, I failed when trying to make an AO channel to receive that DC signal. It shows error message “50412”, when the acquisition mode is N samples/continuous samples. The solution post on NI website says I can “add a DAQmx Channel Property Node in between the DAQmx Timing (Sample Clock).vi and DAQmx Start Task.vi in LabVIEW.” My understanding is that the two VIs are channel property nodes in the palette. They are not in the Block diagram. What and How do I add a DAQmx Channel Property Node in between that two VIs?

 

  The post also says “From the Property Node select the property Ananlog Input»General Properties»Advanced»Data Transfer and Memory»Data Transfer Mechanism.” Where can I find the Ananlog Input?

 

thanks!

Bo-Hong  

0 Kudos
Message 9 of 14
(2,745 Views)

@Bob_Schor wrote:

     If you put your Traditional DAQ Handbook file (or files) in a folder and compressed (or directly .zipped it), would it shrink enough to post here?  This seems like an extremely useful resource (maybe NI would like to host it somewhere ...).


I was about to post it earlier, but the zip file was over 12MB.  Hence why I stated that I will see what I can do once the migration over the weekend is complete.  But after some digging, the examples are taking up a large majority of that space.  So attached is what can be put into vi.lib (so the actual code will need to be in <LabVIEW>\vi.lib\DAQ).  They were all saved in LabVIEW 8.2.1.  I will see about adding the examples later.

 

So a quick history:

Last year I inherited a project that was originally written in LabVIEW 5 and later updated to LabVIEW 7.  I had to update the code to LabVIEW 2014 due to the need to run on Windows 7 (per the customer's IT).  So, obviously, the NI DAQ software would not work anymore.  So I took the VIs from the NI DAQ on the old development computers (vi.lib and Examples) and just copied them into my LabVIEW 2014 folder.  I had errors all over the place (obviously) so I went through and took out all of the calls to the NI DAQ DLL.  So that left me with just the API for the Traditional DAQ.  But it was very useful for just seeing what the functions were and the context help told me 99% of what I really needed to know.  I could then rewrite the DAQ portions of the software to use DAQmx instead of Traditional DAQ.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 14
(2,740 Views)