LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wireless signal acquisition and saving signal in text format simultaneously for 5 mins

Solved!
Go to solution

Hi,

I am acquiring ECG signal wirelessly and displaying it in in waveform chart. And simultaneously i need to save it in Text format for 5 mins. The problem i am facing is that for saving the signal i am using Write to Measurement File which saves the file in text format..... but while saving the plotting speed decreases.

i am very new to labview.. so plz can any one tell me whether i am missing any thing in it... plz help.....

 

0 Kudos
Message 1 of 12
(5,107 Views)
You should look at the producer/consumer architecture where you do the file write in a consumer loop. You get a slowdown if the file write is in the same loop and that will obviously interrupt your acquisition. The Write to Measurement File is also a slow way to save.
0 Kudos
Message 2 of 12
(5,091 Views)

ok.. thank you...

can u plz help me to create consumer/producer loop in my vi.

i have attached vi ... so plz can u help me in making consumer loop in it.....

i am using microcontroller for analog to digital conversion of ECG signal and via bluetooth iam acquiring it in Visa... then displaying real time signal and trying to save it....

0 Kudos
Message 3 of 12
(5,077 Views)
Solution
Accepted by topic author MAK1292

Why do people always post pictures of their VIs rather than the VIs themselves or at least Snippets?  We can't tell from the picture what Version of LabVIEW you are using (so if we post code, you might not be able to open it), and we can't "play with" your code and try it out without, ourselves, by hand, trying to recreate it from your (sometimes very tiny) diagram.  Please Help Us to Help You!

 

Here's help anyway to get you started with the Producer/Consumer Design Pattern.

  1. Open LabVIEW.
  2. Click "File", choose "New ..." (not New VI), and choose (from the templates) Producer/Consumer Design Pattern (Data).
  3. Study the Template and adapt it to your problem.

The Producer would be anything that Generates data.  Once you have the data, you put it on the Queue and send it to the Consumer for all the rest of the processing.  The idea is that the Producer has an inherent timing that it has to meet, otherwise you lose data points.  The Consumer, on the other hand, just needs to "more or less" keep up (actually, the Queue can/will expand, so if the amount of data isn't megabytes, the Consumer can really be quite slow, though you usually want the Consumer, on average, to be at least as fast as the Producer).

 

Bob Schor

0 Kudos
Message 4 of 12
(5,057 Views)
The attachment isn't even a picture. It's a proprietary file (that could contain a virus) that would presumably contain a picture. The only acceptable way to attach images is as a snippet. Look that up in the help of you don't know what it is.
0 Kudos
Message 5 of 12
(4,965 Views)

Very good point, Dennis, as if Pictures weren't bad enough ...

 

BS

0 Kudos
Message 6 of 12
(4,898 Views)

i am really sorry... Actually my vi was not getting attached

I am using LabVIEW 2013 for programming


0 Kudos
Message 7 of 12
(4,816 Views)

 

 My Vi is not getting attached...

Plz can you help me in including  Producer and consumer loop in my vi

i have attached an image of wireless acquisition  were i am using labVIEW 2013

0 Kudos
Message 8 of 12
(4,795 Views)

And i need the aquired signal to be saved in an array as well for 5 mins without disturbing the plotting

 

0 Kudos
Message 9 of 12
(4,792 Views)

Here's how you embed your VI as a Snippet:

 

  1. Open the Block Diagram
  2. Type ^A (Ctrl-A) to Select All.
  3. Click the Edit Menu, choose "Create VI Snippet from Selection".
  4. Save the Snippet (give it a name) and remember where you saved it.
  5. Go to the Forum and compose a Message (or do a Reply).
  6. Click on the 10th icon on the Menu Bar, the one that looks a little like a picture (Insert/Edit Image).
  7. Be sure "From My Computer" is selected, and click "Choose File".  Browse to the Snippet (.png) file you just saved.
  8. Click "Insert Image".  This will place the image at the current Cursor Position in your Reply.

The thing about Snippets is that they look like an ordinary PNG Image file, but if you have LabVIEW open and drag the image from the Forum into a (blank) Block Diagram, it will magically become LabVIEW code that we can edit, modify, and execute.  And you won't get so many complaints from whiners (such as I) who hate code submitted as pictures ...

 

Bob Schor

0 Kudos
Message 10 of 12
(4,569 Views)