Aaron L Posted May 9, 2009 Report Share Posted May 9, 2009 I was trying to get a little XML data file going for a bit of data I need to save and wanted to use the built in labview tools. However, to create the name of a number, it comes from the wire label. See attached. I've right clicked on a wire and added the description, but that doesn't link into the XML data. The label has to end up in the location shown in the attachment, not in the area below as a description. How does one change the wire label? I just can't seem to find the correct word to search on how to do this. Thanks! Quote Link to comment
jdunham Posted May 9, 2009 Report Share Posted May 9, 2009 QUOTE (Aaron L @ May 7 2009, 05:26 PM) I was trying to get a little XML data file going for a bit of data I need to save and wanted to use the built in labview tools. However, to create the name of a number, it comes from the wire label. See attached.I've right clicked on a wire and added the description, but that doesn't link into the XML data. The label has to end up in the location shown in the attachment, not in the area below as a description. How does one change the wire label? I just can't seem to find the correct word to search on how to do this. There's no good way to add a label directly to a wire. The best thing to do is wrap your XML call in a subvi. Then the wire will take the name of the input control to your subvi. If you simply must change the label on a wire, you can use a typecast. This works fine, but it's more of a hack than something you should do regularly. http://lavag.org/old_files/monthly_05_2009/post-1764-1241747281.png' target="_blank"> Quote Link to comment
Aaron L Posted May 9, 2009 Author Report Share Posted May 9, 2009 QUOTE (jdunham @ May 7 2009, 06:48 PM) There's no good way to add a label directly to a wire. The best thing to do is wrap your XML call in a subvi. Then the wire will take the name of the input control to your subvi. If you simply must change the label on a wire, you can use a typecast. This works fine, but it's more of a hack than something you should do regularly. http://lavag.org/old_files/monthly_05_2009/post-1764-1241747281.png' target="_blank"> It's true that there doesn't appear to be a good way to make it happen. Following that thought, I looked in the LV sample file Write Data to XML File.vi, and found there is a little trick NI uses. Placing a variable as the input to the Flatten to XML, the wire receives a name and that data is transmitted as a label in the XML file. You can see the attached. This works quite well for me since I have the file writes in a different location as the numeric input. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.