LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to hold data even closing the VI?

Solved!
Go to solution
Highlighted

Hello guys.

I'm using a VI to measure the force applied to a load cell (strain gage). I wish I could calibrate it between defined periods, so I wish I could insert a data (the number I have to multiply the load cell voltage, wich one is in volts) in any moment, but I want that this number stay into the VI when I close it and than open it again. If possible, I would like to protect this data with a key.
Is it possible
Sorry for my bad english!

Hope you can help me!

Thank you!!

0 Kudos
Message 1 of 15
(1,489 Views)
Highlighted

sorry, I meant:

Is it possible?

0 Kudos
Message 2 of 15
(1,473 Views)
Highlighted

The simple way would be write the value to a file and then read it when you start the code.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 15
(1,466 Views)
Highlighted

Best way to use all the VIs in one common file and pass the wanting value from 1 VI to other using global variable.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 15
(1,454 Views)
Highlighted
Solution
Accepted by topic author ManuSpadim

As Anand says, the easy way is to just write the data to a file, but then it wont be protected. You can write it as a registry key in which case it's somewhat protected by being somewhat hidden and you can easily make a password-vi to allow modification of this value.

 

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 15
(1,447 Views)
Highlighted

Writing to registry is a good way to save the top level configuration parameters like Checksum values. But for the data still I would go for writing to file like binary files (Cannot be edited manually) so your file is protected to a level. If you want to increase the number of parameters you can still easily do it.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 15
(1,442 Views)
Highlighted

There is absolutely no problem in using file but if labview has given you facility then why not use it, just saying  Smiley Wink  ?

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 7 of 15
(1,441 Views)
Highlighted

@Ranjeet_Singh wrote:

There is absolutely no problem in using file but if labview has given you facility then why not use it, just saying  Smiley Wink  ?

 


I don't understand which facility you meant here. 🙂

-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 15
(1,433 Views)
Highlighted

Read about global variable

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 9 of 15
(1,429 Views)
Highlighted

Using a file and the registry key is different and global variable is different. Global varaible comes into play after reading from the file or reg key but the question here is to preserve the value somehwere even after closing the vi.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 15
(1,423 Views)