NI VeriStand provides an advanced stimulus profile tool for creating real-time test sequences. In addition to step-based profiles, you can create complex real-time stimulus profiles that include decision making, subsequences, and a variety of programming constructs. These elements combine to offer a flexible environment for conducting real-time tests. This paper introduces both the NI VeriStand Stimulus Profile Editor environment and some of the functionality that is commonly used when creating real-time stimulus profiles.
NI VeriStand Stimulus Profile Editor è un eseguibile da aprire e configurare all'esterno di NI VeriStand, in questo modo è possibile creare profili di test in parallelo con le definizioni di sistema e le interfacce utente in NI VeriStand. NI VeriStand Stimulus Profile Editor è formato da due componenti: sequenze real-time e profili di stimolo. La separazione di questi componenti permette la riusabilità delle sequenze di test e offre stretta integrazione con le definizioni di sistema NI VeriStand per i test individuali.
Uno dei componenti principali dei profili di stimolo real-time è la sequenza real-time. Le sequenze di test sono rilasciate su NI VeriStand Real-Time Engine e possono includere una vasta gamma di costrutti di programmazione. Le funzioni includono While Loops, For Loops, variabili e statement condizionali. Inoltre, è possibile creare subsequenze e impostare multitasking all'interno della sequenza di test.
Figura 1. Costrutti di programmazione di NI VeriStand Stimulus Profile Editor
Oltre ai costrutti di programmazione come ad esempio looping e condizionali, le sequenze real-time sono in grado di generare forme d'onda comunemente utilizzate come ad esempio onde sinusoidali e a dente di sega. Inoltre, è possibile creare forme d'onda e segnali più complessi utilizzando funzioni ed espressioni matematiche.
Figura 2. Sequenze disponibili ed espressioni matematiche
Una sequenza di test real-time si divide in tre sezioni: Setup, Main, e Cleanup. Setup è utilizzata per stabilire le condizioni iniziali all'interno di una sequenza. Solitamente include variabili per l'impostazione a determinati stati iniziali oppure per misure di sistema preliminari. Nella sezione Main si genera la maggior parte dello stimolo e si conducono test specifici. Dopo aver eseguito i test, si esegue Cleanup per riportare il sistema di test ad uno stato conosciuto per i test futuri.
Figura 3. Esempio di sequenza real-time
Il secondo componente è il profilo di stimolo. Il profilo di stimolo funziona come un'esecuzione di test in grado di chiamare sequenze di test real-time, aprire e chiudere progetti NI VeriStand e realizzare data-logging e analisi pass/fail. Inoltre, permette di connettere sequenze di test a definizioni di sistema per collegare i dati del canale all'interno della definizione di sistema a variabili nella sequenza di test real-time.
Come nelle le sequenze di test real-time, i profili di stimolo includono le sezioni Setup, Main e Cleanup. Nel caso dei profili di stimolo, le sezioni Setup e Cleanup sono utilizzate per realizzare task come ad esempio data logging e aprire e chiudere progetti NI VeriStand. Questo permette l'automazione di test e facilita la transizione da un tipo di test ad un altro senza dover interagire manualmente nel workspace di NI VeriStand.
La sezione Main del profilo di stimolo è spesso utilizzata per chiamare le sequenze di test real-time, e per chiamare sequenze di test multiple, in modo da eseguire test multipli senza dover passare manualmente da sequenza a sequenza. La separazione delle sequenze real-time dai profili di stimolo permette di creare librerie di sequenze che possono essere utilizzate su diversi profili e e condivise tra diverse stazioni di test. In Figura 4 è illustrato un esempio di profilo di stimolo che include data logging e chiamate a una serie di sequenze di test real-time.
Figura 4. Esempio di profilo di stimolo
Una volta creato un profilo, è possibile distribuirlo su un target real-time basato sulla definizione di sistema prescelta. Questo profilo è quindi eseguito sul target real-time, e lo stato corrente del profilo è visualizzato sulla finestra del profilo sul computer host con Windows. I log vengono poi memorizzati nel percorso del file selezionato.
Tutorial video su NI VeriStand
Scopri come creare profili di stimolo real-time con il corso di formazione NI VeriStand
One of the main components of real-time stimulus profiles is the real-time sequence. Test sequences are deployed to the NI VeriStand Real-Time Engine and can feature a wide array of programming constructs. The functions include While Loops, For Loops, variables, and conditional statements. You can also create subsequences and establish multitasking within your test sequence.
Figure 1. An Outline of Programming Constructs of the NI VeriStand Stimulus Profile Editor
In addition to programming constructs such as looping and conditionals, real-time sequences can generate commonly used waveforms such as sine waves and sawtooth waves. You can also create more complex waveforms and signals by using mathematical functions and expressions.
Figure 2. Available Sequences and Mathematical Expressions
A real-time test sequence is broken into three sections: Setup, Main, and Cleanup. Setup is used for establishing initial conditions within a sequence. Most often this includes setting variables to desired initial states or taking some preliminary system measurements. The Main section is where the majority of the stimulus is generated and where specific tests are conducted. After the main tests have run, Cleanup runs to put the test system in a known state for future tests.
Figure 3. An Example of a Real-Time Sequence
The second component is the stimulus profile itself. The stimulus profile acts as a test executive that can call real-time test sequences, open and close NI VeriStand projects, and perform data-logging and pass/fail analysis. It also connects real-time test sequences to system definitions to bind channel data within the system definition to variables in the real-time test sequence. To learn more about using the Stimulus Profile Editor to control an NI VeriStand project, watch our video about creating VeriStand real-time stimulus profiles.
Much like real-time test sequences, stimulus profiles contain Setup, Main, and Cleanup sections. In the case of stimulus profiles, Setup and Cleanup are often used to perform tasks such as data logging and opening and closing NI VeriStand projects. This enables test automation and helps you transition from one type of test to another without having to manually interact with the NI VeriStand workspace.
The Main section of the stimulus profile is often used to call real-time test sequences. It can call multiple real-time sequences, so you can run multiple tests without having to manually switch from sequence to sequence. With the division of real-time sequences from stimulus profiles, you can create libraries of sequences that can be used across multiple profiles and shared among multiple test stations. Figure 4 shows an example of a stimulus profile that includes logging data and calling a series of real-time test sequences.
Figure 4. An Example Stimulus Profile
Once you have created a profile, you can deploy it to a real-time target based on the system definition that you have chosen. This profile is then run on the real-time target, and the current state of the profile is displayed in the profile window on the Windows host computer. Logs are then stored in the selected file path.
In addition to deploying real-time sequences, the Stimulus Profile Editor can be used to perform test automation by replaying data stored in CSV files or by playing back user-constructed macros that were built using the NI VeriStand Macro Recording Tool.
Learn how to create and configure real-time testing applications using VeriStand for high-speed data acquisition, automotive networks, and FPGA-based reconfigurable I/O. This video includes a hardware overview as well as an introduction to creating a VeriStand project. You will learn how to use the System Configuration File to import devices, networks, custom plug-in code, and more. Additionally, the video teaches you how to add and customize DAQ channels for high-speed waveform or single-point input and how to create or import measurement scales.