Notification that the scope has been triggered

Post your .Net discussions here
Post Reply
Altron
Newbie
Posts: 0
Joined: Thu May 16, 2013 9:22 pm

Notification that the scope has been triggered

Post by Altron »

I am currently writing software to interface to the 4224 so that I can see a waveform from a device and interpret its signal. The device is stationary and as I move an object close to it a waveform is generated. I need to know two things:

1) How far from the device was the object when the signal started (I am using a cylinder with position feedback)
2) Did the device produce the proper signal over 200 ms

In order to do this I need to have immediate (within a ms or 2) feedback when the scope has been triggered. I can accomplish this with triggered block mode. However, in order to get the immediate feedback my sample size must be very small because the callback function is not called until all the data is collected.

I tried streaming mode as well but it seems the callback is not called every time I call ps4000GetStreamingLatestValues. Most times it takes 3 calls (roughly 30 ms) to get a response from the device.

Does anyone know of a way to both have this desired immediate feedback and retain 200 ms worth of data?

Hitesh

Re: Notification that the scope has been triggered

Post by Hitesh »

Hi Altron,

A callback function is registered with the driver in block and streaming mode which is then called when the device has collected data and is ready for the data to be transferred from the driver.

Which programming language are you using?

Rapid block mode would be an option if it was a series of waveforms, although there would be a 2.5 microsecond re-arm time for the trigger.

With streaming, you would have to wait for the device to indicate that it is ready before collecting the data from the driver.

If your scope had an Function Generator/AWG output, then you might be able to make use of the triggered signal generator facility to output a signal on a scope trigger.

Regards,

Altron
Newbie
Posts: 0
Joined: Thu May 16, 2013 9:22 pm

Re: Notification that the scope has been triggered

Post by Altron »

Hitesh,

I am using VB .NET.

Rapid Block mode is definitely an option that I am considering. The waveform that I am analyzing is appx. 16 ms rising edge to rising edge so 2.5 microseconds is not a concern.

If I were to use rapid block mode I would set it up as the following (in theory):

- Wait for a triggered block of length 1 (this will tell me that I look at the position of the motor)
- Wait for a triggered block of length 200 at a sample rate of 1 millisecond (this will allow me to analyze the waveform and get the required data from it)

With rapid block mode are you allowed to set up different block sizes?


Unfortunately the scope that I am using does not have a function generator output so cannot generate a signal. Clever idea though.

Thank you for your input.

Hitesh

Re: Notification that the scope has been triggered

Post by Hitesh »

Hi,

It is only possible to change the block size between runs so you would need to make sure there is sufficient gap between taking 1 sample and the 200 sample block. You can change the number of segments and captures between block captures if necessary.

It is possible to specify pre-trigger and post-trigger samples when capturing blocks of data with a trigger.

With regards to the triggered signal generator I meant if you had an alternative model to the 4224 with a sig gen that it would have been useful.

Best wishes,

Post Reply