LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the Instrument Handle Local Read wired directly to the Local Write in IviDmm READ.vi?

Why is the "True" case implemented with a Read Local wired directly to a Write Local? Could this also be done by pulling the control and indicator references for the instrument handle outside of the "False" case altogether and then wiring them accordingly? Is this for performance or just style?
0 Kudos
Message 1 of 3
(2,490 Views)
They could certainly be wired differently and without a local variable. There's almost certainly no noticeable difference in performance. I'm not sure whether these VIs were created by someone or whether that's the way the Import CVI Instrument Driver does it's job. All IVI drivers start as CVI code. Of course, some programmer had to write the program that converts CVI to LabVIEW and maybe that person could answer why it was done that may.
0 Kudos
Message 2 of 3
(2,490 Views)
As Dennis points out, these VIs were initially created with the Import CVI Instrument Driver utility. This utility programmatically scripts the building of VIs from inside LabVIEW's C code (which is not an easy thing to do). We script the VIs the way you describe to make the scripting easier and more robust.

In particular, it's easier to script things if they're all in the same diagram, rather than have to programmatically wire things together that are split among both case frames as well as outside the case structure.

The code could have been prettier, but since there's essentially no performance impact, we didn't bother.

I hope this helps explain it.

Brian
0 Kudos
Message 3 of 3
(2,490 Views)