LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

class object members vs clusters

If you're not sold on having human-readable files for your class objects, you could go with LV Datalog files. They've had a bit of a revival with LVOOP. You can write a completely generic set of VIs that read and write LabVIEW Objects to file. Then all you have to do is cast the generic LV Object back to the parent type after reading it from file. As Aristos will point out, it can even automatically handle differences between versions automatically. This might be a great solution for you.

Check out this link for more.
Jarrod S.
National Instruments
0 Kudos
Message 11 of 15
(1,132 Views)
Here's an extremely hastily put together example 🙂
Jarrod S.
National Instruments
0 Kudos
Message 12 of 15
(1,129 Views)
Im not using this for datalogging purposes.

Im just saving settings to a file. Its easy then to go in with notepad and tweak settings. And it eliminates the need for huge complex configuration GUIs for settings that only developers will use. I've found it to be a really simple method for maintaining a flexible and configurable system.

0 Kudos
Message 13 of 15
(1,129 Views)
Understood. Thought it was worth a shot.
Jarrod S.
National Instruments
0 Kudos
Message 14 of 15
(1,126 Views)
Actually, I dont even use .ini files because they arent structured enough. Its easier to use XML. Of course if you use the NI xml functions it spits out more junk than necessary. I wrote my own libraries wrapping the MSXML.net functions. I get nice clean readable structured settings files. I find its a great way to go.

The more you automate the file generation, the more reliable it becomes. For instance if the property name is ALWAYS the control.label.test, you never have typos. Since generic VI's for dumping a cluster to an XML element are consistent you just plug and play, no debugging necessary. 

For large projects this method takes day worth of writing and debugging code for reading and writing config files and turns it into an automatic thing- just pass it your parent object and your done.

Message Edited by tlivingston on 02-07-2007 10:33 AM

0 Kudos
Message 15 of 15
(1,124 Views)