06-16-2016 04:22 AM
Hi everyone,
i'm on a project for a long time now.
To sum up, I got 3 modules for the project : Anolog Input, Numeric Input, Resistance measure.
My main program works, but now I have to link them with an excel file.
I found an easy way to complete this solution, but now my problem is bigger. The point is that I'm using my VIs and Sub-VIs with this way to link my data, but according to LabVIEW, I can't, in the same program, do something in relation with 2 different module. Each module works with one Assistant-DAQ obviously.
To be more specific : I want to put 2 accelerometer data (thanks to the module analog ), and the passing of different sensor 1->0 or 0->1 (thanks to the numeric module)
And when I link 2 DAQ in the same file or 2 sub-VIs which got 1 DAQ in input of a measure file, it doesn't work. The error says that I can't run the second DAQ after the first ... so ...
I hope that you understand my problem.
Do you have a solution to solve this problem ? Should I change a big part of my program to do this or is it just a little detail ? 🙂
Thank you in advance ! I'm really desappointed -_- I'm in for many times ... and I'm late for my project ...
Best regards.
ML
Solved! Go to Solution.
06-16-2016 05:44 AM
A DAQ unit cannot have multiple tasks of the same type (ie you cannot have 2 analog input tasks since they both are trying to use the sample clock, MUX, and A to D). You will need to combine all of your DAQ acquisition into a single task to read. You could then use a queue to send the data to other loops who process the signals they care about.
06-16-2016 06:23 AM
Hi crossrulz 🙂
Thanks a lot for this really fast answer 🙂
About the DAQ unit ok ... I understand 🙂
Now about the solution that you are seing ... I don't know how can I combine all of my DAQ into a single task 😕 what is a queue exactly ? Do you have a little example that I could understand really easily ? :3
I'm still a beginner in LabVIEW in my opinion, and I don't see what's this solution 😕
Regards.
Maxime
06-16-2016 06:46 AM
XFly wrote: I don't know how can I combine all of my DAQ into a single task 😕
You just add more channels to your DAQ Assistant. It is really that simple.
XFly wrote: what is a queue exactly ?
Only one of the most power tools in LabVIEW. Here is one really good use for it: Producer/Consumer
06-16-2016 07:01 AM
Ah yes!
I know that 🙂 But I got 3 different module and I can't add a channel numeric with an analogic in example. And this is my problem 🙂
I got 2 analog input with accelerometer in an assistant DAQ, then I got 4 numeric input in an other DAQ and then 3 resistance data in the last DAQ.
And I can't use these 3 DAQ in the same VI 😕
06-16-2016 08:13 AM
XFly,
I order to give you the best answer, we need to know what chassis model and module types you are using.
I'm guessing you are using a cDAQ chassis. if it's a "Gen II cDAQ", it can handle 3 AI tasks (max 1 per module).
However, if you are using a "Dynamic Signal Analyzer (DSA)" type module in the chassis, the max AI tasks will be 2.
The NI cDAQ-9172 is not a "Gen II" and can only have one AI task.
How Many Different Tasks Can I Concurrently Run on a Gen II CompactDAQ Chassis?
To see if you have a DSA module - check the description column in this link:
Note: Not all modules are listed (missing some newer ones - for example: NI-9230 is a DSA module)
steve
06-16-2016 08:24 AM
stevem181,
I join 2 pictures to simplify this way. You can see then what kind of module it is exactly 🙂
I hope that it helps !
regards
XFly
06-16-2016 08:25 AM
Better with the files ... 😛
06-16-2016 08:34 AM
What error messages are you getting?
Following this post, I'm unclear whether you are having a hardware problem and are getting errors trying to use multiple DAQ assistants, or a software/architecture problem where you don't know how to get all of your code to logically work together.
Please attach your VI and point out exactly where you are having problems, along with any error code numbers if you are getting errors when running the program.
06-16-2016 08:49 AM
Forgot to ask - What sample rates do you need?
steve