LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i capture 6 differential analog in lines using PFI0 as a clock?

Yep, the 6259 is more than sufficient hardware for your application. 
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 11 of 23
(957 Views)

Only one way to find out if it works.  Try it.  I always prefer to use discretes over express vi's because you have more control.  It's worth the time to learn the discrete vi's.  Express vi's are quicker to develop but they come at the expense of less parameters to control.  In this case, seting up an external trigger then sending the initiate command followed by a read command cannot be done with an express vi.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 12 of 23
(948 Views)

So, i tried the loop around the create virtual channel vi and didn't get the expected result. ai0 gave a response, no of the others did. i was wondering if you could tell me which of the two block diagrams would be correct. thanks,

Kris

0 Kudos
Message 13 of 23
(940 Views)

The top block diagram has a loop with an output with indexing disabled.  Only the last iteration of the loop will pass out the AI reference.  So only one channel will work.  In the bottom loop, all should work, but it will only happen one channel at a time.  I don't think you want either of these.  What you need is to create an DAQmx task.  This will set up the AI to read multiple channels at one time.

 

Two ways to create a DAQmx task.  One is to use MAX.  Look for help on creating tasks.  Its not difficult, there is a Create Task button on the top menu in MAX.  Then you reference the task name in your VI.  Wire the task name into your very first DAQmx call, the DAQmx Create Channel, only wire it into the uppermost left terminal, the one labeled "task in" (right click on the terminal and select create constant, then select the task name from the drop down menu in the constant box).  Then you don't need any loops.

 

Another way is to create the task in MAX and then add the task name to your vi like in the above paragraph.  Then you right click on the task name constant and select create code.  This will generate subvi functions on your block diagram, and you don't need the MAX task name anymore.  What is good about this method is that if you move your application to another computer, you don't need to export MAX settings to that computer.  In the first case, moving to a new computer involves exporting MAX from the old computer and importing to the new computer so that the task gets moved also.

 

Hope this helps.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 14 of 23
(935 Views)

Thanks for the reminder tbob, I guess I should have mentioned that tasks are needed! Smiley Wink

 

You can also do everything outside of MAX. Here is an old Action Engine I had for use with the PXI-6259. Take a look at the 'create tasks' and 'config' cases to see how to set up multiple tasks with multiple channels.

 

I also note that you have your terminal configuration set to RSE, didn't you want differential inputs?

Message Edited by NIquist on 04-08-2010 02:50 PM
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 15 of 23
(928 Views)

NIquist wrote:

Thanks for the reminder tbob, I guess I should have mentioned that tasks are needed! Smiley Wink

 

You can also do everything outside of MAX. Here is an old Action Engine I had for use with the PXI-6259. Take a look at the 'create tasks' and 'config' cases to see how to set up multiple tasks with multiple channels.

 

I also note that you have your terminal configuration set to RSE, didn't you want differential inputs?

Message Edited by NIquist on 04-08-2010 02:50 PM

 

I didn't see where he required differential inputs so I used RSE.

 

I looked at your example.  I didn't even know that there was a create task function.  This will be very useful in my world.  I've been doing it the hard way.  I also notice that you can use a function called DAQmx Flatten Channel String to take an array of physical channels and convert them into a string to be an input to the "global virtual channels" input of the Create Task function.  Then you can eliminate the loop in your config state and just pass in the task name to the DAQmx Create Channel function (only if you didn't use the names input, which I don't use).  So you can teach an old dog new tricks.

 

Thanx, Niquist!

 

 

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 16 of 23
(915 Views)

I saw this:  "i'm using a PXI-6259 i've got 7 diff. analog in lines", and assumed diff was differential but maybe he just meant different?  Or difficult??? Smiley Happy

 

I admit I felt like an old dog when I started using DAQmx.  After I came to terms with the new paradigm though, Wow!  I would never want to go back the traditional DAQ. 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 17 of 23
(902 Views)

NIquist wrote:

I saw this:  "i'm using a PXI-6259 i've got 7 diff. analog in lines", and assumed diff was differential but maybe he just meant different?  Or difficult??? Smiley Happy

 

I admit I felt like an old dog when I started using DAQmx.  After I came to terms with the new paradigm though, Wow!  I would never want to go back the traditional DAQ. 


Reading was my worst subject.  I didn't catch the diff part.  I hope the original poster knows the difference between RSE (signle ended) and differential, and how the differentials are paired up (AI0-AI8, AI1-AI9, etc).  I'm sure he will ask if he runs into a problem.  He coudl have meant different though. Smiley Surprised

 

Same here with DAQmx.  I had to go through the learning pains, now I would not want to go back to the regular DAQ.  When I suggest hardware (PXI cards), I always pick one that is supposted by DAQmx  (M series, I think).

 

 

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 18 of 23
(883 Views)

i did mean differential... sorry for the confusion. and i'm still working on the task, think i'm getting it. it seems that i'm going to need to, create the task, query each differential input one after the other, and then process the data. i'll let you know how it turns out. and thanks again, both of you for the help.

Kris

0 Kudos
Message 19 of 23
(870 Views)

Keep with it finistere,

 

Once you have used DAQmx you will never go back to express vi's 🙂

LabVIEW 2012
0 Kudos
Message 20 of 23
(867 Views)