Closed Monkeymerlot closed 9 months ago
@Monkeymerlot thanks I will think about this. After first read can we just test if variant is empty?
@ciozi137 Good question. I will check but I have a suspicion that it will return something like this:
" " =
" " =
" " =
Also I think that the fact that there are no names on the returned cluster is actually a bug in the openG VIs. I am thinking of opening an issue and doing a pull request with the fix (I fixed it on my machine already) but there are pull requests from 2013 that haven't been reviewed or merged yet so IDK if it will do any good.
@Monkeymerlot I had to do a quick security update related to instrument/postgreSQL. I can look at the config stuff now.
So testing for an empty variant will not work.
Without my fix for the variant configuration palette:
With Fix:
and test VI:
@Monkeymerlot thanks for checking. I also just checked and the result was that my config file was erased completely. I am going to take your zip file above and merge
@Monkeymerlot looking good. Update will be included in next build (1.8.3 I think)
Here is my test:
The test looks good but I think you might have to delete the temp file once youre done with it.
@Monkeymerlot I delete it at the beginning of the test
Oops missed that
I was having some issues getting everything to work because it was looking for the Configuration Prototype file, but it was also not part of the class. So I put it in the class then deleted it from the project and pushed the changes. Hopefully that will fix it.
@Monkeymerlot no I took your code and added it to my VIs. So just update the instrument framework on vipm
@ciozi137 I understand. I'm saying the project was looking for it probably when you had it open to copy the code. Like a ghost dependency. And it was making the class have a broken run arrow. It should be good now though.
@ciozi137 I am not seeing a new package (current package is 1.7.0.95). Were you saying that you wanted me to build the package or did you not get to it yet or is there a problem on my end?
@Monkeymerlot refresh the repo. Latest version is 1.8.3
@ciozi137 That was the issue *slaps forehead*. Thanks
@Monkeymerlot I just reverted your commit. Instrument Framework is programmed in LV2016 and you should be installing via VIPM. Can you elaborate what issue you were having with configuration dependencies? I have no issue on my system nvm maybe I do. Let me check...
@Monkeymerlot sorry I see the problem now. I will build a new version (will be v1.8.3.100)
No worries. LabVIEW just loves bringing us back to dependency hell...
I was wondering if we could modify this ever so slightly to this:
I have been writing things to variant attributes and LabVIEW will save those as a binary section in the file. There are two issues with this:
So I want to dynamically change them to a cluster and write them that way. This actually works quite well. However, currently upon reading, if they already exist, I don't get the names back. This will make it difficult to set them as variant attributes. Basically I want to move the case structure to only encapsulate the write section cluster part so all clusters/sections read will be named.
bump
https://github.com/levylabpitt/AFM-Lithography/issues/16#issuecomment-780109581 https://github.com/levylabpitt/AFM-Lithography/issues/16#issuecomment-780122280 https://github.com/levylabpitt/AFM-Lithography/issues/16#issuecomment-780195806 So I thought about the scenarios that we could have pertaining to the issue that I had in the other project and laid out what I thought would be the best way to go about this.![image](https://user-images.githubusercontent.com/37567672/108260247-1931e000-7130-11eb-9f19-94cbaa04017b.png)
Replacing the default data with the existing data from file when the cluster size has grown (ie the section is missing an element) was complicated greatly by the fact that the returned data from the read ini file VIs does not have labelled elements. Here is the test setup that I did:
I created a file and initialized it with the following content:
Then I requested that it read from the file a cluster containing 1 more element than what was in the file. To make sure that the variant to data wasn't coercing the data I changed the values in the type cluster before I used it in variant to data:![image](https://user-images.githubusercontent.com/37567672/108265227-80529300-7136-11eb-99e4-467f9efe8849.png)
This is what I came up with that correctly wrote to the file and returned the correct values:
And the file contents:
returned data:
![image](https://user-images.githubusercontent.com/37567672/108265816-48981b00-7137-11eb-8efe-66c0159de1ba.png)
Files: Configuration Prototype.zip