VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

stop signal generation when exiting workspace

Hi !

I'm currently using Veristand to generate analog signals using a PXI target and a 7831R FPGA board.

I created a new workspace and used example sinewave(.dll) model to generate my signal. The output of the model is then linked to AO0 of FPGA device.

I noticed that the signal generate starts as soon as the system configuration is deployed and do not stop when stoping the workspace.

One solution to avoid the system generating signal when system is deployed is to set the model initial values to 0.

But how to stop the signal generation when exiting the workspace ? is there any better solution than modifying the initial values to avoid the system generating signals before running the workspace ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 4
(7,076 Views)

Do you want the VeriStand Engine to stop running completely when you disconnect the Workspace? If you do want the VeriStand Engine to continue running on the target when the Workspace disconnects, what should it do if it no longer drives the analog output using the model value?

 

There are a number of ways to accomplish this, but I'd like to learn more about what you want to do first.

Jarrod S.
National Instruments
0 Kudos
Message 2 of 4
(7,072 Views)

Hello Jarrod,

 

In my opinion, VeriStand engine could continue running on the target when the Workspace disconnects, but signal generation/acquisition should be stopped. Indeed, most final users do not understand that a program can continue running without any HMI running.

I guess that a custom device could disable signal generation on workspace disconnection, but is there any way to do it without creating such custom device ? 

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 4
(7,065 Views)

In this case your model is doing signal generation. But in the case where a model is performing a control algorithm, it might be very bad if the model would ever stop running simply because the Workspace disconnects.

 

In your case there are various ways to set up your VeriStand Engine to stop or disable a model when the Workspace disconnects.

 

Here is one idea:

  1. There is a System Channel called Host IP. This is the 4 byte numeric value of the IP Address of the host computer (Workspace) currently connected to the VeriStand Engine. If nothing is connected, this value is zero.
  2. You can set up an alarm in System Explorer to monitor this Host IP to check if it ever equals zero..
  3. If this alarm ever triggers, it can execute a Procedure that can stop the model. You can stop a model by setting its Model Command channel to value 2. This resets the model.
  4. You can then set up an alarm to start the model again if the Host IP becomes non-zero, or you can manually start the model using a Model Workspace Control.
Jarrod S.
National Instruments
0 Kudos
Message 4 of 4
(7,059 Views)