Hi,
I am a C beginner writing code for the PLCM3 based upon your sample code in the SDK.
I am confused by the line g_status = PLCM3OpenUnit(&g_handle, NULL);
My understanding is the function should only return 0 if it completes successfully.
In fact it appears to return 0 even if the CM3 is no longer physically connected (USB unplugged)
What am I misunderstanding please?
Thank you
Which version of the plcm3.dll is your application using?
You can find this by right-clicking on the dll, selecting Properties and then selecting the Details tab. Alternatively, please call the PLCM3GetUnitInfo function with the info argument set to PICO_DRIVER_VERSION (you can set the handle value to something like 16384.
Hi Hitesh,
plcm3.dll (32bit) version 1.0.4.9
Thank you for your alternate suggestion. I am in fact already using PLCM3GetUnitInfo USB_version to check for the hardware presence as I have discovered that returns 0 correctly. I just thought PLCM3OpenUnit would be a logical place to check.
Martin
That does appear to be a little bit out of date. There are two options for obtaining a more recent driver:
1. Download and install PicoLog 5.25.3 (you will need to be using Windows 7 or later) from our Downloads page and use the driver from the installation directory (copy it to the SDK installation directory).
Hi Hitesh,
Yes, that works. Updating the dll to 1.0.6.2 solves the PLCM3OpenUnit problem.
So for your reference, the SDK is shipping with an outdated 32 bit plcm3.dll
thank you again,
Martin