WMKGetDscAlarmPriority Script Function

WMKGetDscAlarmPriority Script Function

Introduction

The DscTagAlarmPri script function library consists of two files:

  • dll
  • wdf

The DLL contains one script function that can be used to determine the alarm priority of an InTouch tag. The tagname is passed as an argument to the function.

Download the DscTagAlarmPri.zip file from the WeMadeKit Site.

  1. Unzip the zip file.
  2. Copy the dll and DscTagAlarmPri.wdf files and place them in your InTouch™ Install directory.
    • The functions will then be available from scripts when running WindowMaker.

Library Function

This library consists of one script function:

  • WMKGetDscAlarmPriority( Tagname )


WMKGetDscAlarmPriority( Tagname )

This function is used to retrieve the alarm priority of a discrete tag. The function requires the tagname to be provided as an argument. The tagname can be passed to the function directly or as the contents of a message tag.

The function returns value corresponding to the tag type as follows:

  • 1~999 -:- The alarm priority
  • 0 -:- Alarm priority not setted
  • -1 -:- Invalid tagname
  • -2 -:- Read tag info fail
  • -3 -:- Not a discrete tag

The argument for this function is not case sensitive. Alarm priority not setted is that the tag’s Alarm is not setted. An invalid tagname will be returned if the string value passed to the function is not the name of a tag contained within the InTouch tagname dictionary. A read tag info fail will be returned if the function read the tagname information fail. A not a discrete tag will be returned if the tag type is not discrete.

Examples:

AlarmPri = WMKGetDscAlarmPriority( “MyTagname” )

AlarmPri = WMKGetDscAlarmPriority( MessageTag )

 

For technical support questions, send an e-mail to us.

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 2 =