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.
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:
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:
|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|