element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
NI LabVIEW Community
  • Products
  • Dev Tools
  • NI LabVIEW Community
  • More
  • Cancel
NI LabVIEW Community
LabVIEW Challenge Blogs Setting up the Raspberry Pi Pico & accessing with Labview
  • Blog
  • LabVIEW Challenge Blogs
  • Forum
  • Documents
  • Quiz
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
NI LabVIEW Community requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: cbohra00627
  • Date Created: 25 Oct 2023 7:49 PM Date Created
  • Views 1586 views
  • Likes 9 likes
  • Comments 4 comments
  • labview 2023
  • pico and labview
  • pico
  • LAbVIEW challenge
  • labview
  • scpi
Related
Recommended

Setting up the Raspberry Pi Pico & accessing with Labview

cbohra00627
cbohra00627
25 Oct 2023

Introduction:

I have been trying to setup the pi pico with Labview for the past few days. Earlier, I was facing many problems and was totally confused after going through multiple online guides but slowly things started to fall into the picture and soon I realized it was actually pretty easy. So, I decided to write a blog on the process. Here I will be going through the steps to setup pico with Labview on Windows.

Installing the Software:

Installing Pi Pico SDK:

The detailed guide is here: getting-started-with-pico section 9.2

First of all we will need the Pi pico-sdk which can be found at pico-setup-windows git repo. Go the latest release and download the .exe file. Run this executable. This will install the following softwares:

  • Arm GNU Toolchain
  • CMake
  • Ninja
  • Python 3.9
  • Git
  • VSCode
  • OpenOCD

After the installation completes, tick the "Clone and build examples" checkbox. This will clone some examples to run with pico.

image

After the installation completes successfully, we can try running some example code on the pico.

A "Pico - Visual Studio Code" shortcut will be created in the start menu. Open it.

Pico - Visual Studio Code

Open the pico-examples folder that we cloned.

In the VSCode window, at the bottom, change the active kit to Pico ARM GCC.

image

We will build the "blink" project. Click on the "CMake" button on the sidebar and go to the blink.elf file then click on build.

image

If the build is successful, it will print the below message:
image

In the build directory, a .uf2 file will get generated. Now, press the bootsel button on the pico and connect it to the laptop via a USB cable then release the button. Now drag and drop the .uf2 file onto the Mass Storage Device.

image

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

So, we have successfully loaded "blink" code on the pico using the pico-sdk and VSCode.

Now, we will follow similar steps to install the SCPI Labtool firmware on the Pico.

Installing SCPI Labtool on Pico:

In this section, we will create a .uf2 firmware of the SCPI Labtool and load it onto the Pico. Alternatively, the firmware can be downloaded from this link and this section can be skipped.

Go to the pico_scpi_usbtmc_labtool git repo and clone it using the below command. I was facing some issue in Windows CMD with --recurse-submodules option but after running in Git CMD, I was able to clone the submodules also.

git clone https://github.com/jancumps/pico_scpi_usbtmc_labtool.git --recurse-submodules

Now clone the SCPI Library.

Add the below variables to the environment. The paths can be different in your case.

image

Now open Pico - VSCode and open the pico_scpi_usbtmc_labtool folder. Select the active kit and click on build.

image

After the build completes successfully, a pico_scpi_usbtmc_labtool.uf2 file will be generated inside the build folder.

Now plug in the pico & upload this firmware.

PICO_SCPI_LABTOOL_LABVIEW_DRIVER:

We will clone one more github repo: pico_scpi_labtool_labview_driver. This repo has the labview drivers and some example VIs which we will use later.

Accessing Pico from Labview:

Download and install the VISA Interactive Control Application from this link.

With Pico plugged in and firmware installed, open NI Max (Installed with Labview). You can give a meaningful name to your device and click on save.

image

Running an example VI:

Now, go to the pico_scpi_labtool_labview_driver folder. Inside scpi_driver, open Example_analog_read.vi. Now, select the name of your device in the "VISA resource name" field.

image

Run it. You will see that it is reading some values on the front panel.

Connecting a sensor:

According to this page. The pin number 0 corresponds to the GP26 pin of the pico. So, I connected a photo interrupt sensor to this pin and checked the values read on the front panel. The connections are as follows:

Sensor VCC - Pico 3V3

Sensor GND - Pico GND

Sensor OUT - Pico GP26

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Useful Links:

  • getting_started_with_pico section 9.2
  • scpi_parser
  • pico_scpi_usbtmc_labtool
  • SCPI command and Labview Driver reference
  • pico_scpi_labtool_labview_driver

EDIT - In release 7 of pico_scpi_usbtmc_labtool, there is no need to clone the scpi_parser library separately and setting the SCPI_LIB_PATH.

  • Sign in to reply
Parents
  • MarAgoto
    MarAgoto over 1 year ago

    Great. Thank you!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • MarAgoto
    MarAgoto over 1 year ago

    Great. Thank you!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube