PS4000 Series - Callback Function Pointer for MATLAB&LABVIEW

Post your MATLAB discussions here
LasseHarbo

Re: PS4000 Series - Callback Function Pointer for MATLAB&LAB

Post by LasseHarbo »

Hi

I have tried for some time now to find a description of the functions available in the ps5000wrap.dll. I hope there exist a document like the ps5000.en.pdf for the ps5000.dll describing the API function calls.

Regards
Lasse Harbo

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: PS4000 Series - Callback Function Pointer for MATLAB&LAB

Post by Chris »

Hi Lasse

We do not currently have any documentation for the psX000wrap.dll's, but the source code is provided in the SDK.

If you have any specific questions, please ask.


-Chris.

LasseHarbo

Re: PS4000 Series - Callback Function Pointer for MATLAB&LAB

Post by LasseHarbo »

Hi

I am specially interested in the return codes. I am currently working with a ps5204 scope and try to get it working in streaming og blok mode using LabVIEW. Hence I have looked at the examples and can see that the "IsReady" function from the wrapper is used. It is done with in a while-loop, where "IsReady" is waiting for a return greater than 0. But in the ps5000.dll the 0-return is "Pico_ok". Why is the scope sending "pico_ok" while waiting for data? Besides when only looking for greater then 0, might one not get e.g. code 18 "PICO_DATA_NOT_AVAILABLE" and then have the program proceed with "old" bufferdata?

Hence I would like make the function wait for a more specific return, like "Data_ready" or something similar.

I have a slightly differing question as well, but I risk asking it here.
When working with triggers I have the problem, that when the trigger is set to rising edge, it sometimes fires on a slow falling edge due the fluctuations/small variations where one bit goes up. Is i possible to chance the sencitivity and how is it done?
I am looking at the hysteresis under the SetTriggerChannelProperties, but no matter the settings I can't se any changes.
I am now testing the trigger on a 5Hz sine, 7V peak to peak in the +/- 5V range. Hence I though 10-300 bit migth be the range for the hysteresis.

Regards

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: PS4000 Series - Callback Function Pointer for MATLAB&LAB

Post by Chris »

Hi Lasse

The ps5000wrap.c code is provided in the sdk, which might help to show how the functions are implemented.

The IsReady function returns the state of the _ready flag, which is set to 1 when the StreamingCallBack function is called to indicate that data is available to be downloaded.

It does not relate to the status codes that get returned from function calls.


To avoid false triggers, you will need to use advanced triggers, and set a hysteresis, so that the trigger will not re-arm until the signal has dropped below a level that you set to be below the noise level you are experiencing.

Post Reply