11-21-2015 02:55 PM - edited 11-21-2015 02:55 PM
LabVIEW 2015 introduced a set of VIs to read/write delimited arrays of numbers from/to a text file to replace the supposedly confusing previous VIs doing that exact same job.
On the face of it, they look similar, at least at the level of the connector pane:
Deprecated Write To Spreadsheet File.vI:
New Write Delimited Spreadsheet.vi:
Well, except that there are now error cluster connectors.
Unfortunately that cause a potential big problem when you do replace the old VI by the new one (which luckily LV doesn't do automatically).
Here's the demonstration:
Before replacement:
After replacement:
In other words, IF you had wires connected to both the "append to file? (F)" and "transpose? (no:F)" connectors, they will be inverted after replacement.
Likewise, if you have ONLY the "append to file? (F)" connector wired, it will be swapped to the "transpose? (no:F)" connector.
If you have the ONLY the "transpose? (no:F)" connector wired, you'll be fine.
This is obviously all due to the fact that the new Error in connector replaces the old "append to file? (F)" connector.
Until this is corrected, be careful when you do replacement. Or just don't replace the old VI.
11-21-2015 03:03 PM
Nice catch.
Lynn
11-21-2015 07:17 PM
Hmm. It's a VI with a different name, a different number of connectors, hence (by definition) with different connectors. You consider it a "bug" that one isn't an identical replacement for the other, and claim that it wires "incorrectly".
it is good to alert users about carelessly substituting "similar" VIs for each other. I agree with your conclusion "be careful when you do replacement. Or just don't replace the old VI."
Bob Schor
11-21-2015 08:39 PM - edited 11-21-2015 08:41 PM
I think that the original fix was to give it error terminals, and since that changed the connector pane, they decided to call it something else so it wouldn't break legacy code. Since they had to change the name anyway, they decided to use the opportunity to name it to something less ambiguous.
They did deprecate the old vi, implying that this was a replacement for it. So while it's probably not a technical bug, it's an "effective" one...
I'm of two minds about this. I guess it was deprecated simply so you wouldn't use it any more, so I guess you couldn't call it a bug of any sort...
11-22-2015 08:35 AM
Whether or not you consider it a bug is largely irrelevant.
The process of replacement is something which will obviously occur many, many times as legacy code is updated. When replacement may create one or two non-obvious errors, it is something which should be addressed.
In this case adding documentation to the help file is NOT enough. There is only one candidate VI to replace the deprecated Write to Spreadsheet File.vi so many people will not look at the documentation.
It is too late now but had they used the 4-2-2-4 conpane and moved append to file? to the top, it likely would have avoided the issue. That conpane would also likely result in fewer kinked error and path wires.
Lynn
11-22-2015 09:25 AM
Good call, Lynn. I agree (which should add $0.02 to that side of the argument).
BS
11-22-2015 12:05 PM - edited 11-22-2015 12:09 PM
And my argument is that you really shouldn't be replacing these at all, since they already work in the first place. And if you DID replace them to take advantage of the error terminals, you should be well aware that any time you replace something, you should check the wiring. LabVIEW makes a best guess, but that's all it is - a best guess. If this were to be considered a bug, it would be the grandest bug of all because this bug could happen any time you re-link something that has similar inputs with different connector panes (or rewired connector panes) - which includes replacing something, because most likely re-linking is part of the replacemnt process.
02-10-2016 11:50 PM
Eventually, this was recognized as a problem here: http://forums.ni.com/t5/LabVIEW/Problem-with-Write-to-spreadsheet-file-vi-vs-Write-delimited/m-p/325...
04-04-2016 08:27 AM
04-04-2016 09:31 AM
@richjoh wrote:
The Labview 2015 "Write Delimited Spreadsheet" VI doesn't work, it fails to write to a file. I opened the VI and its wired incorrectly with data output going into the "delimiter" connector. I wrote my own write delimiter spreadsheet for 2 dimension text array to a write to file. Your force to make a change from the old Write to Spreadsheet since the VI doesn't compile (broken arrow). Hopefully all of this is in the bug report already since I spent time troubleshooting only to find partial of issue already posted here. Rich J
This is absolutely the first time I'd ever heard of this. I don't think NI would release something that broken out the door - and additionally - no one has reported it.
However, I don't have LV 2015 (yet), so I can't verify whether or not this is really an issue. Could it be that someone created their own VI with the same name and somehow the file dependency changed?