Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Scaled data in CWAI

I know how I can get the data, the problem is to read it fast and find the right data which I want to use. When I`m doing do and while it don't run. I know the best way to do is if and else. What else can I Use?

Regards
Stefan
0 Kudos
Message 1 of 2
(2,747 Views)
Forgive me If I do not fully understand your question. I am asuming that you are using CWAI in Visual C++.

Using the CWAI, you can select the speed at which you acquire data. This property is called the Scan Rate and it can be any value up to the maximum rate of the Data Acquisition Board that you have. If you do not want to use the CWAI ActiveX component, you could also use the NI-DAQ functions. These are lower level functions that may help speed up your application. You can find more information about these functions in the Start Menu > Program > National Instruments > NI-DAQ > NI-DAQ Help.

With regards to finding the correct data in the array, you will need to scan through the data. You mentioned that you tried to use a "Do.. While" loop. I do
not see why this would be a problem if used after the array of data has been acquired. Instead of using IF and Else, you could also use a "Switch.. Case.. Break" if you would prefer. You may also want to try to find faster array searching algorithms, which you may find online.

Good Luck!

Mike Rakolta
National Instruments
0 Kudos
Message 2 of 2
(2,747 Views)