VeriStand .NET API Reference

AlarmFolder.AddNewAlarm Method

Adds a new Alarm with the specified name, description, and configuration to the AlarmFolder.

Namespace: NationalInstruments.VeriStand.SystemDefinitionAPI
Assembly: NationalInstruments.VeriStand.SystemDefinitionAPI (in NationalInstruments.VeriStand.SystemDefinitionAPI.dll) Version: 2013.0.0.0 (2013.0.0.0)
Visual Basic (Declaration)
Public Function AddNewAlarm ( _
	Name As String, _
	Description As String, _
	AlarmSource As Channel, _
	UpperLimit As ValueSource, _
	LowerLimit As ValueSource, _
	AlarmAction As Procedure, _
	Mode As AlarmMode, _
	DefaultState As AlarmState, _
	GroupNumber As UInteger, _
	PriorityNumber As UInteger, _
	Delay As Double, _
	TripMessage As String _
) As Boolean
C#
public bool AddNewAlarm(
	string Name,
	string Description,
	Channel AlarmSource,
	ValueSource UpperLimit,
	ValueSource LowerLimit,
	Procedure AlarmAction,
	AlarmMode Mode,
	AlarmState DefaultState,
	uint GroupNumber,
	uint PriorityNumber,
	double Delay,
	string TripMessage
)
Visual C++
public:
bool AddNewAlarm(
	String^ Name, 
	String^ Description, 
	Channel^ AlarmSource, 
	ValueSource UpperLimit, 
	ValueSource LowerLimit, 
	Procedure^ AlarmAction, 
	AlarmMode Mode, 
	AlarmState DefaultState, 
	unsigned int GroupNumber, 
	unsigned int PriorityNumber, 
	double Delay, 
	String^ TripMessage
)

Parameters

Name
Type: System.String
The name of the Alarm.
Description
Type: System.String
The description of the Alarm.
AlarmSource
Type: NationalInstruments.VeriStand.SystemDefinitionAPI.Channel
The channel to monitor for alarm conditions.
UpperLimit
Type: NationalInstruments.VeriStand.SystemDefinitionAPI.ValueSource
The channel or constant that determines the high limit value of the alarm. If the value of AlarmSource exceeds this limit, the alarm is triggered.
LowerLimit
Type: NationalInstruments.VeriStand.SystemDefinitionAPI.ValueSource
The channel or constant that determines the low limit value of the alarm. If the value of AlarmSource falls below this limit, the alarm is triggered.
AlarmAction
Type: NationalInstruments.VeriStand.SystemDefinitionAPI.Procedure
The Procedure to initiate when the alarm occurs.
Mode
Type: NationalInstruments.VeriStand.SystemDefinitionAPI.AlarmMode
The AlarmMode.
DefaultState
Type: NationalInstruments.VeriStand.SystemDefinitionAPI.AlarmState
The default AlarmState.
GroupNumber
Type: System.UInt32
The number of the group to which the Alarm belongs.
PriorityNumber
Type: System.UInt32
The priority of the alarm running on the target. Lower numbers specify a higher alarm priority. For example, 4 is higher priority than 31.
Delay
Type: System.Double
The amount of time to wait before triggering the alarm.
TripMessage
Type: System.String
The message to display when the alarm is tripped.

Return Value

true (True in Visual Basic) if the Alarm was added successfully.

See Also

Log in to get a better experience