Search the Community
Showing results for tags 'config'.
Found 5 results
Dear All, I'm new to this forum and I'm really glad I became a member. I am currently in the phase of designing a simple program which can control all the DAQmx channels using a configuration file (.ini) which is capable of change voltage range during mid-simulation. At the moment my .ini file reads as follows: [AO Channel 1] Name = T2 Physical Channel = cDAQ1Mod1/ao0 Max Value = 10 Min Value = 0 [AO Channel 2] Name = T3 Physical Channel = cDAQ1Mod1/ao1 Max Value = 10 Min Value = 0 [AO Channel 1] Name = T2 Physical Channel = cDAQ1Mod1/ao0 Max Value = 5 Min Value = 0 [AO Channel 2] Name = T3 Physical Channel = cDAQ1Mod1/ao1 Max Value = 10 Min Value = 0 My LabVIEW VI for the .ini script is attached. I'm relatively new to using configuration file functions and I don't really understand where "Get Key Names" section should be wired to. I have placed a constant on it for now which reads the "AO Channel 1" but how can I get it to read all the channels in the .ini file. I am welcome to all suggestions here, I just want to make sure that I don't cause any problems to any of the channels and use best practice methods. All constructive criticism welcome! Thank you. Read Configuration (INI) File (1).vi
"Write INI Cluster__ogtk.vi" is rounding numbers in several 1D arrays buried in my super cluster. I am using Producer-Consumer with Supercluster archtecture, so my SC is somewhat deep. The numbers being affected are doubles within arrays within a cluster within a cluster within an array within the Supercluster. I created a work-around in the attached vi with standard NI config file libs. My desire was to have Scientific notation with 7 significant digits. The number was 2.002252E-3. The JKI routine converted this into 0.002002 and dropped 3 digits that were significant parts of a calibration polynomial. The anomoly occurred for only in numbers with "E-3" values. E+n, E-6, E-9 values were not affected although the system would change the exponent and shift the decimal sporatically. The standard LabVIEW NI_LVConfig.lvlib:Write Key.vi does not have this problem as you will see in the work-around but does also have the habit of changing the Sci notation around to something other than n.nnnnnnE-n. It hasn't cause any loss in precision but had done things like changing -1.78569E-5 into -17.856900E-6. I guess it prefers the standard 3, 6, 9 format for exponents. This utility happens to be my number one library for saving all system settings of interest between runs. Designed to work with a SC. Went thru much gnashing of teeth to fidure out what is acceptable items to put in the cluster. Dynamic variables like DAQmx Task references will just cause "Write INI Cluster__ogtk.vi" to fail. Since I don't need dynamics, this is fine. Every time the user edits a GUI cluster (system settings), I kick off an even that pushes all settings of interest out to the config.INI file. Hope This Helps and Enjoy, Jeff Francis Stanley Black & Decker JKI INI File Save - Number Precision issue.zip
Variant Config: format timestamps in human readable form
d_laub posted a topic in OpenG DevelopersCurrently, saving a date/timestamp to a config file saves it like this: Time Stamp = "00000000ÍAm#ß~p0000000000" I'd much prefer they be formatted like: Time Stamp = "2013-02-13T16:17:39.873Z" I realize this may run into some localization issues, but I'm fine with defaulting to the ISO 8601 format (or, you could change the "float number format" terminal to a generic "format string" input, and have float/time format strings line-delimited). The code to do so already exists in "Format Variant Into String", it checks if a waveform is a datestamp type before writing. This just needs to be ported over to the "Write key (variant)" VI (and correspondingly, to the read VI as well).
Configuration File (.INI) Best Practices
jbjorlie posted a topic in Database and File IOWhat is the standard, or is there one, for storing configuration data that will be used to initialize I/O channels and GUI "stuff"? Example Part 1: Executable needs to read from a file some UI initialization Info: [GUI] type = touchscreen size = 800x600 InstrumentName = GS342 Language = Englusskie Example part 2: We need to know what class of I/O to use for each channel: [GS342.CH1] ID = MicroFlex ComPort = Com1 PropotionalBand1 = .35 ProportionalBand2 = .67 [GS342.CH2] ID = USB-TCAI Node = 0 InPort = 0 OutPort1 = 0 OutPort2 = 0 Slope = 3894 Offset = 49920 [And on and on...] The "ID" tells me which class to use for that channel and the rest of the stuff has to go into that classes vi set somewhere. My question is: Is there a better way to do this? Remember, users need to be able to change these values and I want them to be readable for troubleshooting. Also, is it best to have a library of all possible values and read them into a typedef cluster or should I read them as an array of Name/Val pairs and then pull them out in the class vi that needs them? I cannot just white them into each class because they change (Proportional Bands need to be tweaked, etc...) I also would like to keep the property options somewhat standardized (ID, Max, Min, Pb, Com, etc...) so when I create new I/O classes I can just unbundle the options I need. Thanks, Jeremy
Opening and closing config files as a binary file but using the config VI’s to sort and Perce them. I was told this can be done any one know how?