Author Topic: SCPI and Arduinos  (Read 3399 times)

0 Members and 1 Guest are viewing this topic.

Online WolfgangTopic starter

  • Super Contributor
  • ***
  • Posts: 1827
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
SCPI and Arduinos
« on: February 07, 2020, 06:25:36 pm »
Hi, Im am trying to integrate homebrew instrumentation into a SCPI-infested environment with
a lot of standard measurement equipment, like DMMs, PSUs, ARBs and other stuff.

https://electronicprojectsforfun.wordpress.com/homebrew-scpi-controllable-instruments-with-arduino-controllers/

My question:

is anyone doing something similar ? Any experiences with Arduino and USBTMC ?

regards
  Wolfgang

 

Online WolfgangTopic starter

  • Super Contributor
  • ***
  • Posts: 1827
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: SCPI and Arduinos
« Reply #1 on: February 07, 2020, 07:42:19 pm »
Hi,

I also started with this book, but on the client side they use an outdated library that does not work anymore under a modern windows.
The PIC software in the book is in assembler, which I tried to avoid, and the pics soon got to small regarding memory.

As a workaround, used the PC18F4550 using USB/HID with Mikroelektronika C, but it also stopped to work under Windows 10, so I gave up on
the PICs and tried Arduino. To my pleasure, NI VISA and Keysight immediately recognized my Arduinos as SCPI devices and everything went very smooth.
When I think of the HID stuff I had to program a Win32Api C library to get that going. No fun.

Anyway, thanks, if you know of a more modern USB stuff please let me know.

  Wolfgang DL1DWG


 

Online WolfgangTopic starter

  • Super Contributor
  • ***
  • Posts: 1827
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: SCPI and Arduinos
« Reply #2 on: February 07, 2020, 09:24:21 pm »
Just to get you right:

on the Windows PC you dont use VISA, but libusb, am I right ?
and inside the controlled instrument you have programmed a USBTMC device PIC18F4550, which just like any other Keysight or RIGOL DMM, PSU, ARB, ... ?

My problem was never to control instruments from the PC (I used SCPI(NI VISA) but to program something that behaves like an instrument.

PS: Are you Peter Dreisiebner, the author of all the screenshot utilities ?

Thanks, regards, 73
  Wolfgang DL1DWG
 

Offline jancumps

  • Supporter
  • ****
  • Posts: 1273
  • Country: be
  • New Low
 
The following users thanked this post: Wolfgang

Online WolfgangTopic starter

  • Super Contributor
  • ***
  • Posts: 1827
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: SCPI and Arduinos
« Reply #4 on: February 08, 2020, 11:36:10 am »
OK, thanks, then I will proceed with the Arduino route, with ASRL instead of USBTMC.

  Wolfgang DL1DWG
 

Offline prasimix

  • Supporter
  • ****
  • Posts: 2037
  • Country: hr
    • EEZ
Re: SCPI and Arduinos
« Reply #5 on: February 08, 2020, 04:24:23 pm »
EEZ H24005 power supply controlled by Arduino Due comes with comprehensive SCPI support. Forked Jan Breuer' SCPI parser is used as basis for SCPI command processing.

Offline jancumps

  • Supporter
  • ****
  • Posts: 1273
  • Country: be
  • New Low
Re: SCPI and Arduinos
« Reply #6 on: February 08, 2020, 04:36:27 pm »
EEZ H24005 power supply controlled by Arduino Due comes with comprehensive SCPI support. Forked Jan Breuer' SCPI parser is used as basis for SCPI command processing.

I'm using the Breuer library whenever I can. For an Arduino UNO, it's just slightly oversized. You need to start cutting/memory-optimising . in that case it's easier to use a somewhat lighter (and incompleter) lib.
Anything larger than the ATmega on the UNO can run the Breuer lib and instrument logic just fine...
 

Online WolfgangTopic starter

  • Super Contributor
  • ***
  • Posts: 1827
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: SCPI and Arduinos
« Reply #7 on: February 08, 2020, 04:44:49 pm »
... had a look at it as well. Its by the book, no doubt about that, but for the UNO class its an overkill, IMHO.
I wrote my own parser that just accepts unabbreviated and unambiguous commands with no frills whatsoever.
People that cant type or dont know what they really want are therefore out of my target auditory, I'm afraid.
Its (based on strtok) very lean on program (and RAM) space, but no beauty, thats clear.

Thanks !
  Wolfgang
 
The following users thanked this post: jancumps


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf