1. Which products do you provide examples for?
We provide LabVIEW examples for all our current Oscilloscopes and Data Loggers. These are available in the Software Development Kit available to download from
2. Which versions of LabVIEW do you support?
We provide examples saved for LabVIEW 8.5 which should be compatible with later versions.
LabVIEW 9.0 will be required for newer oscilloscope examples that contain a PicoScopeXXXXExampleRapidBlockBulk example as a result of the use of Data Value References.
Our topic29591.html">GitHub repository groups examples according to driver and whether they are 32-bit or 64-bit examples. All drivers listed there have 32-bit examples and some 64-bit examples have been added (see also point 9).
3. What files do I need?
For all devices:
- The dynamic link library (dll) files installed by the PicoSDK (32- or 64-bit), including the psXXXXWrap.dll files for PicoScope streaming data collection examples
The picoipp.dll file will also be required for oscilloscopes (with the exception of the PicoScope models using the ps2000 and ps3000 drivers).
On 64-bit operating systems you can install both the 32- and 64-bit versions of the SDK using the installers. Both will create entries for the location of the driver files in the Windows PATH Environment Variable, avoiding the need to copy dll files elsewhere unless it is necessary.
- The PicoScopeXXXX.llb library file which contains reusable components
- The example vi file that you wish to use
- Example vi file
There may be some information contained in the sub-vi’s or the example vi files. Please also consult the Programmer’s Guide for your product as this contains information on the API function calls and the sequence of how to call them to collect data.
5. Can I control multiple devices?
Yes you can – simply duplicate the library function calls and sub-vi calls but use the handle parameter output from the open unit call for the additional device.
It is also possible to control products from different ranges from a single vi by adding the relevant function call blocks and sub-vi’s from the respective Software Development Kits to your vi file.
6. How do I call a function that isn’t available in the llb/vi file?
A ‘Call Library Function Node’ block can be placed in the block diagram.
- Right-click in an empty area and select Connectivity -> Libraries & Executables -> Call Library Function Node
- Next double-click the ‘Call Library Function Node’, then browse and select the required dll (in this case the ps3000a.dll for a PicoScope 3000A/B/MSO device) and set the properties as shown below:
NOTE: When selecting the dll you can specify it by name (if the SDK has been installed) or by providing the full path to the dll's location as required.
- The SDK installation sub-directory e.g. C:\Program Files (x86)\Pico Technology\SDK\lib
- The same directory as the vi files
- The resource directory in your LabVIEW installation
e.g. C:\Program Files (x86)\National Instruments\LabVIEW 2013\resource
- Click on the Parameters tab, and add the information for each of the parameters defined in the Programmer’s Guide (see point 7 regarding data types). Note how the Function prototype changes as parameters are added and changed.
- Once this is complete, click ‘OK’; the library block should appear ready for connecting up as shown below:
The data types specified in the Programmer’s Guide are for the C Programming Language. Examples of data types include:
C data type => LabVIEW equivalent
- float => 4-byte single
- short => Signed 16-bit integer
- unsigned Long => Unsigned 32-bit integer
The data values are returned in ADC Counts from the driver. Using the maximum ADC Count value for the device (refer to the Programmer’s Guide), use the following formula:
Code: Select all
milliVolts = (adc count/ max. adc count) * voltage range
These values can then be passed through to a chart or waveform display.
The maximum ADC Count value is usually defined in the Programmer’s Guide or also in the C header file in the SDK.
9. How do I run the examples in 64-bit versions of LabVIEW?
Ensure that you are using the 64-bit SDK installed in order to have the correct version of the dll (and wrapper dll for Oscilloscope Streaming) and that the dlls are loaded in for each function call.
Ensure data types are correct:
- Unsigned 32-bit Integer for PICO STATUS values.
- Signed 64-bit Integers for pointers to callback functions and void pointers (e.g. for the call to ps3000aRunBlock).
Note: Pointers to callback functions and void pointers will be found in some of the PicoScope driver API functions.
Examples will be updated in due course to include llb and vi files for 64-bit versions of LabVIEW.
10. How do I handle status code messages?
The driver functions will return status codes (please also refer to this topic26031.html post), some of which indicate an error and some which indicate that a further action is required (e.g. indicating whether USB power or a USB 2.0 connection is being used). Our LabVIEW examples prefix the number with a 5 in a sub-vi so the status code 282 (PICO_POWER_SUPPLY_NOT_CONNECTED) would be shown as 5282. The exception is the status code 0 which is PICO_OK and therefore should not cause an error message to be displayed.
In the above case, check the example to see if the appropriate button has been enabled in order to tell the driver to use USB power or that the device is on a USB 2.0 connection (this will be for USB 3.0 devices).
In other cases, it is worth checking the parameter values being passed to the driver function call and that where appropriate, a button to indicate that a 4-channel device is connected is enabled.
I hope this helps