Test and Measurement Forum

Issues with the updated PicoScope 5244B SDK

Post your C and C++ discussions here

Issues with the updated PicoScope 5244B SDK

Postby jaray » Mon Nov 16, 2015 3:47 pm

I've been successfully using my PicoScope 5244B with my C++ software for several months now. I've been having issues with the device not triggering properly recently, so I wanted to see if updating the libraries helped. I've been using the windows 32bit drivers dated 1/13/15. I've been using the static library in my software but also including PS5000a.dll and PicoIpp.dll in my lib folder but not referencing them.

The issue is that after changing the libraries, my software crashes immediately with the message "DLL entry point not found." I removed both PS5000a.dll and PicoIpp.dll from my build and everything works fine. The issue seems to come from PicoIpp.dll. I honestly don't know what this dll is even used for or even if it is needed since everything seems to work fine without it.

My question is, what is PicoIpp.dll and if it is needed in order to use PS5000a.lib (which it seems it doesn't) what steps do I need to go through to fixing this.
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby Hitesh » Wed Nov 18, 2015 2:24 pm

Hi jaray,

The PicoIpp.dll is used for data processing purposes and is required by the ps5000a.dll (other PicoScope libraries also hae a dependency on this).

It sounds like you have a mismatch between versions of the dlls. I would suggest downloading and installing the latest 32-bit or 64-bit SDK from our Downloads page, or alternatively use the dlls from the latest PicoScope 6 release.

Hope this helps.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 1997
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Issues with the updated PicoScope 5244B SDK

Postby jaray » Thu Nov 19, 2015 3:11 pm

I think that may be the issue. On my release computer I use for testing, I do not have PicoScope 6 installed, so it is requiring I have both of those dlls. However on my development computer I do have PicoScope 6 installed. This computer is 64bit but I am developing targeting 32bit. I am surprised that the driver is trying to use the driver installed by PicoScope 6 instead of the one in the root directory of my project. That is all I can come up with.
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby jaray » Thu Nov 19, 2015 3:14 pm

I should note that I also fixed my triggering issue. It was not related to the SDK. Instead I was triggering on the EXT input but was calculating my ADC values using the current ADC Voltage level Channel A instead of a set Voltage level.
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby Hitesh » Fri Nov 20, 2015 9:56 am

Hi jaray,

Are the dlls in the same directory as your exe when you refer to the root directory?

If not, then the PicoScope 6 installation directory is likely to be found first in your search path.

For the external trigger, there is a fixed maximum count value to scale against. On the channels this will change depending on whether you are using 8-bit or greater resolution - in those cases use the ps5000aMaximumValue function to determine the maximum ADC count value.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 1997
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Issues with the updated PicoScope 5244B SDK

Postby jaray » Mon Nov 30, 2015 3:01 pm

Hitesh wrote:Hi jaray,

Are the dlls in the same directory as your exe when you refer to the root directory?

If not, then the PicoScope 6 installation directory is likely to be found first in your search path.

For the external trigger, there is a fixed maximum count value to scale against. On the channels this will change depending on whether you are using 8-bit or greater resolution - in those cases use the ps5000aMaximumValue function to determine the maximum ADC count value.

Regards,


That may be part of the issue. In my development area I've had the dll's one subdirectory down in a lib folder. In my release package the dlls are in the same directory as the exes. I'll play around with it this morning and see what I can make happen. Everything is working as it currently stands, but I would like to know exactly what was going on. Searching the path variable seems like a likely candidate.
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby jaray » Mon Nov 30, 2015 3:57 pm

So I decided to play around with how I am including the libraries in my software. I once again downloaded the most up to date 5244B SDK. I didn't want to depend on the path variable, so I removed the portion pointing to the SDK directory. In the root of my development directory I have a lib folder where I am including the PicoScope dlls. First I included all the ones that I believe to need, picoipp.dll PS5000a.dll and ps5000a.lib. Everything worked as intended.

Next I removed all the files to make sure the dependencies were accounted for. Sure enough my code wouldn't compile.

Next I included just ps5000a.lib since I am accessing it statically. With only including this file everything seems to work fine on this machine. However, I do still need the other files on a release machine.

Any ideas why everything is working right now even though I am just including ps5000a.lib and am NOT pointing to the SDK directory in my Path variable?
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby Hitesh » Tue Dec 01, 2015 10:29 am

Hi jaray,

If you have PicoScope 6 (including the Beta) version installed on the PC then it's location will be in the PATH environment variable and hence the dlls from the install directory will be picked up.

If that is not the case, are there are any other locations in the PATH environment variable that contain the dll files?

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 1997
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Issues with the updated PicoScope 5244B SDK

Postby jaray » Tue Dec 01, 2015 5:27 pm

Hitesh wrote:Hi jaray,

If you have PicoScope 6 (including the Beta) version installed on the PC then it's location will be in the PATH environment variable and hence the dlls from the install directory will be picked up.

If that is not the case, are there are any other locations in the PATH environment variable that contain the dll files?

Regards,


I've deleted the entire string, but I pasted my entire PATH variable here and went through it line by line. There is no reference to Picoscope.
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby Hitesh » Thu Dec 03, 2015 12:43 pm

Hi jaray,

Just to clarify, are you referring only to the compiling part or compiling and execution of the code?

If you have the ps5000a.lib, then the code should compile without the need for the ps5000a.dll and picoipp.dll files to be added the project.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 1997
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Issues with the updated PicoScope 5244B SDK

Postby jaray » Fri Dec 04, 2015 3:14 pm

Ah ha! I had suspected as much. Yes am I statically accessing the library in my code, so I am using ps5000a.lib.

This brings up another point then, if I am using the library statically, then the library should be bundled in the compiled exe (unless I am mistaken here). If that is the case then the resulting exe should not depend on having ps5000a.dll and picoipp.dll in the same directory as the release exe.
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby hexamer » Sat Dec 05, 2015 3:11 am

jaray wrote:Ah ha! I had suspected as much. Yes am I statically accessing the library in my code, so I am using ps5000a.lib.

This brings up another point then, if I am using the library statically, then the library should be bundled in the compiled exe (unless I am mistaken here). If that is the case then the resulting exe should not depend on having ps5000a.dll and picoipp.dll in the same directory as the release exe.


You're not really using the library statically. The SDK libraries are provided as dynamic libs. The ps5000a.lib file you link with is only an import library - it does not contain the code. An import library only helps your application know how to access the DLL.

Assuming you're developing a native app (not C++.Net), you don't need to include/reference the DLL in your build, as Hitesh mentioned.

If you want to know where your application is finding its DLLs, the Dependency Walker application is really helpful (http://www.dependencywalker.com/). Window's rules for search order are pretty complicated and depend on what version of Windows you're using.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Issues with the updated PicoScope 5244B SDK

Postby Hitesh » Tue Dec 08, 2015 10:05 am

Hi jaray,

Just to add to hexamer's advice, you should find that if the dlls are placed in the same directory as the executable, they should be picked up, otherwise Windows will look at the locations in the PATH environment variable.

You can use the ps5000aGetUnitInfo() function to also confirm the version number of the driver being used.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 1997
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Issues with the updated PicoScope 5244B SDK

Postby jaray » Wed Dec 09, 2015 6:58 pm

hexamer wrote:
jaray wrote:Ah ha! I had suspected as much. Yes am I statically accessing the library in my code, so I am using ps5000a.lib.

This brings up another point then, if I am using the library statically, then the library should be bundled in the compiled exe (unless I am mistaken here). If that is the case then the resulting exe should not depend on having ps5000a.dll and picoipp.dll in the same directory as the release exe.


You're not really using the library statically. The SDK libraries are provided as dynamic libs. The ps5000a.lib file you link with is only an import library - it does not contain the code. An import library only helps your application know how to access the DLL.

Assuming you're developing a native app (not C++.Net), you don't need to include/reference the DLL in your build, as Hitesh mentioned.

If you want to know where your application is finding its DLLs, the Dependency Walker application is really helpful (http://www.dependencywalker.com/). Window's rules for search order are pretty complicated and depend on what version of Windows you're using.


I am in fact developing a native app. I've never heard of an import library (though I have not been developing software like this for very long) but that makes a lot of sense. I've used dependency walker before to determine which dlls my qt app would require for its non-static build. I never thought to look at the PicoScope dependencies using it, good advice.
jaray
Newbie
 
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests