12-13-2009 04:21 AM
Does anyone know of a good algorithm for Unescaping raw data. When run this code (VI Snippet posted below), it takes 70+ seconds for the Read Config VI to return. This is because I have to read non-RAW data in order to get the Get/Set Ctrl Val to work. I narrowed it down to the Unescape String VI. I was thinking if I could replace this with a C DLL that it would be behave much faster. Also, if anyone knows how to get around having to NOT use RAW data when using the strings in a .ini to store Ctrl Values, I would like to know.
12-13-2009 05:23 AM
Hi Joji,
could you please split your test into 4 stages:
1) reading all control values
2) writing the ini file
3) reading the ini file
4) setting all control values
and then report the time for each stage?
Also:
How many controls are you saving? How big are the data (any [large] arrays included)?
12-13-2009 11:13 AM
It seems a little strange to write raw binary text to an ini file. Usually you want plain text that a user could read or modify manually. One quick alternative to the ini file would be an XML file using the default LabVIEW schema. It automatically flattens all data types to readable text. I personally don't think it's the best schema in the world, but it's quick and easy.
Your other alternative is to manually flatten the binary data to descriptive, plain text. OpenG has a Variant Configuration File utility that does exactly this for ini files, and should have decent performance.