DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect and save an event and the previous 60s data in a R32 file

Hello
 
I am a new user of Diadem.
 
I perform long reliability test, and so the R32 file reach often 1 Giga byte (with a measure frequency of 500hz) when I stop manually the measure after the event . And after I only use the last 60s.
 
I acquire a Voltage signal using a measurement instument connected to the Serial port, I save this signal in a document by using the document icon in the DAC (Circuit with packaged data)
 
 
I have read the manuals but I don't know how to do the following thing:
 
How to save only the last 60s in a buffer and write it into a file if they are followed by an event.
 
The signal has normaly each 10s a 10v spike (During 7ms) but some time it remain constant near 4V during at least 5s and that is the event.
 
How to do that in the DAC? Should I use a trigger with a timer condition, but I don't know how to do it with packaged data.
 
Could you give me an example
 
Thanks for your help
 
Alfons
 
0 Kudos
Message 1 of 9
(4,867 Views)

Morning,

Does anyone know if a buffer is available in the dac to stock data before transfering it into a file.

Thanks,

Alfons

0 Kudos
Message 2 of 9
(4,840 Views)
Hello,

I have created two Examples how to do this.


The basic idea is to build packets with 60 seconds of data, find the event and save the last minute. One way to create the packet with 60 Seconds is the Offset Register. This block is also able to shift the signal by smaller steps.

The signal is created with two generators and a manual switch to create the stop event. The blocks are running free, so you don’t have to wait a minute or more to test the behaviour. It is possible to simulate real timing in the generators if you like to see the real speed.

In the simple example the Offset Register “1 Minute” is producing a packet with the last 30.000 values 10 times per second. This is shown in a scope. After this, a formula is looking for values between 2 and 6. All values in the packet are counted and if the number is above 2.500 (5 seconds) the block Relay gives this packet into the store and stop block. (Store is simulated with a scope to make testing easier.

This example should do the job.

 

I have also included an advanced example.

In this example a formula is creating a second signal with trigger information. This signal has the same amount of values and can be used for more complex ways of triggering. In this example the formula is measuring the time when the signal is between 2 and 6. When the signal is not in this range the time is set to zero. The Multiplexer Block is used to build a loop to put the result of the formula back in to the formula. This allows the formula to ad 0.1 seconds to its own result from the loop before.

The trigger signal is later used to store and stop the test. It is possible to create very flexible triggers, events and decisions during a process if this is needed.

Of course, it is possible, that you have to change some of the blocks or add additional functions if the simple formulas are not able to separate the event from other changes in the signal.

Ulrich Bierwisch


Download All
0 Kudos
Message 3 of 9
(4,829 Views)
Many thanks, I will test it and try to fit it to my application.
 
I let you know
 
Thanks again
 
Alfons,
0 Kudos
Message 4 of 9
(4,820 Views)
I have put my F-modules in the simple.dac and It works well, It saves the 60s before the event as I want.
 
How can I modify the DAC to save the 60s before the event, the event and the 20s after the event ? 
 
I think I need to add a time offset between the 5 Seconds function and the Relay1 but I but I don't know yet how to do a timer.
 
Many Thanks,
 
Alfons,
 
 
0 Kudos
Message 5 of 9
(4,812 Views)
Hello,

My first idea was, that this is where the advanced solution has to be used. I have changed "advanced" by using ignore blocks to create packets of 40.000 values (80 sconds). Then I have used the Trigger Block which is able to trigger at any point within a packet and cut out one or more packets out of the stream of data. The only trade off with this solution is, that the packets have to be very large, because the Trigger Block can only pretrigger up to one packet. If the event is somewhere within the packet, you have to wait until the next complete packet is ready. The storing has to wait additional 80 seconds. On the other hand, this solution can be very fast because every value is used only once. The simple solution with the offset has to copy and process a minute of data 10 times per second.

After the advanced solution was ready I found, that there is a good solution for the simple version. In this version, the Offset Block is producing 80 seconds of data 10 times per second. The search for the trigger event is done only with the oldest 60 seconds of each packet while the last 20 seconds are ignored with the Ignore Block.

The simple example has to process 400.000 values per second instead of 500. If you think of doing somthing like this with larger sampling rates, you have to use the more advanced solutions.

Ulrich Bierwisch
Download All
0 Kudos
Message 6 of 9
(4,797 Views)
Good evening,
 
I have forgot to tell you that the event lenght is not a constant, it can exist from 6s to 4 minutes (the component burn after!)
 
And I need to save the signal from 60s before the event start to the 5s after the event end.  (this window contains the event)
 
I prefer for the moment to test with the simple2.dac because I understand more how it works.
 
In the following DAC the F-module aquires 5 signals, so I think, I have to add a filter between the 80s block and Ignore1 block,  to use only the correct signal for the detection of the event. (Signal 5) Should I use unpackage block?
 
The real event (which follows the spike when it happens) is near a constant of 0,04V 
 
The spike max voltage is 0,15V and so with the simple2.dac, I think we count in the block named count some spike values (The spike start from 0V to 0,15V and so reach some values near 0,04V) Does it is exact what I mean?
 
Thanks a lot for your help,
 
Alfons

Message Edited by AlfonsUK on 10-26-2007 10:59 AM

Message Edited by AlfonsUK on 10-26-2007 11:01 AM

0 Kudos
Message 7 of 9
(4,788 Views)
Good evening,

unfortunately, it is not possible to run your DAC-file without the hardware, so I have to guess a little bit.

I think, by extending the simple example, you ran into several problems because of the way packets are running though the Block Diagram. The simple version is only working as expected if you save one packet of data. The Offset-Block is producing overlapping packets of data. Each packet contains 79.9 seconds of data from the last loop and 0.1 seconds of new data.

It is easy to change the advanced2.ADC in a way to save several minutes after the Trigger. You just need to change the Trigger1 block to "continous after trigger" and the Stop1 to 4 packets. If you like, you can add some additional blocks to stop depending on the length of the event.

If you need 1 Signal out of a packet of 5, you should use the Separate Block.




0 Kudos
Message 8 of 9
(4,758 Views)
Thanks, I will try to modify advanced2.dac with a separate package block. I hope I will manage to do it.
 
Gruß
Alfons
0 Kudos
Message 9 of 9
(4,748 Views)