PS2204a LabView trigger example doesn't work

Post your LabVIEW discussions here
Post Reply
Waldi
Newbie
Posts: 0
Joined: Mon Nov 21, 2022 10:52 am

PS2204a LabView trigger example doesn't work

Post by Waldi »

Hello,
I am using the latest github example for PS2000 Scope, the PicoScope2000ExampleFastStreaming.vi
It works, however I have problems setting the trigger. Only the negative Int16_t input for threshold work, there I see that the device stops after applying an appropriate signal. However, if I set positive values for the threshold, then the device triggers immediately, no matter what positive values are entered.

How to use positive values for threshold?

Thank you in advance.

Waldi
Newbie
Posts: 0
Joined: Mon Nov 21, 2022 10:52 am

Re: PS2204a LabView trigger example doesn't work

Post by Waldi »

I've tried different parameters for direction in ps2000_set_trigger-2 function. It seems 0 means rising edge and anything else is below threshold. Does somebody know how to trigger on falling edge?

Martyn
Site Admin
Site Admin
Posts: 4277
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: PS2204a LabView trigger example doesn't work

Post by Martyn »

I don't have access to LabVIEW to be able to look at the example code, however the information on the function calls can be found in the Programmer's Guide https://www.picotech.com/download/manua ... -guide.pdf

0 is rising and 1 is falling
Martyn
Technical Support Manager

Waldi
Newbie
Posts: 0
Joined: Mon Nov 21, 2022 10:52 am

Re: PS2204a LabView trigger example doesn't work

Post by Waldi »

Hi Martyn,

I'm already using Programmer's Guide. As you can see in the attachment, the values in LabView example on Git are completely wrong.
I have tested 0 and 1. Zero is working for rising edge, 1 and any other value is below threshold. I'm still not able to trigger on falling edge.

I've found this topic: topic14301.html
But I can't do the second point
2. Set the channel count on the device using the wrapper’s setChannelCount() function.
because there is no function setChannelCount() in the ps2000Wrap.h
Attachments
trigger.png

Martyn
Site Admin
Site Admin
Posts: 4277
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: PS2204a LabView trigger example doesn't work

Post by Martyn »

I have passed the information on to the team responsible for the LabVIEW examples to check through.
Martyn
Technical Support Manager

Waldi
Newbie
Posts: 0
Joined: Mon Nov 21, 2022 10:52 am

Re: PS2204a LabView trigger example doesn't work

Post by Waldi »

Hi, any response from the team? Triggering is important for me and I would like to continue with the project.

AndrewA
PICO STAFF
PICO STAFF
Posts: 356
Joined: Tue Oct 21, 2014 3:07 pm

Re: PS2204a LabView trigger example doesn't work

Post by AndrewA »

Hi,
I have updated the streaming example. Correcting the enum values for rising/falling triggers and also some other changes.
And today have done some more testing.
Yes do agree the falling trigger does seem to behave incorrectly.
Yes the trigger reports at sample 0 if the trigger level is below the signal, as you said a "below" trigger.
But does not trigger if you trigger set above the signal.
Also the trigger indicator in "Post capture information" cluster doesn't seem to work at all.

I tested the triggering PicoScope 7 with the scope in streaming mode it seems to work fine.
Also I tested our block LabVIEW block mode example the triggering works correctly for both rising and falling. (had to fix the control to allow negative values)

Another issue, "Channel A - Live" graph drops samples at the higher samples rates of 1-10us with one channel.
What sample rate are you using? Are you using our stream example?
I looked into this last week, I did rewrite the LabVIEW example to use new buffer code that I have been updating for the other API streaming examples. (I can send you copy of this code if you wish?)
But the issue seems to be related to the 2000wrap.dll as we tested MATLAB example that also uses the same wrapper dll, and had the same issue.
I not yet tested a streaming example that does not use the wrapper dll (python/C/C#), but expect this would not have these issues with dropping data and triggering.

The trigger issue in the streaming LabVIEW example could be caused by the wrapper dll
(Triggering values reported from GetFastStreamingDetails wrapper function.)
Also the "Post capture information" trigger values coming from the driver function -
ps2000_get_streaming_values_no_aggregation
don't seem work either.

Also as you noted - setChannelCount() function does not exist in the wrapper dll.
So this is mistake in the post - topic14301.html
Regards Andrew
Technical Specialist

Post Reply