LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

producer consumer loop : Write waveform data to consumer loop

Hi,

 

I am currently having problem writing data to the spreadsheet using the same loop with DAQ assistant inside. So i am thinking about using two separate loops one to read and  filter signals (Producer Loop) and another to write to spreadsheet(Consumer loop).

 

Since i am new to labview. Can anyone help me on this matter?

 

I have attached my vi herewith this post.' In my vi i want my filtered signal 1 to be written to spreadsheet. 

 

Any suggestions will be appreciated..

Thanks.

 

Sachet

Download All
0 Kudos
Message 1 of 5
(4,192 Views)

There is an excellent Template for the Producer/Consumer Design Pattern included in LabVIEW.  Start LabVIEW, do "New from Template", look for Producer/Consumer.  [You might need to open LabVIEW, go to File, New ..., VI From Template, Frameworks, Design Patterns, Producer/Consumer Design Pattern (Data)].

 

Bob Schor

0 Kudos
Message 2 of 5
(4,168 Views)

Do you really need to sample strain at 25k? When we open your vi we are facing the GWWG (the Great Wall of Waveform Graph),. These take time to draw, delete the useless ones.

 

The Producer will include ONLY the DAQ Assistant. Also try to read less sample (thus sending packets of data more often to the consumer loop. Have a look at the Producer/Consumer Design Pattern (data) from the LabVIEW template (File - New ... From Template - Frameworks - Design Patterns).

 

Ben64

0 Kudos
Message 3 of 5
(4,165 Views)

I would use the DAQmx Logging cabability.  It will stream your data straight to a TDMS file, which can be viewed in Excel with the add-on (should have been installed with LabVIEW).  You can turn on the logging in the DAQ Assistant.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(4,138 Views)
Spoiler
Now I get to laugh at Tim a littleSmiley LOL  Note: Run Continuously and a latching Stop boolean into a DAQ Assistant with a 25kHz contineous Task!  There is no way the DAQmx State transitions are going to keep up!--- oops

@ sk1

The "Run Continuously" button is an advanced debug option.  Do not press that button unless you are "sandboxing" simple calculations!  Just run the vi and let it go untill you meet the While Loop exit condition (Press the stop button)

 

Also, you should initialize that Shift Register!  

 

Averaging 7 one second waveforms does not really make sense unless you know the period of the signal is an exact multiple of 1 second- not very likely!

 And, lets talk about memeory space, 8 buffers of 25k of DBL means you need 1.6Mbytes just to hold the data!

 

What do you really want to do? we can help!


"Should be" isn't "Is" -Jay
Message 5 of 5
(4,114 Views)