LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Bug Report: Write Delimited Spreadsheet.vi replacement wires things incorrectly

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:

 

Screen Shot 2015-11-21 at 12.39.45.png

 

New Write Delimited Spreadsheet.vi:

 

Screen Shot 2015-11-21 at 12.39.29.png

 

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:

 

Screen Shot 2015-11-21 at 12.37.58.png

 

After replacement:

 

Screen Shot 2015-11-21 at 12.38.39.png

 

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.

 

Message 1 of 25
(5,459 Views)

Nice catch.

 

Lynn

0 Kudos
Message 2 of 25
(5,450 Views)

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

0 Kudos
Message 3 of 25
(5,415 Views)

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...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 25
(5,399 Views)

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

Message 5 of 25
(5,357 Views)

Good call, Lynn.  I agree (which should add $0.02 to that side of the argument).

 

BS

0 Kudos
Message 6 of 25
(5,347 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 25
(5,328 Views)
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
0 Kudos
Message 9 of 25
(4,919 Views)

@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?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 25
(4,901 Views)