Jump to content

how to multitask in labview?


Recommended Posts

hi

i am working in aproject where i receive data from a ni A/D board, through a DAQMX, at 6400 hz. i have to receive the data for 10 minutes and then save it and then process the data....but the trick here is not to lose any data in the data acquision session meanhile i process the data....and display the result...

i have been told about multitasking in labview ... and mutilthreading as well..

i dont knw ehcih to use for my project ...and how to enable multithreading .

they said i should go to EDIT and then Preferences , but i cant find prefernces in EDIT..........

do u have further ideas...please share them with me..

DTU-WIND

Link to comment
hi

i am working in aproject where i receive data from a ni A/D board, through a DAQMX, at 6400 hz. i have to receive the data for 10 minutes and then save it and then process the data....but the trick here is not to lose any data in the data acquision session meanhile i process the data....and display the result...

i have been told about multitasking in labview ... and mutilthreading as well..

i dont knw ehcih to use for my project ...and how to enable multithreading .

they said i should go to EDIT and then Preferences , but i cant find prefernces in EDIT..........

do u have further ideas...please share them with me..

DTU-WIND

Open the LabVIEW Help and enter "multithreading" in the index tab... :book:

Link to comment
hi

i am working in aproject where i receive data from a ni A/D board, through a DAQMX, at 6400 hz. i have to receive the data for 10 minutes and then save it and then process the data....but the trick here is not to lose any data in the data acquision session meanhile i process the data....and display the result...

i have been told about multitasking in labview ... and mutilthreading as well..

i dont knw ehcih to use for my project ...and how to enable multithreading .

they said i should go to EDIT and then Preferences , but i cant find prefernces in EDIT..........

do u have further ideas...please share them with me..

DTU-WIND

All it takes to multitask is to have two loops running at the same time or to run a sub-vi while the top level vi continues on its merry way. You don't have to concern yourself much with the details of mutithreading. LV takes care of it for you. Do not over-think this part of it.

One option: you can implement a waveform chart to receive continuously aquired data and extract the "History" using a property node. Then you can investigate the History for the particular blocks that interest you. The accquisition continues as the analysis is performed, then you call the history again and investigate the next block of data after the previous set. Everytime you fetch the History this buffer has grown to include the newer data.

The chart acts as a buffer for the data. There is a time stamp for each point and you can work out how to use the timestamps as indexes for retrieving the data.

Does that make sense? I may be able to put together an example if you need it. It will take me a little while to do that. My collegue has used this method with very good results for realtively slow acquisitions like you describe, but not running them for nearly as long a time. I have not used this method myself since buffered acquisitions serve my needs for very finite acquisitions. My co-worker's acquisitions are more variable in length from test to test so the chart is useful from the user side.

You don't need this to respond to user input as my co-worker does, but you need it the read the History after every 10 minutes. The details to work this out shouldn't be too hard to manage.

This brings up another subject. 6400 samples/second * 60seconds * 10 minutes = 3.84E6 samples.

You should make sure you really need that much data before you do this. The speed of acquisition is not too great, but the cumulative size of the data is starting to get cumbersome.

I can offer better advise if I know better what you are trying to do. What are you measuring? Why? What descisions do you want to make based on the data? Do you need to visually investigate the data? Or is all to be analysed mathematically within the code?

What characteristics of the data interests you? Maxima, minima? Inflections? Slope? Anomalous events?

Is there some reason why you need so much data? How many 10 minute sets will you need? At some point you may need to consider aquiring less data or you will need to decimate the data. If your interest is to visually investigate the data, then your sample rate is much too fast.

It is much better to be specific about what you are trying to accomplish. The devil is in the details.

Mike

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.