In this post I try out the SCPI library.
I'm using a SCPI lib that's written for Arduino: Open Instrument Control.
You can download the GIT archive as a zip.
To install it in the Arduino environment, first check in the Arduino gui where your sketchbook folder is (Via File -> Preferences).
Extract the GIT archive in a temporary location. Copy the src/ArduinoSCPIParser folder to the sketchbook/libraries subfolder
On my PC: D:\users\jancu\Documents\Arduino\libraries\ArduinoSCPIParser.
You'll have to comment out one line in the scpiparser.cpp source, or you get compilation errors:
// #include <WProgram.h>
This is because the SCPI library we're using isn't adapted to the recent Arduino software versions.
There are two examples in the SCPI lib. We're using Meter.ino.
Open the example in the Arduino GUI (File -> Open, then navigate to the place where you extracted the GIT archive and open src/Examples/Meter/Meter.ino).
Connect your UNO, select Tools -> Board -> Arduino/Genuino UNO.
Select Tools -> Port -> <the COM port of your Arduino>.
Select Sketch -> Upload.
Your Arduino is now programmed with the Meter example and the SCPI lib.
To test the basic setup, open the serial monitor:
Tools -> Serial Monitor
Enter the SCPI command *IDN? and press Send.
The monitor should log the result: OIC,Embedded SCPI Example,1,10.
|Arduino in Test Instrumentation - Intro: SCPI Programmable Switch|
|Arduino in Test Instrumentation - Part 1: SCPI Lib|
|Arduino in Test Instrumentation - Part 2: Firmware|
|Arduino in Test Instrumentation - Part 3a: LabVIEW Driver Intitialisation Block|
|Arduino in Test Instrumentation - Part 3b: LabVIEW Driver Switch Control Block|
|Arduino in Test Instrumentation - Part 3c: LabVIEW Driver Read Status Block|
|Arduino in Test Instrumentation - Outro: LabVIEW Example|