FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set the current values of controls and indicators as default programatically?

hello,

is there any programatic way to make the run time values of the controls and indicators on the fron panel as default.

if some body knows how to accomplish this programatically, then please give me the solution on my email id.

samriddh sarbalhi

sarbalhi.samriddh@gmail.com

thanks

0 Kudos
Message 1 of 14
(9,351 Views)

Hi samriddh,

yes it is possible. You have to start another vi which opens the reference of the vi you want to make the values default, and then you can call the methode to make the values default. I think it is only possible in development envirement.

Hope this helps.

Mike

0 Kudos
Message 2 of 14
(9,347 Views)

hi Mr. Mike,

could u please ellaborate the solution suggested by u a littble bit more.

i will try the one suggested by u.

one more question? would this method works in an executable? after all the developement code has to be transfered to an executable.

thanks for the suggestion.

bye. 

0 Kudos
Message 3 of 14
(9,337 Views)

hi Mr. Mike,

what will happen if some one closes the labview and reopens the vi again.

would the last values in the controls and indicators be available to the user again?

what will happen after the system restart or re-boot?

would i have to save the code on each attempt in real time so that the last values will be saved on each time the code runs? if so is there any programatic way to save a vi in run time?

if yes then please tell me.

thanks and bye.Smiley Wink

 

0 Kudos
Message 4 of 14
(9,335 Views)

Hi samriddh,

There are several ways to change the default values.  As mentioned by Mike and shown in this example, you can open a reference to the VI and use the invoke method Default Values:Make Current Default.  However, this method is not supported with the LabVIEW Run-Time Engine or a real-time operating system. 

Another option is to set the values through an ini file.  This is possible with an executable and is demonstrated here.   

In either case, you will see the new default values displayed when you reopen the VI. 

Jennifer R.
National Instruments
Applications Engineer
Message 5 of 14
(9,283 Views)

Hi Jennifier,

I have made an application which contains more than one hyperternd, means instead of using one hypertrend to display data i had used 26 number of hyperternds in different sub vi's. Now my question is this " Is it possible that using more than one hyperternd can effect the efficiency of the code in terms of  RAM consumption or CPU usage, because i don't want my code to be hanged while running?"

Secondly, i had linked the database traces to hypertrend manually means by going to the properties of the trend giving the path. I am not using the default data path of LabView. I had created the database somewhere else on the hard disk.On my computer it works, but on the another it does not work. I know the reason because the database path differs. I also tried by giving the Labview default database path to the library on another computer, i think it should work but it did not.What solution would you prefer.

What will be in case when the code be transferred to an executable. 

please guide me.  

samriddh sarbalhi

sarbalhi.samriddh@gmail.com

    

0 Kudos
Message 6 of 14
(9,258 Views)

Hi samriddh,

I created an application with about that many HyperTrend controls and did not see any great difference in performance.  I would suggest testing on your system with your data to be certain. 

Are you trying to connect to a database on your local or remote machine?  In the HyperTrend Properties, when you add a trace are you able to browse to the path of the correct database?  Could you provide some additional information on how you are configuring the settings and what you are seeing?

If you create an executable, it will display the traces just as your VI does. 

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 7 of 14
(9,228 Views)

Hi Jeniffer,

I had linked the traces from the properties of the hypertrend. The path becomes                                        \\C-2\JUICE EXTRACTION ALARMS\SET POINT LEVEL as the standard path like \\computer name\database\trace. I think i had choosen the correct database.  

Here in this case the computer name is "C-2" database is "JUICE EXTRACTION ALARMS" & trace name is "SET POINT LEVEL".

The code works on my computer. Now i am trying the code to be run on an another computer. Do i have to again link the trace path manually to the hyperternd as it is not working as i told you earlier.

Or there is any programatic way so that the data will be logged and displayed on the trend wiithout doing the rework.

Thanks and good luck

Samriddh Sarbalhi

sarbalhi.samriddh@gmail.com

  

0 Kudos
Message 8 of 14
(9,185 Views)
Hi Samriddh,
 
In the HyperTrend Properties did you browse to the trace under My Computer or Network?  You should not need to reselect the trace on your second computer.  If you do, are you able to view the data?  On your second computer, are you able to view the trace in Measurement & Automation Explorer under Historical Data?  Also, is the database version Citadel 5 or Citadel 4? 
Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 14
(9,144 Views)
Hi Samriddh,
 
One more thing.  If you have any firewalls set up, this document and the related link at the end may be helpful. 
Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 10 of 14
(9,142 Views)