Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Creating a User-Defined Comparison VI (Unit Test Framework Toolkit)

LabVIEW 2013 Unit Test Framework Toolkit Help

Edition Date: June 2013

Part Number: 372584F-01

»View Product Info
Download Help (Windows Only)

Complete the following steps to create a user-defined comparison VI.

  1. Select File»New VI to create a new, blank VI.
  2. On the Controls palette, select Modern»Variant & Class to display the Variant & Class palette.
  3. Add a variant to the front panel and label the variant Resulting Value.
  4. Right-click the variant and select Change to Control from the shortcut menu.
  5. Add another variant to the front panel and label the variant Expected Value.
  6. Right-click the Expected Value variant and select Change to Control from the shortcut menu.
  7. On the Controls palette, select Modern»Boolean to display the Boolean palette.
  8. Add a Round LED or Square LED Boolean indicator to the front panel and label the Boolean indicator Comparison Result.
  9. Right-click the connector pane and select Patterns from the shortcut menu. Select the following connector pane pattern.

  10. Assign each of the following connector pane terminals to a front panel control or indicator.
    1. Top left terminal to the Resulting Value variant control.
    2. Bottom left terminal to the Expected Value variant control.
    3. Right terminal to the Comparison Result Boolean indicator.
    Note  You must configure the connector pane properly in order for the user-defined comparison VI to work properly.
  11. Display the block diagram by selecting Window»Show Block Diagram.
  12. Add or define your own comparison to the block diagram.
  13. Wire the Resulting Value and Expected Value variant controls to the comparison.
  14. Wire the result of the comparison to the Comparison Result Boolean indicator.
    Note  The comparison must return a Boolean data type.
  15. Select File»Save As to save this user-defined comparison VI in an easily accessible location.

Refer to the labview\examples\Unit Test Framework\User-Defined Comparison\User-Defined Comparison.lvproj for an example that demonstrates how to use user-defined comparison VIs in the Unit Test Framework Toolkit.

Related Information

Assigning Terminals to Controls and Indicators

Variant Data


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit