ALARM-Capture Buffers Full - excess files

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
pmohan
Newbie
Posts: 0
Joined: Wed Nov 27, 2019 3:34 pm

ALARM-Capture Buffers Full - excess files

Post by pmohan » Wed Nov 27, 2019 4:32 pm

Using the Alarm/Capture/Buffers Full feature to write full buffer waveforms as psdata files. I've set the Buffer size to 128 waveforms . Problem I have is that its writing all the intermediate 'partially full' buffers out as well. So, in this case, I end up with 127 psdata files that I don't need. Is there a way to only write a truly 'full buffer' (128 waveforms) and not get the partially full files ? If I let the acquisition run, I'd like to get multiple files, 128 waveforms each, with NO overlapping data. Can that be done as well?

Gerry
PICO STAFF
PICO STAFF
Posts: 509
Joined: Mon Aug 11, 2014 11:14 am

Re: ALARM-Capture Buffers Full - excess files

Post by Gerry » Thu Nov 28, 2019 12:52 pm

Hi pmohan,

I'm not quite sure what you are asking. In this scenario, a buffer refers to the waveform buffer split into multiple buffers, where each split buffer holds 1 waveform. So you have split the buffer into 128 buffers, each holding one waveform. when the Alarms function then writes out the captured data from the split buffers each buffer will be completely full (not partially full) with one waveform. If you don't need the 127 waveforms before the last one (but you need the saved waveform to be the 128th captured waveform) then you should just save the last one. if you don't even need the saved waveform to be number 128 of the waveforms captured, then you should just save one waveform once the data has been captured.

If you have the maximum Waveforms set to 128, and then set the alarms to activate for a "Buffers full" event and then set the action to be "Save current buffer" you should get just the last of the 128 waveforms saved (no intermediate waveforms). If you only want the first buffer of data then you should set the alarm event to be "Capture", and the action, as before, to be "Save current buffer" and you will get just the first waveforms saved.

I have attached the psdata files for both of these alarm conditions so that you can see the settings (you will need to go to alarms and select the event "buffers full" for "Last buffer.psdata" to activate it, as it defaults to "Capture").

Regards,

Gerry
First buffer.psdata
(575.21 KiB) Downloaded 5 times
Attachments
Last buffer.psdata
(20.28 KiB) Downloaded 4 times
Gerry
Technical Specialist

pmohan
Newbie
Posts: 0
Joined: Wed Nov 27, 2019 3:34 pm

Re: ALARM-Capture Buffers Full - excess files

Post by pmohan » Mon Dec 02, 2019 5:26 pm

Thanks for your reply Gerry- yes, communicating the behavior is the first step. I have attached two psdata files from a capture sequence. Big picture: continuous low duty cycle signal pulse to be captured multiple times to a single file ; scope triggered by the transmit strobe pulse. I want 128 trigger events captured in the psdata file. I eventually get that; But, I get 127 'partially full' files written out before that. By partially full I mean the scope saves out first, a xx(1) file, then a xx(2) file ...etc where the number in the parenthesis is the number of triggered waveforms in the file. I only want the xx(128) file. I have tried seemingly all possible combinations of the Alarm settings/options. Many options only will save one trigger event in the file, but I need all 128.
I hope this explains my question more clearly. The two attachments may help.
Regards, Paul
Attachments
20191202-0001 (128).psdata
(112.25 KiB) Downloaded 6 times
20191202-0001 (2).psdata
(9.42 KiB) Downloaded 5 times

Gerry
PICO STAFF
PICO STAFF
Posts: 509
Joined: Mon Aug 11, 2014 11:14 am

Re: ALARM-Capture Buffers Full - excess files

Post by Gerry » Wed Dec 04, 2019 10:45 am

Hi pmohan,

Could you draw and post a rough diagram of approximately how you would like the capture to look once saved (using 3 waveforms instead of all 128) including labelling both channels (i.e. channel B as the transmit strobe pulse, if that is the case), and describe what you are attempting to achieve (why you are making the measurement) which will help with my understanding of what you are looking for. Also, which model Scope are you using (need to know to see your settings in a data file)?

Regards,

Gerry
Gerry
Technical Specialist

Gerry
PICO STAFF
PICO STAFF
Posts: 509
Joined: Mon Aug 11, 2014 11:14 am

Re: ALARM-Capture Buffers Full - excess files

Post by Gerry » Wed Dec 04, 2019 11:27 am

Hi pmohan,

Looking at your alarm settings in your psdata file it appears that you have set alarms to go off for 2 events, i.e. on every capture and when the buffers are full, and then you are saving all buffers for both alarm conditions. If you only want the file to contain all 128 waveforms then you should only have one alarm event, i.e. buffers full, and only that event saving all buffers as the alarm action (so you need to just untick the Capture event and apply the changes).

Regards,

Gerry
Gerry
Technical Specialist

pmohan
Newbie
Posts: 0
Joined: Wed Nov 27, 2019 3:34 pm

Re: ALARM-Capture Buffers Full - excess files

Post by pmohan » Wed Dec 04, 2019 2:05 pm

Thanks for the helpful feedback Gerry. I've attached some notes that hopefully explain what we're doing with the data. I will definitely try your guidance on how to set up the Alarm configuration. Afraid I'm finding the Alarm setup menus confusing to me, but will follow your steps. So yes, my vision would be to see a 128-screen capture written out into a single .psdata file. And perhaps this would continue until I hit the Stop button - with each new block of 128 waveform captures going into a new .psdata file (128 screen captures each).
May I ask, are the 128 screen captures time sequential when multiple screens are written to the .psdata file ? I assume that is the case. That is, there are no missed triggers between the waveforms stored in the file.
Regards, Paul
Attachments
Pico Capture Notes.pdf
(147.06 KiB) Downloaded 4 times

Gerry
PICO STAFF
PICO STAFF
Posts: 509
Joined: Mon Aug 11, 2014 11:14 am

Re: ALARM-Capture Buffers Full - excess files

Post by Gerry » Thu Dec 05, 2019 12:26 pm

Hi paul,

If you want 128 buffers of captured data written to a file repeatedly, which you can stop by hitting the stop button, then you can do that by adding a 'Restart capture' action to the end of your action list. I have created and attached a psdata file using your data file/settings that does all the right things.

Repeat-Test.psdata
(199.11 KiB) Downloaded 3 times

The 128 data captures not contiguous, as there are data gaps between consecutive waveforms. This is because the Trigger needs to be re-armed before the next capture in order to be used again, and it takes a finite amount of time to do this (typically >1us). Also, when using 'Repeat Trigger' mode, each individual buffer, or split buffer of data is captured and then sent to the computer via USB, which takes 10's of milliseconds because of the time required to establish a USB connection. So, if you want the minimum gap between the end of one capture and the start of the next you will need to use 'Rapid Trigger' mode, where all 128 buffers of data are captured first before being sent to the computer, so that the only time lost between captures is the re-arm time.

Rapid Trigger Mode is only available for the fastest sample rates (which includes the one you are using), and the number of buffers captured is independent of (but not greater than) the 'Maximum waveforms' set for the waveform buffer. So, to set the required number of captures, you enter the value in the text window to the right of the silhouette of the Hare, which is in the capture settings bar at the bottom of the display (see attached image).

Repeat-Test.png

If the gap between waveforms is still to large, then your only other option would be to perform one large capture of 128 cycles of your low duty cycle pulse (the length of which would be 128 times the number of samples use for your selected Timebase) or, failing that, the largest number of cycles that will fit in the 128MS buffer of the PicoScope 3204D, using the minimum number of samples per capture required to get a good enough waveform (if you are able to reduce it from 1000). You could then create a function in Matlab to split the data into individual waveforms before processing.

Regards,

Gerry
Gerry
Technical Specialist

pmohan
Newbie
Posts: 0
Joined: Wed Nov 27, 2019 3:34 pm

Re: ALARM-Capture Buffers Full - excess files

Post by pmohan » Fri Dec 06, 2019 2:25 pm

Very good Gerry - Thanks for your very useful details. I 've set up the Alarm setting as you prescribed and now have single files generated with 128 screen captures in each. I will try the 'repeat trigger' mode per your instructions. And appreciate your background on contiguous data capture. It will be important for us to get consecutive, no-gap trigger windows stored as we will have time multiplexed (on single channel) input signals written to our psdata file. Sounds like this need was anticipated, and the 'rapid trigger' function is available.

Regards, Paul

Post Reply