LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to event dump from a running buffer

I am looking for efficient ideas on an event dump.  Right now I have a basic datalogger.  it takes data at 100Hz and discards all but the last datapoint for a specified time frame. eg: one sample every two seconds, not two hundred.  I am looking to record discontinuity events without sacrificing the basic datalog function.

 

I am thinking that I want the channels of interest to be stored in a running buffer at the full 100Hz.  maybe a lossy queue or an running array of specified length?  Another concern is how to add this data after the basic datalog colums but not have the datalog dequeue wait on data from the possible event? Would there be a diffference between putting the event structure around enqueue element in the process loop and placing it around the dequeue element in the datalog loop?  I am relatively new to labview so if I get it working, it will probably not be a "best practice" answer.   I am going to start playing with the code, but high speed, low drag answers are really appreciated.

0 Kudos
Message 1 of 7
(2,721 Views)

sorry to double post. I received an error.

0 Kudos
Message 2 of 7
(2,719 Views)

update.  I am not at my computer so I cant provide an updated version right now.  I added a lossy Q in the producer loop.  I flush the Q in the logging loop on bottom on demand.  it works!  it results in array.  I would like to use merge signal with the regular datalog stream.  the only solution I have right now is to rotate array, index array, and rotate array? then merge signal? my stop button results in an error,too, but that is another matter for another day.

 

0 Kudos
Message 3 of 7
(2,688 Views)

Hello,

 

Which location of the case structure worked for you?  Also, how are you using the merge signals function at the end?  These details might point me in the right direction as far as offering the best practice.

 

Thanks

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(2,656 Views)
I intend to have the case structure in the process loop provide the boolean value to the. Case structure in the logging loop. I am guessing I will need to rotate the output array from the flush so I can index it by channel. Right now it indexes ten samples across the four channels. So I guess the index is row where channel is a.column? Not sure how to index by column without rotating, index, then rotating. After they are indexed, use merge signal to feed them to the file. I.was dumping data with a button, but only getting an element at a time. Replaced with flush array. Gets the whole buffer, but I can't merge with data log stream until a pare it down to separate channels. I hope I answered your question. Also been having problems with chart time axis. When I put in multiplier to satisfactory length (3-5 hours of most recent data), it is all zeroes. I'll tinker with that later.
0 Kudos
Message 5 of 7
(2,648 Views)

I believe you are on the right track when by rotating the array.  I can't think of another way to index it by channel.

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 6 of 7
(2,632 Views)

I accidentally double posted.  I figured it out and it is running.  check other post with same name for solution, if interested.

0 Kudos
Message 7 of 7
(2,606 Views)