08-23-2016 07:30 AM
The attached vi works as shown. Why does it not write the data to the file if I remove the 'wait 1 milisecond' code? The section and keys already exist in the file but only get overwritten if I wait a millisecond on every loop iteration. LabVIEW 2015 (15.0.1). I tried changing the config file reference wire to use a shift register.
Solved! Go to Solution.
08-23-2016 07:50 AM
I removed the wait and it works fine for me. Do you have something acting in parallel with this code that could be messing something up?
08-23-2016 07:56 AM
No, nothing running in parallel.
08-23-2016 07:56 AM
That's an interesting question/observation. I'm more taken with the fact that you do not use the Refnum Out terminal of the Write (or Read) Key function to an Output Tunnel, and use that to Close Config Data. Data Flow is a funny thing, and you might have run into an interesting LabVIEW Compiler Optimization that has messed you up.
I've taken the liberty of putting both the Refnum and Error Line in shift registers (the Error Line is there for a reason -- use it!) and I removed the Wait. Does this work the way you expect? [If it still fails, this should be brought to NI's attention].
Bob Schor
08-23-2016 08:16 AM
Thanks, Bob for your suggestion. I gave it a try and still have the problem. I did think about data flow, and am convinced that what I had should work (at least from the data flow perspective). I know the underlying architecture of the config file VIs uses queues. This suggests that there may be asychronous activity.
08-23-2016 08:39 AM
Wow, I hadn't looked "under the hood" before -- that is a little arcane, isn't it?
Do you know how to "Ask an Engineer" and get this into NI's Support staff? This may be worth bringing to their attention ...
Bob Schor
08-23-2016 08:58 AM
@Bob_Schor wrote:Wow, I hadn't looked "under the hood" before -- that is a little arcane, isn't it?
Did you not pay attention in my NI Week session. I flat out stated (or at least intended to) that the configuration files were based on the Single Element Queue setup. NI could update them to use a DVR instead if they wanted to get some more performance out of the configuration file VIs.
08-23-2016 09:00 AM
I just 'asked an engineer'.
08-23-2016 03:13 PM
PEBKAC error. Problem Exists Between Keyboard And Chair. I had another piece of code running in parallel, also writing to the config file. Problem fixed. Case closed.
08-23-2016 04:16 PM
@Les__Bartel wrote:I had another piece of code running in parallel, also writing to the config file.
Ah, so my first reply was correct!