LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Traditional Labview code to DAQmx

Hi All,

I have a labview app which uses traditional DAQ digital IO VI calls and I want to update it to DAQmx. There's only 4 traditional subVI's there that I need to change to new DAQmx subVIs, but so far I haven't been able to get it working. I think my problem lies in how to accomplish the same handshaking in DAQmx. I'm not sure whether the programming model has changed for this in DAQmx. In the tradional DAQ labview code the DIO Start subVI has pattern generation w/ external clock set on it's handshake source. How/where do I set the same thing in DAQmx. I've included the code for anyone to take a look at. I'm sure the update is pretty fast and simple for someone well familiar with Labview and the new DAQmx.

Thanks for any help,
Chris
0 Kudos
Message 1 of 4
(2,915 Views)
0 Kudos
Message 2 of 4
(2,906 Views)
I've read through most of the documentation on DAQmx and gone through most of the examples which are unfortunately examples of how to do really simple things. The trouble is that the new DAQmx functions don't match up 1 to 1 with the old traditional DAQ function calls. So I'm not exactly sure what I have to call to accomplish the same function. I know most of what I have to do, set up a digital task, stick a sample clock in it, and read. That's simple enough. But I think it's this clocking that's giving me trouble. The old DAQ traditional calls have a specific place in the DIO Start.VI to specify a handshake source, in my code that handshake source is specified as "pattern generation w/ external clock" something that is supposed to be specific to the 6533 card that I'm using (there's a one sentence cryptic note about it in the Help File, but I haven't been able to find out anything more about it). I have no clue how to set something similar in DAQmx. Everything else seems to match up alright. So what I really need is someone who's familiar with both traditional DAQ and the new DAQmx to take a look at my code and tell me how to update it to DAQmx. It really shouldn't be that hard, there's only 4 traditional DAQ VI calls. I'm just not enough of an expert in labview and haven't been able to find enough help in the help files to figure it out myself.

Thanks for any help as always,
Chris
0 Kudos
Message 3 of 4
(2,903 Views)
For anyone who's had the same problem, I've (finally) figured out the solution.

So everything pretty much transfers over from traditional DAQ to DAQmx pretty easily except for one thing. In the traditional DAQ  DIO Start.VI there's a line for Handshake source, mine was set to 4 - pattern generation w/ external clock. Now good luck finding much explanation in the NI help files about what the heck this is and how to do the same thing in DAQmx, there's one cryptic line saying that it's particular to 653X boards only. However, I got lucky when I was talking with an NI applications engineer he found something in his knowledge database that sort of sounded the same. I didnt' think much of it at the time, but in playing around with things today I remembered the comment and managed to get things working. So apparently pattern generation w/ external clock is something specific to the chipset of 653X cards (something to do with the clock I'm assuming). And the comment from the NI applications engineer was that under your DAQmx Timing.VI when you click on it and change it to Handshaking (Digital) -> Handshaking (8255...) that this was also something specific to the 653X cards. So having tried everything else, I decided what the heck, they're both specific to 653X cards, you never know. So after setting that on the DAQmx Timing.VI and playing around for a couple more minutes. Eureka! The thing actually started working (this has been a problem for me off and on for the last 3 months that I haven't been able to get a clear answer on). But I mean it's obvious 4-pattern generation w/ external clock obviously equals Handshaking (8255...) right? 😛 Anyways, I've included my code for anyone else who might have the same problem to save you MANY wasted hours of headaches.

Cheers,
Chris
0 Kudos
Message 4 of 4
(2,881 Views)