element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • 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
Test & Tools
  • Technologies
  • More
Test & Tools
Blog SCPI on a Linux Board - Letter of Intent
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Test & Tools requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 27 Apr 2018 5:41 PM Date Created
  • Views 663 views
  • Likes 14 likes
  • Comments 21 comments
  • pi
  • bbb
  • BeagleBone
  • raspberrypi
  • scpi
Related
Recommended

SCPI on a Linux Board - Letter of Intent

Jan Cumps
Jan Cumps
27 Apr 2018

I'm trying to build a SCPI shell for Linux.

I'd like to have it working over TCP/IP on a Raspberry Pi and a BeagleBone.

 

tl;dr It works. The rest of the blog series explains how to build a lab automation device that controls 8 outputs (2 of them relays), and read 8 inputs. With a Raspberry Pi and a PiFace Digital (2).

 

 

Here on element14, we've been playing with SCPI and microcontrollers. We have several instruments working on MSP432, Arduino and Hercules devices.

This time I'd like to get a Linux instrument up. To get some device independence, I'll try to make the source work on two different boards with different distros.

The program is expected to run as a background process.

 

I have a head start. My favourite SCPI library has a LwIP SCPI server example.

A relative head start, that is, because I have to find out how to get all the dependencies - I want to develop on a Windows PC .

If this project fails, it'll be because of my develop for Linux skills.

 

related blog
SCPI on a Linux Board - Letter of Intent

SCPI on a Linux Board - Part 1: Proof of Concept

SCPI on a Linux Board - Part 2a: PiFace Digital C programming

SCPI on a Linux Board - Part 2b: PiFace Digital C++ programming
SCPI on a Linux Board - Part 3: TCP/IP Socket C++ programming
SCPI on a Linux Board - Part 4: TCP/IP SCPI and Instrument Service
SCPI on a Linux Board - Part 4b: TCP/IP SCPI and Instrument Service 100% Working
SCPI on a Linux Board - Part 4c: TCP/IP SCPI and Instrument Service - Run as a Daemon
SCPI on a Linux Board - Part 5a: LabVIEW Driver for LAB Switch: Open, Close and Switch functions
Anonymous

Top Comments

  • Jan Cumps
    Jan Cumps over 4 years ago in reply to Jan Cumps +4

    Yay!

     

     

     

     

    It works. Above is the capture of a LabVIEW back and forth communication - with the Raspberry Pi as a VISA TCP/IP device.

    *IDN? command sent, and the reply from the Pi arrived at LabVIEW.

  • DAB
    DAB over 4 years ago +3

    Good luck Jan.

     

    DAB

  • Jan Cumps
    Jan Cumps over 4 years ago in reply to Jan Cumps +3

    what's not working ok:

     

    • even though I get a reply, the Visa Read block in LabVIEW throws a timeout error.
    • when I close a connection (regardless of telnet, LabVIEW), the service on the Raspberry Pi goes…
  • Jan Cumps
    Jan Cumps over 2 years ago in reply to Jan Cumps

    I'm now doing a long-run measurement,

    with PSU stepping from 3 to 10 V

    with DAC1 then stepping between 200 and 1100, step size 1

     

    Then measure the current at each step, and also the values of the ADC 1 that measures the current.

    I hope that this time it translates to something more linear than before the current sense circuit was sanitised ...

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • akshitagupta15june
    akshitagupta15june over 2 years ago

    Have a look at my entry and please like and share #badass Woman Project Entry - Akshita Gupta

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 2 years ago

    This was an electronics-light project. Just plug a PiFace Digital on a Pi.

    The result is quite useful in the lab though.

    Here's an action photo of the project, where it switches a DMM between an OpAmp's input and output, time after time.

    To measure the gain and dc offset 2000 times, under different conditions.

     

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 4 years ago

    I've documented the first working version: SCPI on a Linux Board - Part 1: Proof of Concept

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 4 years ago in reply to Jan Cumps

    I had a read on the timeout. It happens when the expected numbers of characters haven't arrived after the given timeout.

    Because TCP/IP in VISA doesn't support querying the number of characters waiting to be read (I've tried and I get Not Supported by this instrument), I have made this decision:

    After reading from the TCP/IP pipe, throw away that particular timeout error, because it is expected. Comment f you would do this differently.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
>
Element14

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 © 2022 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube