LV Tabs is not an enum

Presentation on Tab pages (not the same as enum)

Notes

•Presentation on Tabs and Array of Tabs constants

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW is a NI (formally National Instruments) product

•Presentation app: Microsoft’s PowerPoint

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

Tags:  LabVIEW® , Search 1D array, Index Array, Tabs, Typedef, Build Array

•A Possible solution provided.

•Yes you can combine the Tab Name string and the Tab Page string  into cluster array

Posted in Test Sector | Tagged , | Leave a comment

LV StandAlone or in SubPanel

Presentation on determining if running VI as standalone or in a SubPanel

Notes

•Presentation on Determining if VI is running stand alone or in a subPanel

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW is a NI (formally National Instruments) product

•Presentation app: Microsoft’®s PowerPoint

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

Tags:  LabVIEW®, Subpanel, Standalone VI, FrontPanel Closeable Property, Open vi Reference, Run VI method, Abort method, Is Vi standalone or in SubPanel

Posted in Test Sector | Tagged , | Leave a comment

LV MultiColumn List Box (MCLB)

Presentation on Multicolumn List Box (select 1 and Scalar Datatype

Note

•Presentation on LV MultiColumn List Box 

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW is a NI (formally National Instruments) product

•Presentation app: Microsoft’s PowerPoint

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

Tags:  LabVIEW® , MultiColumn List Box , MCLB, Item Symbols, Custom Item Symbols, Top Left Cell, Item Names String Array

Posted in Test Sector | Tagged , , , | Leave a comment

LV Enum and String

Presentation on Enum to String and String to Enum

Notes

•Presentation on Enum to string and String to Enum

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW is a NI (formally National Instruments) product

•Presentation app: Microsoft’s PowerPoint

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

Tags:  LabVIEW®, Format to String, Scan From String, Compound (AND) operation, String to Enum Checking, Testing that a string matches elements in enum.

Posted in Test Sector | Tagged , , | Leave a comment

Python Example Testing Functions , Running Test List, Mini Test Report (not Gui version), Only Console result.

Showing use of functions and running sequence via list, with a mini Test report function

List had Test function to run. Example Tests_seq=[component,electrical,optical,OE,EO]

The OE test result in this example has a random result output which helps develope code for different result outputs. Example Result=[“Pass”,”Fail*”,”Error”] .

Python 3.7 using Spyder

# -*- coding: utf-8 -*-
"""
Created on Sun Oct 20 12:48:27 2019

@author: aleja
"""
import random

def component():
    print("Running Component Test")
    return ("Pass")
    
def electrical():
    print("Running Electical Test")    
    return ("Pass")

def optical():
    print("Running Optical Test")
    return ("Pass")  
  
def OE():
    print("Running OE Test")
    return (random.choice(Result)) #random result

def EO():
    print("Running EO Test")
    return ("Pass")     


def Test_report(TestN,TestR):
    CSPs=["15","30"]
    CSPF = "{:<"+CSPs[0]+"} {:<"+CSPs[1]+"}"
    print("\n==========================")
    print("===== Test Report ========")
    print("==========================")
    Test_Header=["TestName","TestResult"]
    Test_HeaBar=["********","**********"]
    print (CSPF.format(Test_Header[0],Test_Header[1]))
    print (CSPF.format(Test_HeaBar[0],Test_HeaBar[1]))       
    for i in range(len(TestN)):
        print (CSPF.format(TestN[i],TestR[i]))



Tests_seq=[component,electrical,optical,OE,EO]
Test_enables=[1,1,1,1,1]
Result=["Pass","Fail*","Error"]

Test_Results=[]
Test_Names=[]
for Test in Tests_seq:
    Test_result=Test()
    Test_Name=Test.__name__
    print(Test_Name +"  TestResult:         " + Test_result)
    Test_Results.append(Test_result)
    Test_Names.append(Test_Name)
    
print(Test_Names)
print(Test_Results)

FailedList=["Fail*","Error"]



if ("Fail*") in Test_Results:
    print ("\n*Overall Result: Failed")
elif("Error") in Test_Results:
    print ("\n***Overall Result: Incomplete")
else:
    print ("\nOverall Result: Passed")    


Failure_detected=any(x in Test_Results for x in FailedList)
if (Failure_detected):
    print ("Check for Failure or Imcomplete")
else:
    print ("Test Passed")
    
Test_report(Test_Names,Test_Results)    

results from Ipython console in spyder

runfile('C:/python/TestsSeq/Test Seq by function.py', wdir='C:/python/TestsSeq')
Running Component Test
component  TestResult:         Pass
Running Electical Test
electrical  TestResult:         Pass
Running Optical Test
optical  TestResult:         Pass
Running OE Test
OE  TestResult:         Fail*
Running EO Test
EO  TestResult:         Pass
['component', 'electrical', 'optical', 'OE', 'EO']
['Pass', 'Pass', 'Pass', 'Fail*', 'Pass']

*Overall Result: Failed
Check for Failure or Imcomplete

==========================
===== Test Report ========
==========================
TestName        TestResult                    
********        **********                    
component       Pass                          
electrical      Pass                          
optical         Pass                          
OE              Fail*                         
EO              Pass                          

Notes:

  • This presentation is to show a possible starting point for python Testing using functions and calling functions via a function list.
  • This post is not connected or endorsed by any company.
  • All company names are trademark of respective company.
  • Created to spark ideas on the subject.
  • Use at your own risk.

Posted in Test Sector | Tagged , , , , | Leave a comment

LV Random number tools (two shown) (0-100)

Two tools are used to create random number (0-100) but only one is what I wanted.

Notes

•Presentation to show two different random tools using LabVIEW®

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW is a NI (National Instruments) product

•Presentation app: Microsoft’s PowerPoint

•Image app used Microsoft’s “Paint” and Microsoft’s “Paint 3D”

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

•Tags:  LabVIEW®, Random, Randomize

•There are many ways to do things for the desired outcome.

Posted in Test Sector | Tagged , , | Leave a comment

Finding Exponent that best matches a exponent type data set in LV base version – two methods – (one setup , Focus Targeting- Coarse-Fine).

Labview(r) base version does not have fitting functions so using this time to show two methods (one setup , Focus Targeting- Coarse-Fine).

The 2nd method will result in reduce steps counts

One setup for the required resolution (499 steps)

Focus Targeting- Coarse fine (26 steps)

Notes

•Presentation to show two method to find closest exponent to match a power type data set. (showing how method two is quicker)

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW® 2019 Base version does not have fitting function that are available in other versions

•LabVIEW is a NI (National Instruments) product

•Presentation app: Microsoft’s PowerPoint

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

Tags:  LabVIEW®, Formula, Arrays, Coarse-Fine steps, Focusing on Target answer, Number of Decimal Points

Posted in Test Sector | Tagged , , , , , | Leave a comment

LV 2D Array ( Add, Insert, Delete)

Showing some common 2D Array Operations) in LabVIEW(R)

Notes

•Presentation shows some common 2D Array operation (Add, Insert, Delete)

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW is a NI (National Instruments) product

•Presentation app: Microsoft’s PowerPoint

•Image app used Microsoft’s “Paint”

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

Tags:  LabVIEW®, Array , 2D Array , Array Insert, Array, Transpose

Posted in Test Sector | Tagged , , , , , , , , | Leave a comment

Excel(r) create cell reference from Concatenated Text

Turning a Concatenated Text to a cell reference.

Notes

•Presentation of Creating a cell reference from a created Text

•Excel ® used is a Microsoft product

•Presentation app: Microsoft’s PowerPoint

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

• Tags: Excel, RANDBETWEEN, CONCATENATE, INDIRECT

Posted in Test Sector | Tagged , , , , , | Leave a comment

LV Picture functions – Space ship payload control example

Using a combination of images and picture functions to create a simulation of a space ship putting payload on a space truck

Notes

•Presentation to show use of Picture function using LabVIEW®

•Programming Language used: LabVIEW® 2019 Base version

•LabVIEW is a NI (National Instruments) product

•Presentation app: Microsoft’s PowerPoint

•Image app used Microsoft’s “Paint” and Microsoft’s “Paint 3D”

•Presentation shown to spark ideas of use.

•This presentation is not connected to or endorsed by any company.

•Use at your own risk.

•Tags:  LabVIEW®, Picture functions, Read Image ,Space ship, space truck, transparent images

•Possible improvement needed : Protect for space truck if cable to to low before arriving to payload area

Simulation shown as example, Not a real event.

Posted in Test Sector | Tagged , , , , , | Leave a comment