Unit Testing Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Array of Clusters in UTF

I need to put this out to the community. It seems that we are having issues using an array of clusters with the UTF for LabVIEW 2015. The UTF does not recognize these types of structures correctly. Attached is a file with screenshots showing the before and after.

0 Kudos
Message 1 of 23
(11,581 Views)

It's a bit difficult to follow along in the Word document, so I'll try to summarize what I think you're experiencing here:

  • You have an array of clusters ("Array"). When you add another array of clusters ("sbRIO Data in"), the testcase prototype for the first array of clusters changes to add a value for the array itself (and not just the elements of the array.
  • You have an array of doubles ("Distributed P (kW)"). When you add an array of clusters ("sbRIO Data in"), the testcase prototype for the array of doubles changes to add a value for the array itself (and not just the elements of the array.
  • The added array of clusters ("sbRIO Data in") isn't captured correctly. Each element is represented by the first value of the cluster element, instead of the all of the cluster contents.
  • It looks like the lvtest file on disk is right.

This looks like a parsing bug to me - the UTF saves the lvtest correctly, but then doesn't read it back in correctly.

Silly suggestion: can you try again, but get rid of all the parentases in your control label names? The parser may be choking on these (it's just a hunch).





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Message 2 of 23
(9,396 Views)

It would also help if you can upload the lvtest file and the VI you're trying to test (no need for any dependancies, you can even strip the code out if you like), as well as any Setup/Teardown components.





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
0 Kudos
Message 3 of 23
(9,396 Views)

It seems to be the 'reading in' parsing that is not working in the UTF but also the file is modified incorrectly when the unit test is closed. What you explained is correct with regards to the screenshots in the Word document. I have attached the VI and the lvtest file that I was using but the VI and the lvtest file represent the VI without the 'sbRIO Data in' control connected to the connector pane. Once this control is attached to the connector pane and the test is updated, that is when it breaks. I wanted to try several types of arrays but it is the cluster array that is causing the most grief. I also removed the parenthesis from the control names, just in case.

Download All
0 Kudos
Message 4 of 23
(9,396 Views)

Christopher Relf wrote:

This looks like a parsing bug to me - the UTF saves the lvtest correctly, but then doesn't read it back in correctly.

Silly suggestion: can you try again, but get rid of all the parentases in your control label names? The parser may be choking on these (it's just a hunch).

Chris,

You were correct. It is a parsing issue and the problem was a control with "/" in its name. If you want to see how I got to that conlusion, see the video below.

I will contact NI to get a CAR filed as to why the dialog that informs us of the problem is not showing up in the original VI. Also, it would be interesting to know what changed from the previous version of UTF and the 2015 version that caused this to be an issue.

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Message 5 of 23
(9,396 Views)

FabiolaDelaCueva wrote:

Christopher Relf wrote:

Silly suggestion: can you try again, but get rid of all the parentases in your control label names? The parser may be choking on these (it's just a hunch).

Chris,

You were correct. It is a parsing issue and the problem was a control with "/" in its name.

I'd figured it was parsing - that's what happens when you use plain text, without schema, as a configuration file format.





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Message 6 of 23
(9,396 Views)

A CAR has been filed CAR # 564417.

The only thing we can do is to wait and see if it gets fixed in future versions.


For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Message 7 of 23
(9,396 Views)

CAR 564417  has been fixed in LabVIEW 2016. Please see the LabVIEW 2016 Bug Fix List for more information.

--------------------------------------
Message 8 of 23
(9,396 Views)

OlliesCamel wrote:

CAR 564417  has been fixed in LabVIEW 2016. Please see the LabVIEW 2016 Bug Fix List for more information.

564417
Special characters in Control names can cause Unit Tests to not recognize cluster elements in some cases.A control with a special character (/) in its label can cause an lvtest does not to show the controls in a cluster.

Does this mean that all characters that UTF allows to be entered in its UI will be saved and read correctly? Of you just fixed it for the "\" case?





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
0 Kudos
Message 9 of 23
(9,396 Views)

Honestly you may have to test it.

Internally the CAR mentions just fixing the / character in control names, but the related parsing functions have UTF in their VI names, so it may work for more charachters

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 10 of 23
(9,396 Views)