Distributed Control & Automation Framework (DCAF)

cancel
Showing results for 
Search instead for 
Did you mean: 

DCAF Hands On - Failed to open configuration

Solved!
Go to solution

I'm jumping in to the DCAF, and working through the Hands On exercises. I was stymied yesterday when I kept getting an error upon opening the SimulatedSystem.pcfg file from the Configuration Editor. The error claimed that not all classes could be found, but IO was careful to add the search path. It turned out that the editor was not parsing the configuration file properly.

 

NISE_CEF_TreeSerializer.lvlib:get file data.vi takes the string produced by "read full file.vi" and splits it at an End Of Line (\r\n). The problem is that the file as read in by "read full file.vi" has linefeeds (\n) rather than EOLs (\r\n). The format cluster would then contain nothing in the second element and the entire file in the first element.

 

Changing the search string to \n seems to have fixed things.

 

I have not checked to see if the configuration files are being saved with EOLs after their version number.

 

Was there a change made regarding this recently?

 

Thanks!

 

0 Kudos
Message 1 of 7
(5,028 Views)

if you look to "NISE_CEF_TreeSerializer.lvlib:save file data.vi" on your system, is a \r\n being added in between the version and data items? I don't know of any change that would have effected this and as you can see, CEF itself hasn't needed to be touched very much recently. The last change was a few months ago and was just adding data accessors to get some additional functionality in DCAF.

 

https://github.com/NISystemsEngineering/CEF/commits/master

 

If you create a new configuration file with a target, engine, and some modules, are you able to save and load that file?

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 7
(5,026 Views)

Saving the configuration file does add the \r\n between the version and data items. It is just the initial load of the hands-on provided configuration file that fails. Making the change that I made in the search string (\n) leaves the \r after the version in the cluster, but only after the file has been saved.

 

It seems like the provided configuration file may have been created a while back and somehow there is only \n between version and data items.

 

0 Kudos
Message 3 of 7
(5,023 Views)

Is that the example finder configuration or some other one? I just downloaded all of the DCAF packages from VIPM a week or so ago and was working with the example yesterday without any problems

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 7
(5,019 Views)

It's the one on GitHub.

 

-> Documentation/Trunk/Getting Started Material/Hands On/Current/Exercises/Temperature Controller/

 

 

 

0 Kudos
Message 5 of 7
(5,016 Views)
Solution
Accepted by topic author Photon_Dan

We see the same issue if we try to directly download that specific file from GitHub but if we download the entire documentation repo as a .zip or clone it locally the file will open properly so I would try that for now.

 

People around me said they have seen this issue with downloading .pcfg files from GitHub in the past. They thought they had resolved this problem previously but since it is coming up again they are looking for better ways to handle this in the future.

Matt J | National Instruments | CLA
Message 6 of 7
(4,982 Views)

Perhaps the file reader should be agnostic of this issue and just load the file regardless. Then silently fix the file on the next save.



Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 7 of 7
(4,834 Views)