About Trigger in Streaming Mode

Post your C and C++ discussions here
Post Reply
Posts: 0
Joined: Thu Jan 19, 2023 2:04 am

About Trigger in Streaming Mode

Post by GelDolva »

Hi all,

Sorry to be so basic, but I would like to confirm the triggering behavior in Streaming mode.
What I want to do is that the PC receives data from the PS4262 in Streaming mode and displays the waveform in real time, and when the value exceeds the threshold value, it acquires 50000 samples of data before and after the trigger from that point and displays this waveform for a certain period of time, and after the data is saved, it starts Streaming again. After saving the data, we would like to create a program that starts Streaming and repeats this operation continuously. (Programming in C++)

1. Is it possible to get the data before and after the trigger when it is triggered while receiving data in real time via Streaming in the first place?

2. If it is possible, what is used to determine when a trigger is triggered? In the sample program, does it mean that "g_trig" is always checked?

3. I have created a program that basically follows the flow of the following function, referring to the sample program. I am able to get data from the function generator, but I am unable to determine if the trigger has been triggered, even though I have changed the threshold value in various ways. It keeps receiving data all the time. Is there something fundamentally wrong with the method?

   Data Stock & Waveform Display
   if Triggerd
     DATA SAVE,ps4000Stop,free,Trigger waveform display
     goto ps4000RunStreaming

If you have any suggestions on the best way to do this, I would appreciate it.


Post Reply