LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Com-Port in xml File

I agree with Thomas that the reference appears to be useless information because its disposable.
Also, flatten to string saves the resource name, so why doesn't flatten to XML do the same? I would expect them to behave similarly on this.

___________________
Try to take over the world!
0 Kudos
Message 11 of 18
(1,494 Views)
Hi Thomas and ‘tst’,

Well, I have to admit that it seems peculiar that the "Flatten to XML.vi" saves the refnum and not the name of the resource. However, the workaround that I pictured in my previous post seems to be a simple workaround. Is there a reason that you can't use that method?

I even went ahead and created a small VI that can save a VISA resource directly as XML and as string to a file and later load and convert it back to a VISA resource name. As we expect, the method of directly converting to XML, storing and later loading and converting from file does NOT work if LabVIEW has been closed between the saving and loading of the file. This is of course caused by the change in VISA refnum.

I have reported this behavior to R&D, so we can get clarified if the XML conversion is intended.

Thanks for noticing!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 12 of 18
(1,483 Views)
Hi Philip

I changed my vi that I save a string value. The string-element of the cluster is directly written by the refnum. To load it, I just wire the string to the refnum.

This works fine for the moment, but I agree with tst, that similar functions should convert data the same way.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 13 of 18
(1,481 Views)
Hi Philip
 
Now it's a year later, LV versions have changed and I'm working on another problem. I didn't remember this problem and ran into it again using LV8.0. What's the status of this topic?
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 14 of 18
(1,408 Views)
Almost a year later...  still a problem...
0 Kudos
Message 15 of 18
(1,306 Views)

Hi AllenS

Which version of LV are you using?

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 16 of 18
(1,290 Views)

8.2.1

I must confess that I didn't try saving to disk and then exiting and restarting LabVIEW.  But the string that is generated is still a refnum, not a text block, so I'm assuming that it still becomes invalid.

I could be convinced to try the more thorough test.

0 Kudos
Message 17 of 18
(1,278 Views)
Sounds as if it would not work. But an assumption is not as good as a test... 😉
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 18 of 18
(1,262 Views)