Pico 2203 64 bit wrapper dll

Post your MATLAB discussions here
Post Reply
matlabpico
Newbie
Posts: 0
Joined: Tue Jul 23, 2013 11:11 am

Pico 2203 64 bit wrapper dll

Post by matlabpico »

Hi,

I have been trying to load the dll into matlab with the 'loadlibrary' command. When I use the 64 bit dll I get this error:

Code: Select all

 Warning: The data type 'FcnPtr' used by function ps2000_get_streaming_last_values does
not exist. 
> In loadlibrary at 403 
I saw in one of your MATLAB example posts that I should use the wrapper dll to fix this, I however get this error:

Code: Select all

 Error using loadlibrary (line 419)
There was an error loading the library "N:\...\PS2000wrap.dll"
N:\...\PS2000wrap.dll is not a valid Win32
application.



Caused by:
    Error using loaddefinedlibrary
    N:\...\PS2000wrap.dll is not a valid
    Win32 application. 
Which is the same as when I accidently used the 32bit dll. I therefore assume the wrapper is 32 bit and not compatible. Is there a 64bit wrapper dll available? Or is the only option to install and use a 32 bit version of MATLAB (I'm not sure if I can do this)? Or should I just not worry about the first 'FcnPtr' warning?

Hitesh

Re: Pico 2203 64 bit wrapper dll

Post by Hitesh »

Hi,

Please find below a 64-bit wrapper. We will be updating the SDK in the near future so it should also be available through there.
ps2000Wrap.zip
64-bit wrapper.
(3.75 KiB) Downloaded 616 times
Please note that it is untested.

You may need to install the latest 64-bit Microsoft Visual C++ Redistributable:

http://www.microsoft.com/en-gb/download ... x?id=30679

Please note that Pico Technology is not responsible for the content of external sites.

Regards,

matlabpico
Newbie
Posts: 0
Joined: Tue Jul 23, 2013 11:11 am

Re: Pico 2203 64 bit wrapper dll

Post by matlabpico »

Thanks for the wrapper. I actually switched to the 32bit matlab as I had to change machines. I am still getting exactly the same 'FcnPtr' error as before with the normal dll. When I try and load the wrapper supplied with the SDK I get the following:

Code: Select all

>> loadlibrary('PS2000wrap.dll','PS2000.h');
Warning: The function 'ps2000_open_unit' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_get_unit_info' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_flash_led' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_close_unit' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_channel' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_get_timebase' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_trigger' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_trigger2' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_run_block' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_run_streaming' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_run_streaming_ns' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_ready' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_stop' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_get_values' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_get_times_and_values' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_last_button_press' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_ets' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_led' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_open_unit_async' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_open_unit_progress' was not found in the library 
> In loadlibrary at 403 
Warning: The data type 'FcnPtr' used by function ps2000_get_streaming_last_values does
not exist. 
> In loadlibrary at 403 
Warning: The function 'ps2000_get_streaming_last_values' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_overview_buffer_status' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_get_streaming_values' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_get_streaming_values_no_aggregation' was not found in
the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_light' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_sig_gen_arbitrary' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000_set_sig_gen_built_in' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000SetAdvTriggerChannelProperties' was not found in the
library 
> In loadlibrary at 403 
Warning: The function 'ps2000SetAdvTriggerChannelConditions' was not found in the
library 
> In loadlibrary at 403 
Warning: The function 'ps2000SetAdvTriggerChannelDirections' was not found in the
library 
> In loadlibrary at 403 
Warning: The function 'ps2000SetPulseWidthQualifier' was not found in the library 
> In loadlibrary at 403 
Warning: The function 'ps2000SetAdvTriggerDelay' was not found in the library 
> In loadlibrary at 403 
Is there a seperate header file I should be using, or am I using the wrapper incorectly?

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

Re: Pico 2203 64 bit wrapper dll

Post by Martyn »

Should you be loading ps2000.dll which contains the open unit call and not ps2000wrap.dll ?
Martyn
Technical Support Manager

matlabpico
Newbie
Posts: 0
Joined: Tue Jul 23, 2013 11:11 am

Re: Pico 2203 64 bit wrapper dll

Post by matlabpico »

Yes thanks, I realised my mistake. I am now using the m files in the SDK as headers and loading both the normal and wrapper dll libraries.

I am now in the situation where I can successfully send the wrapper functions to the picoscope, but do not know what they do.

For my application I need to continuously stream data from the picoscope and process it in real time. I found repeatedly calling the block function had too long a delay. Is there some documentation on the wrapper functions? Or could you tell me the process to replicate the get_streaming_last_values function using the wrapper functions?

Thanks for your help

Hitesh

Re: Pico 2203 64 bit wrapper dll

Post by Hitesh »

Hi,

The sequence of steps you would need to take would be as follows:
  • Open the scope
  • Set up channels
  • Set up triggering
  • Call SetBuffer or SetAggregateBuffer from the wrapper to setup your data buffer
  • Call ps2000_run_streaming_ns
  • Loop
  • Call PollFastStreaming (and GetFastStreamingDetails if required) from the wrapper
  • End loop
  • Stop capturing data
  • Close the oscilloscope
Regards,

Post Reply