LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions wanted: Best Way to Store Test Spec Parameters?

Hello everyone,

 

I'm currently moving my test code away from an R&D/Engineering environment and towards a production and manufacturing environment. One of the requirements I've imposed on myself is to have the data analysis specs easily accessible outside of LabVIEW (instead of being hard-coded).

 

I currently use config files, as they are pretty easy to interface with in my opinion. However, they are limited to two levels of a "tree", Section and Key. I can get more levels by having multiple file paths, but I'd prefer to stay away from that if I can (it's my current method and is biting me in the butt right now). This method is sufficient for simple tests, with only a few parameters determining what test spec to use.

 

However, I have upwards of 8 items that determine which spec to use. And within that, some specs will have two parameters (high and low values), others can have 13+ parameters to check against.

 

How do you guys store this kind of data? Something easily scalable and broad enough to not require many changes in code across the 37 tests that I can run would be ideal.

 

Thanks,

 

0 Kudos
Message 1 of 8
(2,640 Views)

See Figure 15 of this nugget to get an idea how I exploit the config files for arbitrary data structures.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 8
(2,632 Views)
I like to use a database. Since I typically store test results there as well, the decision is fairly simple. I like not having local files that can be modified accidently or otherwise. I also like the ability to set the parameters from my desktop and not have to go out to each station.
Message 3 of 8
(2,626 Views)

I'd go for a database table also. Ini files are easily converted and it's easy enough to expand as you prefer.

 

There shouldn't really be a problem in expanding your ini-file system though, but if you store the results in a database, why not the test criteria. 😉

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 8
(2,606 Views)

Thanks everyone. It seems that the general concensus is the database, as I expected.

 

And Ben, I'll look into that method as well.

0 Kudos
Message 5 of 8
(2,582 Views)

I really like SQLite for these types of things. Other than that I sometimes use unflatten from XML with the XML created on a server.

=====================
LabVIEW 2012


Message 6 of 8
(2,579 Views)

@Steve Chandler wrote:

I really like SQLite for these types of things. Other than that I sometimes use unflatten from XML with the XML created on a server.


 

 

"

Twas two days before Christmas and all through the cubes

No problems were stirring noone developing rubes...

 

...

 

An what to my wondering ear did I hear

A call from my customer, it was what I fear

 

"The app stoped working with narry a clue!"

He invited me in to see what to see what I could do..

 

I flew to my jeep and went into gear,

no reason to creep.

 

...

 

I check out the app and saw no warning signs.

I reviewed the event log but the issues sublime.

 

The lead opeartor was freaking and said "We'll do it by hand."

By wire I thought, I'll not let that happen in my LV-land".

 

Three stations working and they all seemed good

but other were down rev and it seemd that borke the hoods (fume hood).

 

"I want them all upgraded" I her her say

I quiped "That would take more than a day."

 

So I dug into archive logs and looked with a sigh.

No obvious symptom did spring to my eye.

 

And then the date on the archieve seemed strange

Why archive so often it did seem deranged.

 

So back to the sys log and dug into the fluff

of updates and batch runs there was lots of stuff.

 

And there in the log apeeared what what I needed.

The opertor privledges had been deleted!

 

"But how could that happen, we werent on the net?"

"An IT time time-bomb had acted when set."

"

 

 

 

Translation?

 

DSC is built on the MS SQL server to its historical logging.

With diminished privledges the data still logged but the operators did not have privleges to look at it and made it look like the data was not being logged because we could not see it. No error were returned by the DSC functions (grrr) since time out was kicking. Even the historical tends in MAX was not able to see the data. Turns out there was an experation date on the operator privleges that was hitting one machine after another as the privleges were dropped. looke like a virus was spreading from a user point of view.

 

Why tell this story (aside from having to free myself of that rediculous rhym) ?

 

A third party server (SQL, DSC, Kepware...) adds an adiotnal level of risk where the befits must be weighed against the benefits. You would have to have a lot of tests theat were some how related to justify a DB (we used to call these relational data bases since the parts were related) to store the configs. If the app already has a DB then the game changes. But a DB for just config is over-kill.

 

In my above scenario, I was not getting errors returned from SQL. If I was writting to a file using LV functions, I would have seen an access denighed error. (Note Access denighed entries were present in the OS Application log AFTER I found out what to look for and when it time to look for it!).

 

"Although it s been said many time many ways...." KISS

 

Ben

 

PS Re: KISS and a link to that nugget in the same thread. The self imposed requirement I laid on myself in that nugget was to develop a techinque that was not subject to breaking if NI changed the representation of its data and was kept as simple as possible.

 

PPS: The story in the rhym is true and happened on Thursday and Friday (by the time I found the problem!).

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 8
(2,548 Views)
KISS - That is one of the things I really appreciate about SQLite. It is all local and no complex permissions and administrative privileges. Storing config data in a full blown server is probably overkill but if you know what you are doing it is very robust. It is not for the faint of heart. I am responsible for a LV/PostgreSQL system that has been running without problems for five years. The DB side is so stable that it is almost scary.
=====================
LabVIEW 2012


Message 8 of 8
(2,536 Views)