Open Arduino

Enter Your Project for a chance to win a grand prize for the most innovative use of Arduino or a $200 shopping cart! The Birthday Special: Arduino Projects for Arduino Day!

Back to The Project14 homepage

Project14 Home
Monthly Themes
Monthly Theme Poll


Arduino in Test Instrumentation


To celebrate Project 14's birthday, I'm going to make a programmable switch with an Arduino UNO.

This post describes the second block for the LabVIEW driver: Read Status.

In the previous posts I reviewed the Inialize and Switch Control blocks. This post does not alter the behaviour or cause an action. We read back the status of the relays via LabVIEW.


Read Status

This is a data block. You ask the Arduino what the status is of a particular relay.

This block accepts two parameters and returns one value:

  • Channel (1|2): the relay that will be controlled by this block
  • Read Delay (ms): how long do we wait for the Arduino to answer.
  • Enabled (true|false): status of the particular relay.

The flow is comparable to the previous one, except that we use a different SCPI command and that we add a data read block.

The left part prepares the SCPI command. Once it's constructed, it will be like this: :DIGITAL:SWITCH1?.

The middle block is a configurable wait. This should be set to allow the Arduino to verify the status and send the reply back.

The right side of the flow reads the status from the Arduino. Only when the reply is ON\n, we report TRUE. Else the block returns FALSE.


Here's an example that shows how to use the block:



Related Blog
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