Please enable JavaScript to view this site.

Text file that contains user alarms generated by application using the ALARM_SET instruction.

In contrast to the system alarms file, the contents of this file are the responsibility of the user.

From RTE 34.20.3 such a file is also used to configure messages that are not placed in the alarm stack but only in the history. Use the ah_log and ah_log_us functions.

In case the user alarm contains parameters, these can be of two types:

non-positional: the first parameter in the string is equivalent to parameter 1, the second to parameter 2, and the third to parameter 3

positional: there is a possibility to define in the text of the alarm the parameter number regardless of the position. It is defined by placing after the % character the parameter number (1, 2, 3) followed by the $ character (from RTE 34.24.6, see example 2)

NOTE: Positional and non-positional parameters cannot be defined in the same alarm.

NOTE: For RTE handling of user and system alarm files, see chapter Alarms: user files in RTE configuration.

File structure

It is an ASCII format file in which texts are defined using the following syntax:

Syntax

nnnn iAM iB flags "text" p1k p2k p3k

nnnn

User alarm number:

major: 1000-:-1999

minor: 3000-:-3999

warnings: 4000-:-8999

messages: 10000-:-11999

iAM

Index of AM variable to be used:

-1 -> Axis alarm, the axis number will be used as the index of AM (1÷32). If you do not want the alarm to also be stored in the AMs put index -1 in the next parameter (iB)

0 -> Used necessarily in the case of messages

37-:-40 -> User major alarms (1000÷1999)

45-:-48 -> User minor alarms (3000÷3999)

53-:-63 -> User warnings (4000÷8999)

iB

Selection of the bit associated with the alarm:

-1 -> Disable storage of alarm within AM. Also used necessarily in the case of messages

0-:-9 -> if iAM = -1 (i.e. axis alarm) bits reserved for system for major alarms (stored as such in ax_in_alarm parameter). If iAM <> -1 Bits available to user

10-:-15 -> if iAM = -1 (i.e. axis alarm) Bits reserved for user for major alarms (stored as such in ax_in_alarm parameter). If iAM < > -1 Bits available to user

16-:-23 -> if iAM = -1 (i.e. axis alarm) Bits reserved for minor axis alarms. If iAM <> -1 Bits available to user

24-:-31 -> if iAM = -1 (i.e. axis alarm) Bits reserved for warnings. If iAM <> -1 Bits at user disposal

flags

Descriptive mask of alarm or message type (for exclusive use of alarm history).

Refer to documentation of predefined variable ah_filter for meaning of individual bits

text

Text of the alarm or message.

The maximum size is 63 bytes; if you exceed the size the alarm will be stored incomplete and you will have a message in the report.

Up to three variables can be specified for display (see Instruction R3 alarm_set and alarm_set_us).

The codes to identify the variables are as follows:

%d Integer variable signed - Decimal representation

%u Integer variable unsigned - Decimal representation

%x Integer variable - Hexadecimal representation

%f Real variable

%g Real variable

%s String variable. Maximum size is 63 bytes and can be of type:

ouser string (TABSTR); in this case the construct must be added to the file:

TABSTR_USER n ; maximum number of elements in the table

"string 1" ; this is index 0

"string 2" ; this is index 1

"string n" ; this is index n-1

ENDTAB

ouser string (USV)

NOTE: To enable the use of user strings as parameters of an alarm you must enable the option from project configurator "settings->general->alarms->settings" and the keyword enable_user_string_management_in_ah must be present in rte.cfg.

p1k,p2k,p3k

Parameter type 1/2/3 (optional):

0 -> No parameters

-1 -> I8

1 -> U8

-2 -> I16

2 -> U16

-4 -> I32

4 -> U32

8 -> Real

10 -> TID (internal use) (%s)

11 -> PowerSet Name (%s)

12 -> PowerSet Axes (%d)

13 -> Axes group name (%s)

15 -> TABSTR String (%s)

16 -> Axis Name (%s)

17 -> String User Variable USV (%s)

NOTE: Refer to the str_format instruction specification for more information regarding formalism.

Since RTE 34.27.8, the possibility to associate a name with an axis and use it in the description of alarms has been added.

To use the axis name in alarms, the following steps should be taken:

In the string text use '%s' as the parameter type.

The parameter code to be set is 16

When generating the alarm, pass as a parameter the axis number whose name is desired

To associate the name with the axis number you can use the ascii directive AXIS_NAME in the file(GET AXIS_NAME to read it) (see example 3 below):

AXIS_NAME 1 "nameAxis" ; associated name to axis 1

AXIS_NAME 2 "nameAxis" ; associated name to axis 2

Note: Using Siemens drives the name is already associated using the module name.

Example 1

Example 2

Example 3

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC