LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event-driven circular hard disk data: how to change the event?

Hello All!

 

I want to use the example given in the tutorial "event-driven circular hard disk data" because it correponds to what i need to do. But instead of having a button to make the event, I want to analyse a little the data in the buffer 1 (i want to filter the data, level them and detect peaks). if there is one peak, I would like to save the data ( if there is one peak, it is "true" for the case structure in the event loop). But how can I obtain the data from the buffer 1?

 

thanks for your help!

 

Sophie

 

PS: LV version 8.2

0 Kudos
Message 1 of 10
(3,819 Views)

Hallo Sophie!

 

i like to know what you a really want to know.. just how to read the Data from the Buffer?

 

regards..  Marcus

0 Kudos
Message 2 of 10
(3,795 Views)

Hello Marcus!

 

Yes I want to read the data from the buffer in order to analyse them (filtering, leveling and detecting peaks). I want to use the result of the analyse (peaks = yes or no?) to trigger the event loop. If there is a peak, I want to record the data and if not I continue to read the buffer without recording it. My problem is I don't know how to obtain the data from the buffer. I have tried to dequeue elements but I don't know, with this programm, how to obtain the binary data.

 

I hope my problem is more clear? let me know if not!

 

thanks!

 

Sophie

0 Kudos
Message 3 of 10
(3,793 Views)

Hello Sophie!

 

i hope i understood you right! Have done a litte VI which shows how to use the enqueue and dequeue elements. The prgoamm puts random values in the queue. In the other while the program looks if the values are bigger than a constant (maybe searching for peaks) and if they are, the programm writs the data with a Timestamp in a text-file. If you klick the stop button the programm wirts all elements that are left in the queue and bigger than the constant to the text-file too and quit the queue and the opend text-file. 

 

Hope that helps. If not let me know! And maybe tell me more exactly where you have this problem in the programm so that i know where i have to search.

 

regards! Marcus.

0 Kudos
Message 4 of 10
(3,779 Views)

Hej Sophie! How is going with your Problem? Did work out? Let me know if you have any more questions.

 

regards, Marcus

0 Kudos
Message 5 of 10
(3,748 Views)

Hi Marcus,

 

I didn't have time to work on my software because I had to do experiments in the lab...but I have one question: if you look a the screen shot of the main vi, I want to interact with the event structure. Should I configure a new queue in the configcircubuff in order to obtain my binary data? If yes how can I add a new name in the "unbundle by name" ?

 

thanks a lot for your time and your help!

 

Sophie

 

main (in 3 parts!)

main1.JPG

            main2.JPG

main3.JPG

 

configcircubuffer:

configcircbuff.JPG

Message Edité par stage84 le 11-13-2009 04:59 PM
Message 6 of 10
(3,729 Views)

Hej Sophie,

 

I am sorry that I have another few questions for you. I would like to know what you mean with "event structure"? Maybe the case structure with the data event case? 

If you want to add another queue in the cluster you just have to put it in the cluster. If you want to use it in your program with unbundled by name you just have to put your mouse courser on the bottom side of the "unbundled by name vi" and pull it down. Than you will see the other elements that are in the Cluster you are unbundling.

 

I looking forward to hear from you again. Regards.. Marcus

0 Kudos
Message 7 of 10
(3,690 Views)

Hello!

 

I have made some changes in the software, in the getData.vi, in the configcircbuff.vi and in the circbuffexample.vi of the example I told before.

Now I can get my data correctly and put a threshold to make an event. But there is an error when the soft wants to write in an archive file. The code error is the 4. Could you please help me? I want to obtain the data at 300kHz and to record the data 10ms before and 10ms after the event.

 

If you need more details, tell me!

 

Sophie

0 Kudos
Message 8 of 10
(3,644 Views)

Hello Sophi,

 

Why Do I Get Error 4 Using the Read File VI in LabVIEW?
http://digital.ni.com/public.nsf/websearch/A1DA28A91A4680A786256D050065F294?OpenDocument

Why Do I Get Error 4 When Calling the Read LabVIEW Measurement File VI Multiple Times?
http://digital.ni.com/public.nsf/websearch/0576444C8FD4DC0F86256E83007FA540?OpenDocument

The another way to avoid error 4 is using General Error Handller.vi.
Put the General Error Handller.vi next to Read from Binary File.
Set exception action to "cancel error on match" and exception code to "4".
By mean of this way error 4 will be ignore.

 

Maybe this helps you. 

 

Regards, Marcus

Message 9 of 10
(3,527 Views)

Hi Marcus!

 

Happy New Year! and tank you for your answer! in the meantime I had to finish another project and I didn't work on my software. I will try your solution and let you know if it is working!

 

thanks again for your answer and sorry for my late answer

 

regards,

 

Sophie

0 Kudos
Message 10 of 10
(3,417 Views)