LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Parameter Array

Solved!
Go to solution

All,

 

I have finally finished a VI which accepts 4 Strings, 1 Bool, and 3 Floats, and calls a STORED PROCEDURE ala MS-SQL 2005 database, with the same interface (the SPROC also accepts the same inputs).

 

The goal is just to store the values as a record in a table.

 

I was finally able to get this all to work, but when I save the VI, and re-open it, I lose all the parameters in my initial parameter array which is a required input to the "DB Tools Create Parameterized Query" except the 0th parameter.

 

I'm not sure how to get these to persist...  I can go to the front panel and add them in during design time, and they stay there and work perfectly during run-time, but if I close the VI (and save) and re-open it, I lose them.

 

Thanks!

Dave Sell 

 

0 Kudos
Message 1 of 13
(3,768 Views)
Solution
Accepted by dave_helmut
Go to the edit menu and select "Make Current Values Default". Save the VI. And before you save the VI, get rid of that sequence structure. It does nothing except make the program harder to read. Dataflow is controlling execution order.
Message 2 of 13
(3,765 Views)

Dennis,

 

Thanks, that certainly did the trick!

 

I liked the logical grouping for aesthetic purposes, and ease of viewing/reading the code.

 

After reading your advice, I agreed it did look mighty cluttered, so I removed most of them but left some.

 

What do you think of it now?  Is it still painful to look at?

 

Thanks!

Dave 

0 Kudos
Message 3 of 13
(3,755 Views)

Yes, it still looks cluttered and frankly, amateurish. One of the things you will find out if you hang around here long enough (or hang around experienced LabVIEW programmers), is that sequence structures have a very poor reputation. You might alsow want to try the Diagram Cleanup tool to make everyything nice and neat. The VIs and wires not being aligned is bad style.

 

p.s. Instead of using a front panel control, you could have just right clicked on it and selected, 'Change to Constant'. Then you would not have had to go through the Set Current Values to Default step.

Message 4 of 13
(3,753 Views)

Thanks for the great feedback - this is to be delivered to a customer so I do need it to not look amateurish! 

 

I removed the flat sequence and did the auto-cleanup as  suggested.

 

Thanks again,

 

Dave 

0 Kudos
Message 5 of 13
(3,733 Views)
  • A lot of people share the opinion that showing terminal as icons (as you are doing, and as LabVIEW unfortunately has as a default) makes for more clutter.
  • Gigantic Error In/Error Put is odd, and overlaps (obviously).

 

 

Message Edited by Broken Arrow on 10-07-2009 03:01 PM
Richard






0 Kudos
Message 6 of 13
(3,728 Views)

Broken Arrow wrote:
  • A lot of people share the opinion that showing terminal as icons (as you are doing, and as LabVIEW unfortunately has as a default) makes for more clutter.

 

 

Message Edited by Broken Arrow on 10-07-2009 03:01 PM

How do I change this?
 

 

0 Kudos
Message 7 of 13
(3,717 Views)

Right click the terminal on the block diagram and where there's a checkmark on "Show as Icon", uncheck it. You can also set LabVIEW to not show terminals as icons by default, in the Options.

 

This is just an opinion. See if you like it the small way. Before making up you mind, read this, especially Aristos' comment.

 

Richard






0 Kudos
Message 8 of 13
(3,708 Views)

Is that just an IDE setting, or will my customer inherit however I have it set up?

 

P.S. I can't find the global setting in Tool->Options....  Where is that?

 

Thanks!

Dave 

0 Kudos
Message 9 of 13
(3,704 Views)

Tools /   Options  / Block Diagram   Place front panel terminals as icons.

 

 

I myself prefer the small terminals as opposed to icons due to the space issue.  Once an icon is placed as either a small terminal or an icon, it stays that way unless someone right clicks on it to change it no matter what computer it gets opened on.  The Options menu determines how all future new terminals get dropped on the block diagram in your development environment.  It won't affect other people opening up your VI other than the fact that however the icon/terminal looks when you save the VI it is how it will look to them.

Message 10 of 13
(3,702 Views)