LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set DAQ assistant to generate data every 10 second

Hello,

 

I know my question is very basic. Sorry, but I am new to LV. I want DAQ assistant to generate data in  every 10 seconds. How should I do that??

 

I want to set interval like this because, I want to measure and generate data in every 10 seconds and display it on chart.

 

Thank you so much for your attention and time.

 

0 Kudos
Message 1 of 7
(1,969 Views)

Hi Winky,

 


@Winkyy303 wrote:

I want DAQ assistant to generate data in  every 10 seconds. How should I do that??


As has been already told in your other thread: don't use the DAQAssistent and its DDT wires!

 

That being repeated: what does the DAQAssistent output right now?

Why can't you use a loop to repeat that part of code each 10s?

what have you tried so far and where are you stuck?

Why do you hesistate to attach your code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,932 Views)

Hey,

 

Thanks for help GerW.

 

I am sorry for that; DAQassistant's output is current in mA. I understand how loop works but I don't understand it's effect on DAQassitant. Here I have attached my vi in which I am using loop. Everything is working fine but my doubt is: 

 

I think that loop has no effect on DAQassistant's output and only other parts of system like my Scale. vi is working in loop at every 10 sec and because of that I am getting data.

 

NGL, I am hesitating bc I think my code is lengthy and little out of the line. Still here is a my vi.

 

 

 

(I have set "wait" at 5 seconds for now)

 

0 Kudos
Message 3 of 7
(1,923 Views)

Oh, and here is my subvi for scaling.

 

Thanks again

0 Kudos
Message 4 of 7
(1,922 Views)

Hi Winky,

 

again: don't use the DAQAssistent and those DDT wires! They do you no good…

 

Why do you set the DAQAssistent to read 4000 samples, when you use just one (1) sample per channel? That does not make any sense at all!

 

Recommendations:

  • Whenever you do the same operation multiple times you should use a loop instead of duplicating code!
  • Don't use the DAQAssistent.
  • Apply the scales to the channels in your DAQmx task, so you don't need to apply them later on…
  • learn DAQmx basics!
  • Use FormatDateTimeString or FormatIntoString to format a timestamp into a string!
  • It is not recommended to use an event structure as the outermost structure in your VI… (Read the LabVIEW help on event structures!)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(1,913 Views)

hey,

 

Thanks for  quick response.

 

Okay, I will refer manuals and learn it. Yes, as you mentioned about scaling I understand how to do it.

 

But my task is that user should be able to adjust scaling manually by using "numeric control" (for each channel)

 

I don't know why they need this type of things but I can't do anything about that; So is there any other way to perform scaling in which user can manually select max and min value?? (Just as I did in my vi)

 

Thank you so much for your efforts and attention.

0 Kudos
Message 6 of 7
(1,909 Views)

There are an excellent set of White Papers from NI that discuss DAQmx.  Please do a Web search for "Learn 10 Functions in NI-DAQmx and Solve 80 Percent of your Data Acquisition Applications" (I think that is the exact Title), and please skip over the first section that mentions the Dreaded DAQ Assistant!  As others (thanks, GerdW) have said, Do not use the DAQ Assistant!

 

Learn how to use MAX (or the LabVIEW Project) to set most of the settings for your DAQmx Task before you run it.  If, on the other hand, you want to change some settings (like Range) at Run Time, you need to stop the Task and reconfigure it.  For instance, to change the range of an A/D Converter, you would wire Max and Min values into the Configure Task function (found on the DAQmx Palette, which is in the Measurement I/O section in the Block Diagrams).

 

Bob Schor

Message 7 of 7
(1,887 Views)