LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

qsm cdaq

I got this qsm from the forums, thanks Anthony L. I am using cDAQ 9211 and other modules for a daq system. It will be quite large with around 48 temp, volts, amps, rpm, pressure and flow Ai devices. I will need to allow the user to select measuments to record, (maybe a popup) and will need to display all the measurements to a front panel continuously. I am just starting and found this qsm and hope this is the architech I should use. I put a cDAQ 9211 with two temperature measurements on sub1. I can read them in main. Now my question is, what is the best way to add multiple daq steps such as the one I have in sub1. If I try and add additions daq steps in sub2 ( not using sub2 at the moment) then the tasks will conflict with each other, as the tasks in sub1 will have been started already and I don't want to stop them. I could keep adding more events to sub1, each being a different daq event but then I have to enter all channels up front in the global channels control. Any direction on this would be appreciated.

0 Kudos
Message 1 of 4
(2,872 Views)

Hi bassinbc,

 

Based on the description of your application, it sounds like you are trying to create a program which will allow a user to select from different measurements to record and/or view, all while the program is running. Since you cannot add multiple analog input tasks in the same system at one time, or while another input task is currently configured, my suggestion would be to configure the task to acquire from all of the channels at the start and just allow the user to be able to select which channels to record/view and which to ignore. Thus, you will only have a single task running at all times, and you will simply be discarding unwanted information in software by ignoring that particular channel. Also, remember that you can configure multiple different analog input channels within the same task by calling the DAQmx Create Channel VI multiple times in series (as opposed to having to set up many different global channels to reference). While I am not too familiar with this specific "QSM" program, the general idea of using queues to pass data between the parallel processes sounds like a good idea for the type of application you are developing. Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 2 of 4
(2,843 Views)

Thanks dansch,

I think that I have offered too much info. I should simply state that I would like to develop a daq system with lots of Ai channel's. The daq system should be able to record, display and analyze real time data. I simply don't know what is a good way of going about this.

0 Kudos
Message 3 of 4
(2,835 Views)

Hi bassinbc,

 

It seems that you are definitely on the right track by considering an application with multiple parallel loops. The main consideration is to have a dedicated loop running to perform the actual continuous data acquisition, with other loops to pass this data to for processing/displaying/logging. You could implement a pretty simple design in which one loop acquires data and another loop takes this data, graphs it, and then writes it to a file, or you can implement something even more complex if you wish to give the user even more control. In either case, I would recommend taking a look at the tutorial titled "Application Design Patterns: Producer/Consumer" which gives a good overview of this type of parallel architecture. Additionally, you may want to also read another informative tutorial titled "Application Design Patterns: State Machines" which discusses how to implement a complex architecture in which numerous different possible states exist. These two design patterns make up the foundation of the "qsm" program which you found, and may be implemented in your program. Overall, my recommendation would be to begin with just getting the data acquisition working by starting from a DAQmx example program (Help » Find Examples: Hardware Input and Output » DAQmx » Analog Measurements). Then, you may work your way up by adding in the parallel process of analyzing, displaying, and then logging the data. Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 4 of 4
(2,820 Views)