LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Critique my loop to send a text file, line by line or en masse?

I listen, but I don't understand Smiley Embarassed

0 Kudos
Message 11 of 16
(837 Views)

I should probably clarify my purpose for writing these VIs to begin with. We make The World's Finest (tm) electronic test systems for CCDs and IR FPAs (e.g. image sensing devices). All the hardware is of our own design, so there are no off-the-shelf VIs for them. We have developing our own software internally for 30+ years in C/C++, but we have a lot of customers asking if are "compatible with LabVIEW."

 

Of course we are. Everything is compatible (or can be made compatible). The good news is that the basic control of our instrumentation is via human-readable text commands, passed into and out of 3 separate DLLs, and the output of our instrumentation is a binary data file.

 

But they want examples. And we are committed by contract with one such customer to provide some rudimentary LabVIEW VIs to demonstrate basic functionality (which functionality is really up to me, since it isn't spelled out in the contract). 

 

So I intend to offer up the following:

  1. Examples of the lowest-level primitives, e.g. VIs to send and receive strings from each of the 3 DLLs.
  2. Example of how to read and graph our binary data file.
  3. A real-world example with scripts to set up our hardware, acquire an image in a closed-loop test, and graph the image.
    1. I have text scripts to set up each of the 3 DLLs, so the VI that is the subject of this thread is just a way to send that script to one of the DLLs.
    2. The customer might use this as-is, but will likely write their own VIs to suit their application needs.

So that's a long way of saying that this VI doesn't need to be perfect, but I also don't want it to be embarrassingly amateur. We will also upload these to our website for all users, of widely-varying LV expertise, to use as tools to learn our hardware. That's why the debugging ability (send/pause/step) is so important.

 

But I also need the VIs to be architecturally simple, even at the expense of elegance, so that newbie LV users (like me :D) can understand and adapt them. 

 

Anyway, that's a long way of saying, thanks!

0 Kudos
Message 12 of 16
(825 Views)

TheWaterbug wrote:

But I also need the VIs to be architecturally simple, even at the expense of elegance, so that newbie LV users (like me :D) can understand and adapt them.


Then my first recommendation is to make wrapper VIs for all of your function calls.  These should be complete with documentation (at least context help), meaningful control labels, meaningful icon, and free labels describing what is happening.  Then you can make your simple examples using those wrapper VIs.  This will look a lot more professional and guide to understanding.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 13 of 16
(815 Views)

Thanks!

0 Kudos
Message 14 of 16
(808 Views)

You can switch the While loop for an autoindexed For loop (with conditional terminal if you want a Cancel button) and get rid of the Index array. Also, the Pause wont work in either as you'll quickly add up the counter to index outside. It'd be easier to just place a one button dialog "Paused" that actually pauses execution until you press OK. That way the counter fits the row index.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 15 of 16
(801 Views)

You could also follow this tutorial to make LabVIEW Plug and Play drivers.  You can go here to look at examples to help you out.  I think having drivers that follow the LabVIEW Plug and Play standard would be very professional.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 16 of 16
(796 Views)