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: Switch Control

In the previous post I reviewed the Initialization block. This post is about the key block of the library. We control relays via LabVIEW.

 

Switch Control

This is the key block in the library. it controls the relays.

You'll use this to turn the relays on and off.

Additional to the standard VISA and Error in/outs, this block accepts two parameters:

  • Channel (1|2): the relay that will be controlled by this block
  • Enable (true|false): switch the relay on or off

These parameters speak for themselves.

Let's look at the flow:

 

 

The flow takes the input parameters Channel and Enable. It then creates a SCPI command that's sent to the Arduino.

There's one case block in this flow, that defines the parameter for ON or OFF:

The result is a SCPI string like

:DIGITAL:SWITCH1: ON

 

Here's an example on how to use this 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