LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrading LabVIEW code from 8.6 to 2020

Solved!
Go to solution

Hello,

 

As an absolute beginner on LabVIEW, I have been assigned to upgrade a really old program that works with the traditional DAQ Vis.

I have checked out the "Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx in LabVIEW - NI  " documentation concerning the transition. However, unlike the "AI" Vis, our company's code uses "DIO" Vis.

 

In my case, I have to replace those Vis :

- DIO Config

- DIO Write

- DIO Read

- DIO Start

- DIO Clear

- DIO Wait

 

Are there any typical way to replace those ? I've tried considering that "DIO" Vis are "AI" Vis and replace according to the documentation but the wiring's doesn't seem to match.

By the way, we're using NI-6534 DAQ and we wish to replace it with the 6535 DAQ, if somebody happened to upgrade the same way, please enlighten me about the way you did it.

 

I would appreciate any help, thank you for your attention!

PS: Please don't hesitate to correct anything I could've misunderstood.

Thank you in advance.

 

 

0 Kudos
Message 1 of 12
(2,501 Views)

I suggest you spend time browsing through the DAQmx examples in Help >> Find Examples.  Before you try to upgrade old traditional DAQ code, just work with DAQmx in a few simple projects.  Once you know how DAQmx works, it will be easier for you to understand how to make the transition.

 

It really isn't that hard.

Message 2 of 12
(2,496 Views)

@RavensFan wrote:

I suggest you spend time browsing through the DAQmx examples in Help >> Find Examples.  Before you try to upgrade old traditional DAQ code, just work with DAQmx in a few simple projects.  Once you know how DAQmx works, it will be easier for you to understand how to make the transition.

 

It really isn't that hard.


I'd like to say that myself but won't.   A 12 year plus technology jump is not a beginner task!  

 

(And, Traditional DAQ was obsolete when 8.6 was new...so probably the original source is actually old enough to vote!)

 

Take advantage of the online DAQmx course and LabVIEW Core 1.  If your employer expects you to have expert knowledge without any training.... updating your resume is a much better idea. 


"Should be" isn't "Is" -Jay
Message 3 of 12
(2,466 Views)
Solution
Accepted by DRALV

I support all previous advice about learning via examples & training.

 

I've also got a dusty old memory of traditional NI-DAQ and the good news is that most of the functions you list have a pretty direct DAQmx substitute, particularly:

Write, Read, Start, and Clear.

 

However, if I ever knew much about DIO Wait, it's lost to the fog of time.

 

DIO Config is probably mostly replaced by DAQmx Create Virtual Channel.  Or maybe it takes a combo of that and DAQmx Timing.   

 

Note: DAQmx Timing is needed when configuring a task that involves a buffer and a hardware clock.  Relatively few devices supported DIO hardware clocking back in the traditional NI-DAQ era, but the 6534 appears to be one of them.  I'd venture a guess that it was chosen *because* of that support, so you'll probably need to replicated it under DAQmx.  If so, pay special attention to the examples for Continuous and Finite DI / DO.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 12
(2,447 Views)
Solution
Accepted by DRALV

Unfortunately, the APIs are COMPLETELY different.  Spend some time learning DAQmx (Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications).  Then learn what the old code was doing and reemplement using DAQmx.  Again, it is not a 1-for-1 change.  But you will be able to accomplish the same thing with a much better API.


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 5 of 12
(2,444 Views)

Alright, seems like I will spend some time learning Daqmx and attempt the change.

As expected, it won't be that easy.

Thanks for your quick replies and help.

0 Kudos
Message 6 of 12
(2,427 Views)

@Kevin. 

 

My memory is still good. Traditional DAQ contained Wait +(mS).vi.  essentially,  a wait with error handling subvi that did not wait with error in =TRUE.  

 

Don't call it just before ms timer rollover!  (Painful memories last!)


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 12
(2,413 Views)

@DRALV wrote:

Alright, seems like I will spend some time learning Daqmx and attempt the change.

As expected, it won't be that easy.

Thanks for your quick replies and help.


It would be a lot easier if you had 20 years of experience!  Post back when you get into trouble that you don't quite understand.   We will be here!


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 12
(2,410 Views)

Hi everyone,

 

I had the opportunity to call the NI support, however, it seems like TDAQ support has long ended. That is why I am back on this thread 🙂

 

I don't know if it is a good idea to repost on an old thread, but I would like to take you up on your offer that is asking questions about TDAQ.

 

What is the difference between scan/updates (TDAQ) and samples (DAQmx) ? I would've thought that they are the same.

 

How to setup "handshake 8255" for output and input and choose the PFI lines (ACK, REQ) using Daqmx ?

 

Thanks in advance.

Your humble Labview enthusiast

 

0 Kudos
Message 9 of 12
(2,012 Views)

What is the difference between scan/updates (TDAQ) and samples (DAQmx) ? I would've thought that they are the same.

Yep.  TDAQ's "scans" and "scan clock" equate to DAQmx's "samples" and "sample clock".   (And TDAQ's "channel clock" equates to DAQmx's "convert clock").

 

How to setup "handshake 8255" for output and input and choose the PFI lines (ACK, REQ) using Daqmx ?

Sorry, I'm no help with the handshake part as I'm not familiar with the 8255.   

 

Configuring specific PFI lines for a particular purpose may require some digging down into some of the DAQmx property nodes (especially the Channel, Timing, and Trigger property nodes).  But what's *allowed* can be fairly device-dependent.   What DAQmx device will you be working with and exactly what functional role do these signals need to play?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 10 of 12
(1,966 Views)