LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring six input signals and output three signals simultaneously

Hello, i have a front panel to acquire data(I and V) from 3 different PV modules simultaneously and i have to output voltages to 3 different MOSFETs. After selecting each channel(differential) for each sensors (3 voltage sensors and 3 current sensors) and for the three MOSFETs, i get an error from one of the DAQ sensor that the task cannot be completed. Please find attached the VI (In the block diagram the channels are wrongly assigned). I am new to LabVIEW. I am using using CDAQ-chassis 9184 with submodules NI 9923-NI 9205 for input signals and NI 9263 for output signals. Please help me if possible.

0 Kudos
Message 1 of 5
(2,371 Views)

You really need to learn LabVIEW!  Spend the few hours that it takes to go through the material found on the first page of this Forum.  I'd also suggest that you do a Web Search for "LabVIEW Tutorials" -- there are a number of excellent ones out there.  I recommend those that involve a PDF, so you can (in principle) print it out and "work along" with the manual, doing all of the exercises and building the VIs shown yourself.

 

Since you are also interested in Data Acquisition, I also recommend NI's "Getting Started with NI-DAQmx", which can be found here.  I especially recommend you skip the section on the Dreaded DAQ Assistant and go straight to Getting Started with NI-DAQmx Programming.

 

You say that you are using a cDAQ with NI modules for input (6 channels) and output (3 channels).  However, your DDA (Dreaded DAQ Assistant) shows two analog inputs from a myDAQ (which only has two analog inputs).  The rest of the code is pretty chaotic, with wires and formulas everywhere -- a challenge to debug or understand.

 

Strive for Simplicity, Order, and Style.  Good LabVIEW code should be almost self-documenting (to an experienced LabVIEW user, or a student who can pass the CLAD exam).

 

Bob Schor  

0 Kudos
Message 2 of 5
(2,342 Views)

The UI seems complicated with tab controls nested several levels deep.  And some of those tab controls seem to be the same on every tab of a higher level control.

 

If you have something that exists on every tab, then what you can do is place the item outside of the tab control, select it, then use the arrow keys to position the item over the tab control.  It will have some shadows under it in edit mode to show that it isn't a part of the tab.  That item will then show up no matter which page you have selected.

0 Kudos
Message 3 of 5
(2,338 Views)

Hello, i know that the VI diagram is a bit complicated and hard to understand but that's not the real problem and i know that the 6 channel allocations is not good (it should be ai0 to ai5). I wanted to know how many DAQ assistant can i have in one code, i.e a DAQ assistant to acquire the signals(6 channels) and another DAQ assistant to send signals(3 channels). Should i use one DAQ assistant for all the 6 channels and plot them on the same graph, same for the 3 channel DAQ assistant. If you have a link or example to share with me, i would thankful.

 

Thank you.

0 Kudos
Message 4 of 5
(2,308 Views)

You should use zero (0) DAQ Assistants.  You should read the article "Learn 10 Functions in NI-DAQmx" (it has a slightly longer title, but if you do a Web search, you'll find the article) and learn how easy it is to do what you want.

 

Here are some suggestions that should get you up and running fairly quickly with DAQmx.  Note, however, it will require you to spend a little time (a few hours, total, perhaps), but will put you in much better control of your code.  Some of this is covered in the article I referenced, but I'll summarize as follows:

  1. Use MAX to "play" with your device and learn how to configure it (and test it).
  2. Learn how to have MAX save its settings for your device in a Task.
  3. Program your DAQ Application in the context of a LabVIEW Project ("New, Project").  If you don't know about LabVIEW Project, learn!
  4. Within Project, create a Task for your DAQ device.  Here, you will create two Tasks, one for the 6 input channels, one for the 3 output channels.
  5. Write your code.  In most cases, it will consist of the following 4-5 DAQmx functions:
    • Start Task, with the Task Constant set to the Project's Input or Output Task, as appropriate.
    • Optional Property Nodes to get timing or sample number information from the Task.
    • A While Loop with DAQmx Read/Write, probably NChan NSamp to get a block of 2D data each loop.  A common thing to do with such a block is to "export" it to another loop for processing -- this is called a Producer/Consumer Design Pattern, and is very common in Data Acquisition and Control routines.
    • At the exit from the While Loop, a DAQmx Stop Task.

 

Defining a Task bundles a lot of (usually constant-during-the-execution-of-the-program) parameters in one place and lets all of the DAQmx functions use them, yet makes them available to the LabVIEW Developer.  Note that the above description uses 3 DAQmx functions and possibly a Property Node.  You can find examples shipping with LabVIEW, and also here in the Forum, and will also find them in the White Paper mentioned at the beginning of this Reply.

 

Bob Schor

0 Kudos
Message 5 of 5
(2,284 Views)