Test and Measurement Forum

PS4000 Series - Callback Function Pointer for MATLAB&LABVIEW

Post your MATLAB discussions here

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

Postby LasseHarbo » Tue Jan 04, 2011 12:34 pm

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
LasseHarbo
 

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

Postby Chris » Thu Jan 06, 2011 10:38 am

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.
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

Postby LasseHarbo » Wed Jan 12, 2011 12:21 pm

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
LasseHarbo
 

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

Postby Chris » Mon Jan 17, 2011 1:22 pm

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.
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Previous

Return to MATLAB

Who is online

Users browsing this forum: No registered users and 0 guests