Creating a Background Task in VeriStand

Tags: Software

You can create a periodic background task to perform various tasks on the real-time controller by creating a low priority alarm with a delay and it limits always tripped.

Below is an example (using System Explorer).  An alarm called BackgroundTaskAlarm is defined having an upper limit of -1.000 and a lower limit of 1.000. This causes the alarm to continually trip, but by setting the Delay Duration (sec) to 1.000 seconds, the alarm will trip once a second and thereby run its alarm action every second. It is also important to assign a priority that is not being used by actual alarms; in this case I chose a priority of 5. This example creates a new procedure called MyBackGroundTask which is where you add any procedure steps you want to execute for this task.

wti_vs_background.png

Next we want to make sure this background task doesn’t interfere with actual alarms, so we move the alarm to a group that doesn’t have any important alarms in it. The group window is accessed by clicking on the Alarms parent in System Explorer – simply drag you alarm’s red bar to the desired group.

wti_background_2.png

The last thing we need to do is configure our Alarm Responses in the project. We need to make sure any existing Alarm Responses do not show a dialog for our priority and do not produce log every time the alarm trips (unless that is desired). An example Alarm Response is shown below, but you may also have to edit any existing ones so they don’t include your alarm priority.

wti_background_3.png

Want to learn more about using INERTIA? Fast-track your knowledge of INERTIA software with this video library, including six video tutorials specifically designed to help a new user get accustomed to the interface, features, and tools.

ACCESS VIDEO LIBRARY

About Genuen

Our goal is to improve time to market without compromising product quality or safety standards. With experience in mission-critical applications and regulatory compliance, Genuen creates custom test systems across the product lifecycle, including hardware-in-the-loop (HIL), fluid power test, and electromechanical test. Headquartered near Kansas City, we have offices across the United States and serve clients in aerospace, transportation, national security, and beyond. The company's Quality Management System (QMS) is certified to ISO 9001.