LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read key craziness!!!

Hi there,

Please can someone end my pain here!

I have used the read/write config files many times in the past with no problems, now I discover the simplest VI does not work any more!

My VI cannot seem to read back the only key in the ini file, the found? output is false.

What is going wrong??

I am using LV 7.1

Can anyone shed some light here?

I have attached my sample VI and the ini file (which lives in c:\)
Download All
0 Kudos
Message 1 of 13
(3,594 Views)
Hi nrp,

your vi runs fine and reads the value from the ini-file Smiley Happy No problems here.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 13
(3,586 Views)
aaarg, I thought as much. I think somehow my config VIs have been corrupted. I tried repairing my install but this did not seem to help. Reinstall time maybe? (what a pain!!!).

I have tried debugging the config VIs, but they are quite confusing!

(I have just tried in 6.1 and it seems fine, so it must be my 7.1 installation).

Does anyone know if I can just copy the config.llb file from my 6.1 to my 7.1 installation?

Update: ok copying the .llb from 6.1 to 7.1 worked fine! The .llb file are similar in size, and they probably havent changed much between 6.1 and 7.1 so hopefully that will be ok. Odd though, I have no idea how it got corrupted...


Thanks to all for testing.

Message Edited by nrp on 08-07-2007 03:29 PM

0 Kudos
Message 3 of 13
(3,584 Views)
I too find no problem running your vi. Not sure what is happening at your end. Downloaded it and ran it in LV 7.1.1 Ok.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 4 of 13
(3,576 Views)

Probably not relevant to the issue, but there's no need to set the true for the close to write to the file after you've read values.

I'd guess you probably know this anyway, but what the heck.

You could always lift the relevant VIs or LLBs from another LabVIEW installation.  Might be preferable to a reinstall.

Some of NI's shipped VI's are crazy.  Their style rules are obviously a case of "do as I say, not as I do" Smiley Very Happy  To be fair, many have been re-worked in recent years.  I think they password-protect the really messy ones!

0 Kudos
Message 5 of 13
(3,569 Views)
Sean wrote;
 

 

Some of NI's shipped VI's are crazy.  Their style rules are obviously a case of "do as I say, not as I do"   To be fair, many have been re-worked in recent years.  I think they password-protect the really messy ones!


 

I have seen some of the password protected VI's and I was very pleased with what I saw. Smiley Happy

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 13
(3,559 Views)
I think its better not to always rely on the VI defaults, as sometimes NI change them!

As it happens, the Close Config Data VI is one such VI where the behaviour changed from 6.1 --> 7.1. In 6.1 the "write configuration" defaults to T, whereas in 7.1 it defaults to F.
I have just spent 30 mins debugging this unexpected behaviour!
0 Kudos
Message 7 of 13
(3,548 Views)


@nrp wrote:

As it happens, the Close Config Data VI is one such VI where the behaviour changed from 6.1 --> 7.1. In 6.1 the "write configuration" defaults to T, whereas in 7.1 it defaults to F.

When a default input value is changed between versions, LV is supposed to have some mutation code which will automatically add a constant with the old default value if you haven't wired anything in. If this did not happen, I suggest you report to NI, in case it was not fixed in newer versions.


___________________
Try to take over the world!
0 Kudos
Message 8 of 13
(3,537 Views)
Actually something *really* odd is going on with my machine. The config.llb actually repaired itself automatically (after prompting for the CD), and then the default value seemed to be back to T.

I have not personally been too burned by this, but I know of people on this forum who have.
0 Kudos
Message 9 of 13
(3,532 Views)
By the way, as far as I can remember, the default value is T up until the most recent version, although I can only check LV 7.0 at the moment. It would seem to make sense that the default would be T, so I'm not sure what would cause it to change in your case (or the other people you mentioned).

___________________
Try to take over the world!
0 Kudos
Message 10 of 13
(3,515 Views)