Commit 7e41f3ab authored by Claes Sjofors's avatar Claes Sjofors

xtt_help.dat moved to language specific directories

parent 235a527e
<topic> __DocumentTitlePage
<image> pwr_logga.gif
<h1> Xtt
<h2> User's Guide
<hr>
Claes Sjöfors 2004-12-15
Version 4.0.0
<hr>
</topic>
<topic> __DocumentInfoPage
Copyright (C) 2008 SSAB Oxelösund AB
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
</topic>
<chapter>
<TOPIC> overview
Xtt overview
<image> pwr_logga.gif
<h1>Xtt Overview
<B>Navigator <LINK> navigator
<B>Operator window <LINK> operator window
<B>Alarmlist <LINK> alarmlist
<B>Eventlist <LINK> eventlist
<B>Blocked alarms <LINK> blocklist
<B>Trace <LINK> trace
<B>Graph windows <LINK> graph window
<B>Commands <LINK> help command
<B>Script <LINK> script
<B>Helpfile <LINK> helpfile
<B>Classes <LINK> classes
<B>Index <INDEX>
</TOPIC>
</chapter>
//
// Navigator
//
<chapter>
<TOPIC> navigator
Xtt navigator
The navigator, also called Xtt, is started from the "Navigator" button
in the operator window.
The navigator you navigate in a tree stucture, usually the realtime
database, but there is also a tree menu from which different pictures and
functions is opened. This menu is configurable and might differ from system
to system.
A tree item consists of one or several icons, an object or function name,
and an optional description.
The standard menu of Xtt is displayed below.
Navigate with the mouse. <LINK> navigate mouse
Navigate with the keyboard. <LINK> navigate keyboard
Icons <LINK> xtt_icons
Menu <LINK> xtt_menu
</TOPIC>
<TOPIC> xtt_icons
Xtt Icons
<h1>Menu icons
<b>Map
<image> xtthelp_icon_map.gif
A menu item that can be opened.
<b>Open map
<image> xtthelp_icon_openmap.gif
A menu item that is open.
<b>Leaf
<image> xtthelp_icon_leaf.gif
A menu item that cannot be opened.
<b>List
<image> xtthelp_icon_list.gif
A menu item that displays a list.
<b>Script
<image> xtthelp_icon_script.gif
A menu item that executes a script.
<b>Graph
<image> xtthelp_icon_graph.gif
A menu item that opens a graph.
<H1>Database
<b>Map
<image> xtthelp_icon_map.gif
An object that has children.
<b>Open map
<image> xtthelp_icon_openmap.gif
An who's children are shown.
<b>Leaf
<image> xtthelp_icon_leaf.gif
An object without children.
<b>Attribute
<image> xtthelp_icon_attribute.gif
An ordinary attribute of type Float32, Int32 etc.
<b>Array attribute
<image> xtthelp_icon_array.gif
An array attribute
<b>Enum attribute
<image> xtthelp_icon_enum.gif
An attribyte of type Enum.
<b>Mask attribute
<image> xtthelp_icon_mask.gif
An attribute of type Mask.
<b>Attribute object
<image> xtthelp_icon_object.gif
An attribute that is an object.
<H2>Alarm info
<b>Alarm
<image> xtthelp_icon_alarmdown.gif
The objects has a descendent with an alarm.
<image> xtthelp_icon_alarmright.gif
The object has an alarm.
<b>Alarm blocking
<image> xtthelp_icon_blockdown.gif
Alarm blocking is set for a descendent of the object.
<image> xtthelp_icon_blockright.gif
Alarm blocking is set for the object.
</TOPIC>
<TOPIC> navigate mouse
Navigate with the mouse
Select a map or object <t><t>ClickMB1
Open or close a map <t><t>ClickMB1 on the icon or DoubleClickMB1 on the text.
Open or close an object <t><t>Shift/ClickMB1 on the icon or Shift/DoubleClickMB1 on the name.
Open methods popup menu <t><t>PressMB3 on an object
</TOPIC>
<TOPIC> navigate keyboard
Navigate with the keyboard
Select a map or object <t><t>ArrowUp or ArrowDown.
Open a map <t><t>ArrowRight.
Close a map <t><t>ArrowLeft.
Open an object <t><t>Shift/ArrowRight.
Additional features for advanced users. <LINK> advanced user
Open an object <t><t>ArrowRight, if the object has no children.
Change attribute value <t><t>ArrowRight.
Open an object <t><t>Ctrl/A
Open class graph for an object <t><t>Ctrl/G
Open trace for a plcpgm. <t><t>Ctrl/L
Show crossreferences for an object. <t><t>Ctrl/R
Change attribute value. <t><t>Ctrl/Q
Add an object to the collect list. <t><t>Ctrl/W
Show collected objects. <t><t>Ctrl/N
Rtt compatible keys
Return <t><t>Open a item.
PF1 <t><t>Open an object.
PF2 <t><t>Show crossreferences for an object.
PF3 <t><t>Change attribute value.
PF4 <t><t>Close an item.
The PF-keys are not supported by some window managers.
</TOPIC>
<TOPIC> xtt_menu
Navigator menu
<b>File
Print <t><t>Print to postscript file, and send to printer.
Close <t><t>Close xtt.
<b>Edit
Search-Find Object <t><t>Find the first object with the supplied object name.
<t><t>The object name should be given without path.
Search-Find Regular expression <t><t>Find the first object whose name matches a
<t><t>regular expression.
Search-Find Next <t><t>Find the next object that matches the current search criteria.
Collapse <t><t>Close open maps.
<b>Functions
Open Object <t><t>Open the selected object in a separate window.
Open Plc <t><t>Open plc trace for the selected PlcPgm or Window object. <LINK> trace
Open ClassGraph <t><t>Open the classgraph or for the selected object,
<t><t>or the type graph for the selected attribute.
Show Crossreferences <t><t>Show crossreferences for the selected object, i. e. where i the
<t><t>plc code an object is referenced.
Change Value <t><t>Change the value of the selected attribute.
Command <t><t>Enter a command <LINK> help command
Collect Insert <t><t>Insert the selected object or attribute in the collection list.
Collect Show <t><t>Display the collection list.
Advanced User <t><t>Set advanced user. <LINK> advanced user
<b>View
ZoomIn <t><t>Increase the size of fonts and icons.
ZoomOut <t><t>Decrease the size of fonts and icons.
ZoomReset <t><t>Return to the original size.
<b>Help
Overview <t><t>Show this xtt help.
Project <t><t>Show the project specific help.
</TOPIC>
</chapter>
//
// Operator window
//
<chapter>
<TOPIC> operator window
Operator window
Help on operator window will soon be written...
</TOPIC>
<chapter>
<topic> events
Events
The operator dialog for Proview contains functions for alarm
indication and alarm acknowledgement.
An alarm may occur when for instance a signal has exceeded a
certain limit. The value of the signal is supervised in
respect of the limit value, by a special supervision object.
If the signal exceeds the limit, an alarm is generated.
</topic>
//
// Alarmlist
//
<headerlevel>
<TOPIC> alarmlist
Alarmlist
The Alarm List is started by activating the "Alarm List" button in
the operator window. You can also start it from the navigator menu or
with the xtt command 'show alarmlist'.
In the alarm list prevailing alarms are shown, both acknowledged and
unacknowledged. Unacknowledged alarms are marked with a bell. An alarm
is active as long as it is unacnowledged and the alarm condition i set.
An alarm in the alarm list is shown with:
- Color indicating the alarm priority
- Possible indication of unacknowledged alarm
- Event time
- Event text
- Event name (object/signal name)
<image> xtthelp_alarmlist1.gif
</TOPIC>
//
// Eventlist
//
<TOPIC> eventlist
Eventlist
The event list is started when the "Event List" button is activated in
the operator window. You can also start it from the navigator menu or
with the xtt command 'show eventlist'.
All events arriving at an operator station are shown in the event list.
The length of the list is configured in the User object, and when the
maximum length is reached, old events are dropped when new events arrive.
For each event the eventlist displays:
- Color indicating the alarm priority
- Event type
- Event time
- Event text
- Event name (object/signal name)
<image> xtthelp_eventlist1.gif
</TOPIC>
//
// Blocklist
//
<TOPIC> blocklist
Blocked alarms
The event list is started when the "Blocked Alarms" button is activated in
the operator window. You can also start it from the navigator menu or
with the xtt command 'show blocklist'.
All blocked objects are shown in the list.
Alarms for an object are blocked in the Alarm Blocking Window. <link> blockingwindow
For each event is displayed:
- Color indicating the alarm priority of the blocking
- Objectname
- User the blocked the alarms.
</TOPIC>
<TOPIC> blockingwindow
Alarm Blocking Window
The Alarm Blocking Window is opened from the object popup menu (method
"Block Alarms...", or with the xtt command 'eventlist block'.
The window is used to block alarm for an object. All alarms with the
specified priority and with less priority are blocked, for the object
and its descendants.
You can specify the priority of the alarm to block with radiobuttons.
Here you also remove a blocking with the, with the radiobutton
"No Blocking".
<image> xtthelp_blockw.gif
Only users with the privilege 'RtEvent' or 'System' are authorized to
block alarms.
</TOPIC>
</headerlevel>
</chapter>
//
// Trace
//
<chapter>
<TOPIC> trace
Trace
Help on trace will soon be written...
</TOPIC>
</chapter>
//
// Graph window
//
<chapter>
<TOPIC> graph window
Graph window
Help on graph window will soon be written...
</TOPIC>
</chapter>
<chapter>
<TOPIC> trendwindow
Trend Window
The Trend Window is opened from the object popup menu (method
"Trend", or with the xtt command 'open trend'.
The window displays a trend stored in a DsTrend objekt, or a number of trends
specified by a PlotGroup object.
<image> xtt_trendwindow.gif
The limits for the y-axis for a curve can be changed by double clicking
at the colored axis for that curve. A dialog box is opened where the
new minimum and maximum values are entered.
The limits for the x-axis are changed from the menu, 'View/X-axis limits'.
When 'View/Show names' in the menu is activated, the name of the signals
are displayed together with a colored checkbox for each signal. By clicking
on the checkbox, the curve can be hidden or viewed.
</TOPIC>
<TOPIC> fastwindow
Fast Curve Window
The Fast Curve Window is opened from the object popup menu (method
"Fast", or with the xtt command 'open fast'.
The window displays a trend stored in a DsTrend objekt, or a number of trends
specified by a PlotGroup object.
<image> xtt_fastwindow.gif
The limits for the y-axis for a curve can be changed by double clicking
at the colored axis for that curve. A dialog box is opened where the
new minimum and maximum values are entered.
The limits for the x-axis are changed from the menu, 'View/X-axis limits'.
When 'View/Show names' in the menu is activated, the name of the signals
are displayed together with a colored checkbox for each signal. By clicking
on the checkbox, the curve can be hidden or viewed.
</TOPIC>
</chapter>
//
// Commands
//
<chapter>
<topic> commands
Commands
Most functions in Xtt can be opened or affected by a command. There
are commands to open graphs, trends, trace, alarm and eventlist, to
set attributes in the database etc.
A command is executed from
- the xtt command line, opened from the menu or with ctrl/B.
- a button or menu item in a graph.
- a button in the operator window.
- a script file.
</topic>
<headerlevel>
<TOPIC> symbol
Symbol
A xtt symbol can be used as a short command or as string replacement
in a command. If the symbol is used as string replacement the symbol-
name should be surrounded by quotes.
Symbols are created with the define command. <LINK> define
The define-commands can be executed by the symbolfile. <LINK> symbolfile
Example of symbol used as a short command.
<c>xtt> define p1 "show child/name=hql-hvk-pumpar-pump1"
<c>xtt> p1
Example of symbol used as string replacement
<c>xtt> define p1 hql-hvk-pumpar-StartPump1
<c>xtt> open trace 'p1'
<H2>related subjects
define <LINK> define
show symbol <LINK> show symbol
symbolfile <LINK> symbolfile
</TOPIC>
<TOPIC> symbolfile
Symbol file
The symbolfile is a command-file that is executed att xtt startup.
It can contain definitions of symbols,
modification of the xtt menu, and other xtt commands.
Here is some examples of userful commands.
Shortcut to somewhere in the database hierarchy:
<c> define rb9 "show children /name=hql-rb9" <LINK> define
Shortcut to a graph:
<c> define my_graph "open graph my_graph"
Create items in the xtt menu.
<c> create item/text="Maintenance"/menu/destination="DataBase"/before <LINK> create item
<c> create item/text="My graph"/command="open graph my_graph"/pixmap=graph
<c> /dest=Maintenance/first
Remove items from the xtt standard menu.
<c> delete item /name=exit <LINK> delete item
<c> delete item /name=system-nethandler
</TOPIC>
<TOPIC> advanced user
Advanced user
The advanced user allow some key-combinations that
might confuse the unexperienced user.
Advance user is set from setup or <LINK> setup
with the command 'set advanceduser' <LINK> set advanceduser
Additional key's for advanced user
ArrowRight <t> Change attribute value.
</TOPIC>
<TOPIC> help command
Xtt commands
<b>add parameter<t>Add an attribute to a picture <LINK> add parameter
<b>add menu <t>Add a menu item to a xtt menu <LINK> add menu
<b>collect <t>Add an attribute to collect list <LINK> collect
<b>call method <t>Call a xtt method for an object <LINK> call method
<b>check method <t>Call a xtt method filter for an object <LINK> check method
<b>collect show<t>Show the collect list <LINK> collect show
<b>collect clear<t>Clear the collect list <LINK> collect clear
<b>close alarmlist <t>Close alarmlist <LINK> close alarmlist
<b>close eventlist <t>Close eventlist <LINK> close eventlist
<b>close graph <t>Close a graph <LINK> close graph
<b>close navigator <t>Close the navigator <LINK> close navigator
<b>create item <t>Create a menu item <LINK> create item
<b>crossreference<t>Show crossreferenses <LINK> crossreference
<b>exit <t>close xtt <LINK> exit
<b>define <t>Define a symbol <LINK> define
<b>delete item <t>Delete a menu item <LINK> delete item
<b>help <t>Display help <LINK> help
<b>login <t>User login <LINK> login
<b>logout <t>User logout <LINK> logout
<b>logging <t>Logg attributes to file <LINK> logging
<b>open graph <t>Open a graph <LINK> open graph
<b>open jgraph <t>Open a java graph <LINK> open jgraph
<b>open fileview <t>Open a fileview <LINK> open fileview
<b>open trend <t>Open DsTrend or PlotGroup graph <LINK> open trend
<b>open operatorwindow<t>Open the operator window <LINK> open operatorwindow
<b>read object <t>Read the content of an object from file <LINK> read object
<b>search <t>Leta efter object eller sträng <LINK> search
<b>set advanceduser<t>Set advanced user <LINK> set advanceduser
<b>set folder <t>Set a folder in a tabbed window. <LINK> set folder
<b>set parameter<t>Set the value of an attribute <LINK> set parameter
<b>setup <t>Xtt setup <LINK> setup
<b>show version<t>Show xtt version <LINK> show version
<b>show symbol <t>Show a symbol <LINK> show symbol
<b>show plcpgm <t>Show PlcPgm objects <LINK> show plcpgm
<b>show plcthreads<t>Show PlcThread objects <LINK> show plcthreads
<b>show links <t>Show links <LINK> show links
<b>show logfiles<t>Show rtt loggfiles <LINK> show logfiles
<b>show subsrv <t>Show subscription server <LINK> show subsrv
<b>show subcli <t>Show subscription client <LINK> show subcli
<b>show device <t>Show devices <LINK> show device
<b>show remnode<t>Show RemNode objects <LINK> show remnode
<b>show remtrans<t>Show RemTrans objects <LINK> show remtrans
<b>show database<t>Show the runtime database <LINK> show database
<b>show file <t>Show files <LINK> show file
<b>show graph <t>Show graph-files <LINK> show graph
<b>show time <t>Show current time <LINK> show time
<b>show default<t>Show default directory <LINK> show default
<b>show children<t>Show the children of an object <LINK> show children
<b>show object<t>Show the content of an object <LINK> show object
<b>show objid <t>Show object identity <LINK> show objid
<b>show parameter<t>Show an object attribute <LINK> show parameter
<b>show logging<t>Show a logging entry <LINK> show logging
<b>show eventlist<t>Show the event list <LINK> show eventlist
<b>show alarmlist<t>Show the alarm list <LINK> show alarmlist
<b>show user <t>Show current user <LINK> show user
<b>sound <t>Play a sound defined by a sound object <LINK> sound
<b>store <t>Store an attribute list in a file <LINK> store
<b>write object <t>Write the content of an object to file <LINK> write object
<H2>related subjects
script <LINK> script
</TOPIC>
<TOPIC> call method <style> function
Command call method
Call a xtt method for an object.
Xtt methods are usually activated from the popup menu for an object.
This is an additional way to activate a methods, from a command
pushbutton in a Ge graph.
<B>xtt> call method /method= /object=
/method= <t>the name of the method, i.e. the attribute ButtonName
<t>in the method definition.
/object= <t>the name of the object.
</TOPIC>
<TOPIC> check method <style> function
Command check method
Call a xtt method filter for an object.
Method filter are used to decide whether to display a method button or not.
This command is used to disable a method button in a Ge graph. It returns
the filter value to the caller.
It is only valid in a Ge graph.
<B>xtt> check method /method= /object=
/method= <t>the name of the method, i.e. the attribute ButtonName
<t>in the method definition.
/object= <t>the name of the object.
</TOPIC>
<TOPIC> add parameter <style> function
Command add parameter
Add an attribute to a list of attributes, and display the value of
the attribute.
A list of attributes will be created with the command 'show parameter',
and more attributes can be added to the list with 'add parameter'.
Object that matches the class, name and hierarchy description are displayed
on the screen.
<B>xtt> add parameter /parameter= /name= /class= /hierarchy=
/parameter= <t>the name of the parameter to be displayed.
/name= <t>the name of the object. Wildcard is allowed.
/class= <t>displays objects of this class.
/hierarchy= <t>displays objects below this object in the hierarchy.
<H2>related subjects
show parameter <LINK> show parameter
</TOPIC>
<TOPIC> show parameter <style> function
Command show parameter
Create a new list, add an attributes to the list, and display the value of
the attributes.
More attributes can be added to the list with 'add parameter'.
Object that matches the class, name and hierarchy description are displayed
on the screen.
<B>xtt> show parameter /parameter= /name= /class= /hierarchy=
/parameter= <t>the name of the parameter to be displayed.
/name= <t>the name of the object. Wildcard is allowed.
/class= <t>displays objects of this class.
/hierarchy= <t>displays objects below this object in the hierarchy.
<H2>related subjects
add parameter <LINK> add parameter
</TOPIC>
<TOPIC> set parameter <style> function
Command set parameter
Set the value of an attribute.
<B>xtt> set parameter /name= /value=
/name= <t>the name of the parameter to be set.
/value= <t>value to set.
/bypass= <t>Bypass any access restrictions.
</TOPIC>
<TOPIC> set folder <style> function
Command set folder
Set a folder in a tabbed window object.
<B>xtt> set folder 'graphname' /name= /index=
/name= <t>the name of the tabbedwindow object.
/index= <t>index of tab to set. Starting from 0.
</TOPIC>
<TOPIC> add menu <style> function
Command add menu
Add a menu item to the xtt menu hierarchy.
The menu is placed last in the current menu.
The action of the item can be to execute a xtt
command, or display the attributes of an object.
<B>xtt> add menu /text= /command=
<B>xtt> add menu /text= /object=
/text<t>Text of the menu item.
/command<t>Xtt command to be executed when the item is activated.
/object<t>Object that will be displayed when the item is activated.
<H2>related subjects
create item <LINK> create item
delete item <LINK> delete item
</TOPIC>
<TOPIC> collect <style> function
Command collect
Add an attribute to the collection list.
If the name qualifier is omitted the current
selected attribute will be collected.
<B>xtt> collect
<B>xtt> collect /name=
/name<t>Name of the attribute
Example
xtt> collect /name=hql-hvk-Start.ActualValue
<H2>related subjects
collect show <LINK> collect show
collect clear <LINK> collect clear
</TOPIC>
<TOPIC> collect show <style> function
Command collect show
Display the collect list.
<B>xtt> collect show
<H2>related subjects
collect <LINK> collect
collect clear <LINK> collect clear
</TOPIC>
<TOPIC> collect clear <style> function
Command collect clear
Clear the collect list.
<B>xtt> collect clear
<H2>related subjects
collect <LINK> collect
collect show <LINK> collect show
</TOPIC>
<TOPIC> create item <style> function
Command create item
Create a menu item in the xtt menu hierarchy.
The action of the item can be either to execute
a command, or to open a menu.
<B>xtt> create item /text= /command= /pixmap= /destination= /after /before /firstchild /lastchild
<B>xtt> create item /text= /menu /destination= /after /before /firstchild /lastchild
/text<t>Item text.
/command<t>Xtt command to be executed when the item is activated.
/menu <t>The item will display a menu.
/destination<t>The destination item. Can be the parent or a sibling.
/after <t>Positions the item after the destination item.
/before <t>Positions the item before the destination item.
/firstchild<t>Positions the item as first child of the destination item.
/lastchild<t>Positions the item as last child of the destination item.
/pixmap <t>Pixmap for the item: 'map', 'leaf', 'graph', 'list' or 'script'.
Example
xtt> create item /text="Motor1"/dest=Maintenance-Motors/command="open graph motor1"/first
<H2>related subjects
add menu <LINK> add menu
delete item <LINK> delete item
</TOPIC>
<TOPIC> crossreference <style> function
Command crossreference
Show crossreferences.
Crossreferences can be displayed for
- Signals.
- Object references with GetData.
- c-functions or strings used in the code of CArithm- or DataArithm-objects.
If qualifiers are omitted the selected object will be examined.
<B>xtt> crossreference
<B>xtt> crossreference /name=
<B>xtt> crossreference /function= [/brief]
<B>xtt> crossreference /string= [/brief]
/name <t> Name of an object.
/function<t>Name of a c-function referenced in CArithm or DataArithm.
/string <t> String that will be searched for in the code of CArithm- and DataArithm-object.
Examles
xtt> cross /name=hql-hvk-Start
xtt> cross /function="CreateHvkObject"
</TOPIC>
<TOPIC> exit <style> function
Command exit
Close xtt.
<B>xtt> exit
</TOPIC>
<TOPIC> define <style> function
Command define
Define a symbol.
<B>xtt> define 'symbolname' 'text'
<h2>related subjects
symbol <LINK> symbol
show symbol <LINK> show symbol
symbolfile <LINK> symbolfile
</TOPIC>
<TOPIC> delete item <style> function
Command delete item
Delete a menu item.
The menu item can be created by the user or an item of
the xtt standard configuration.
<B>xtt> delete item /name=
/name<t>Name of the menu item.
Example
xtt> delete item /name=exit
<H2>related subjects
add menu <LINK> add menu
create item <LINK> create item
</TOPIC>
<TOPIC> help <style> function
Command help
Display help information for a subject.
The help information will be searched for in a help file. The
file can be the base helpfile, the project helpfile or another
help file.
If no helpfile is supplied the subject will be searched
for in the base and project helpfiles.
<B>xtt> help 'subject' [/popnavigator] [/bookmark=] [/helpfile=]
<B> [/returncommand=][/width=][/height=]
/popnavigator <t>The help window (the navigator) will be displayed on top of
<t>the other window and gain input focus. This is useful if
<t>the command is used in a ge graph.
/bookmark <t>The name of a bookmark inside the topic. The display will
<t>be positioned at the bookmark.
/helpfile <t>A help file that contains information of the help subject.
/returncommand <t>A command that is executed when returning from the help
<t>subject. This i usually used to return to a main topic when
<t>help is called from a command button in a ge picture.
/width <t>Desired width of the help window.
/height <t>Desired height of the help window.
<H2>related subjects
helpfile <LINK> helpfile
</TOPIC>
<TOPIC> login <style> function
Command login
Login with username an password. The privileges of the user will be
fetched from the user database, and affect the access to the system.
<B>xtt> login 'username' 'password'
<H2>related subjects
logout <LINK> logout
</TOPIC>
<TOPIC> logout <style> function
Command logout
Logout a user, and return to the original user.
<B>xtt> logout
<H2>related subjects
login <LINK> login
</TOPIC>
<TOPIC> open graph <style> function
Command open graph
Open a ge graph. The graph can be supplied as a pwg-file or as
a XttGraph object.
<B>xtt> open graph 'filename' /width= /height= /scrollbar /menu /navigator
<B> /instance= /focus= /inputempty
<B>xtt> open graph /object= /focus= /inputempty
/width <t>Width in pixel.
/height <t>Height in pixel.
/scrollbar<t>Scrollbars will be displayed in the graph window.
/menu <t>A menu will be displayed in the graph window.
/navigator<t>A navigator window will be opened.
/object <t>A XttGraph-object. If the namestring begins with '*', * is
<t>replaced by the node object.
/instance <t>Open the class graph for this instance.
/focus <t>Name of a value input object. The object will gain input focus
<t>when the graph is opened.
/inputempty <t>The input label of the input focus object will be empty.
</TOPIC>
<TOPIC> open jgraph <style> function
Command open jgraph
Open a java frame. The java frame can be exported from Ge or drawn in
JBuilder.
<B>xtt> open jgraph 'name'
</TOPIC>
<TOPIC> open fileview <style> function
Command open fileview
Opens a fileview that displays files that matches the specified pattern.
The fileview can be opened in 'Open File' or 'Save File' mode.
In open mode, a file is selected and the selected filename is written to a
string attribute in the database (target). Simultaneously a digital attribute is
set (trigger) to indicate that an open should be performed. The actual opening
can be done by a DataFRead object in th plc, but have to be programmed by the user.
In save mode, a file is selected, or a filename is entered. The filename is
written to a string attribute and a digital signal is set. The actual save
can be performed by a DataFWrite object in the plc.
<B>xtt> open fileview /file= /target= /trigger= /type=save [/ftype=]
<B>xtt> open fileview /file= /target= /trigger= /type=open
/file <t>File pattern, containing wildcard '*', for files that is to be viewed
<t>in the fileview.
/ftype <t>Default file type for input file. If an entered filename (in save mode)
<t>doesn't contain a filetype, the default filetype will be added to the filename.
/target <t>String attribute where the selected filename will be stored.
/trigger <t>Boolean attribute that is set to indicate that a save or open should
<t>be performed.
/type <t>'save' or 'open'
<b>Example
open fileview /file="$pwrp_load/*.txt"/ftype="txt"/target=P1-Sv.ActualValue/trigger=P1-Dv.ActualValue/type=save
</TOPIC>
<TOPIC> open trace <style> function
Command open trace
Open trace for a plc window. If the name qualifier is omitted,
trace will be opened for the selected PlcPgm or PlcWindow.
<B>xtt> open trace [/name=] [/center=]
/name <t>PlcPgm or PlcWindow.
/center <t>Object in the plc-window that will be centered and selected.
<t>Use the last segment of the name.
Examples
xtt> open trace /name=hql-hvk-flow /center=Pid0
</TOPIC>
<TOPIC> open trend <style> function
Command open trend
Open a graph for a DsTrend or PlotGroup object.
<B>xtt> open trend [/name=] [/title=]
/name <t>DsTrend or PlotGroup. Can be a list of DsTrend-objects separated
<t>by comma.
/title <t>Title of graph window.
Examples
xtt> open trend /name=hql-hvk-flow-Trend,hql-hvk-temperature-Trend
</TOPIC>
<TOPIC> open operatorwindow <style> function
Command open operatorwindow
Open the operatorwindow.
<B>xtt> open operatorwindow 'opplace-object'
</TOPIC>
<TOPIC> close graph <style> function
Command close graph
Close a ge graph. The graph can be supplied as a pwg-file or as
a GeGraph object.
<B>xtt> close graph 'filename' /instance=
<B>xtt> close graph /object=
/object <t>A XttGraph-object. If the namestring begins with '*', * is
<t>replaced by the node object.
/instance <t>Open the class graph for this instance.
</TOPIC>
<TOPIC> close alarmlist <style> function
Command close alarmlist
Close the alarmlist.
<B>xtt> close alarmlist
</TOPIC>
<TOPIC> close eventlist <style> function
Command close eventlist
Close the eventlist.
<B>xtt> close eventlist
</TOPIC>
<TOPIC> close navigator <style> function
Command close navigator
Close the navigator.
<B>xtt> close navigator
</TOPIC>
<TOPIC> search <style> function
Command search
Search for an objectname or a string.
<B>xtt> search 'object'
<B>xtt> search /regularexpression 'expression'
<B>xtt> search /next
</TOPIC>
<TOPIC> read object <style> function
Command read object
Read the content of an object from file.
Reads the content of a file, normally created by command 'write object',
and insert the value into the specified object.
<B>xtt> read object /object= /file=
/object <t>Name of object.
/file <t>Name of file to read from.
</TOPIC>
<TOPIC> set advanceduser <style> function
Command set advanceduser
Set or reset advanced user.
<B>xtt> set advanceduser
<B>xtt> set noadvanceduser
<H2>related subjects
advanced user <LINK> advanced user
</TOPIC>
<TOPIC> setup <style> function
Xtt setup
Setup of xtt properies
ConfigureObject <t><t>RttConfigure object.
DefaultDirectory<t><t>Default directory for commandfiles.
Scantime <t><t>Scan time for update fileds.
AlarmMessage <t><t>Display last alarm in the Xtt-message field.
AlarmBeep <t><t>Beep if unacknowleged alarms exist.
AlarmReturn <t><t>Display return events in the eventlist.
AlarmAck <t><t>Display acknowlege events in the eventlist.
SymbolFilename <t><t>Symbolfile. <LINK> symbolfile
Verify <t><t>Verify commandfile execution.
AdvancedUser <t><t>User is advanced. <LINK> advanced user
</TOPIC>
<TOPIC> show version <style> function
Command show version
Show the xtt version
<B>xtt> show version
</TOPIC>
<TOPIC> show symbol <style> function
Command show symbol
Show one symbol, or all symbols
<B>xtt> show symbol 'symbol'<t> <t>Show symbol 'symbol'
<B>xtt> show symbol<t> <t>Show all symbols
<h2>related subjects
define <LINK> define
symbol <LINK> symbol
</TOPIC>
<TOPIC> show plcpgm <style> function
Command show plcpgm
List the PlcPgm-objects in the system.
<B>xtt> show plcpgm
</TOPIC>
<TOPIC> show plcthreads <style> function
Command show plcthreads
Display the PlcThread-objects.
The PlcThreads contains information and statistics for
the plc-threads.
<B>xtt> show plcthreads
</TOPIC>
<TOPIC> show links <style> function
Command show links
Show the links to other proview systems.
<B>xtt> show links
</TOPIC>
<TOPIC> show logfiles <style> function
Command show logfiles
Show the rtt log-files in the current work directory.
A log-file is created by the logging function in rtt or xtt and
has the filetype .rtt_log.
A logfile i opened with double-click, or by selecting the file
and then press return.
<B>xtt> show logfiles
</TOPIC>
<TOPIC> show alarmlist <style> function
Command show alarmlist
Open the alarmlist window.
<B>xtt> show alarmlist
</TOPIC>
<TOPIC> show eventlist <style> function
Command show eventlist
Open the eventlist window.
<B>xtt> show eventlist
</TOPIC>
<TOPIC> show user <style> function
Command show user
Show the current user and his privileges.
<B>xtt> show user
</TOPIC>
<TOPIC> sound <style> function
Command sound
Play a sound defined by a Sound or SoundSequence object.
<B>xtt> sound 'object'
</TOPIC>
<TOPIC> store <style> function
Command store
Store an attribute list to a scrip-file, or store the current
symbol table to a scrip-file.
The generated script-file can be executed from the command-prompt
with @'filename', or it can be found among the script-files in the
menu beneath 'Store'.
If the /collect is used, the attribute-list
will be restored in the collect list.
<B>xtt> store 'filename' [/collect]
<B>xtt> store 'filename' /symbols
/collect <t>The list is restored in the collection list.
/symbols <t>The current symbol table is stored.
</TOPIC>
<TOPIC> show logging <style> function
Command show logging
Show a logging entry.
<B>xtt> show logging /entry=
</TOPIC>
<TOPIC> logging <style> function
Command logging
A number of commands to handle the xtt logging.
logging start <LINK> logging start
logging stop <LINK> logging stop
logging set <LINK> logging set
logging show <LINK> logging show
logging store <LINK> logging store
</TOPIC>
<TOPIC> write object <style> function
Command write object
Write the content of an object to file.
<B>xtt> write object /object= /file=
/object <t>Name of object.
/file <t>Name of file to write to.
</TOPIC>
</headerlevel>
</chapter>
//
// Helpfile
//
<chapter>
<TOPIC> helpfile
Helpfile
Xtt read helptext from a helpfile.
The default helpfile for a project is pwrp_exe:rtt_help.dat.
Help topics from this file will be reached from
- the help-command in the navigator.
- the help-button in the operators-window will search for
topic "index".
- the event and alarmlist help on selected event will search
a topic with the eventname (objectname) of the event.
- help in a ge-graph window will search for a topic with the graph-name.
- a commandbutton in a ge-graph that executes a help command.
- help in a trace window will search for a topic with the
name of the plc-window.
<h1>Syntax
There are a number of different tags that influence the search
and the conversion of the helpfile.
<h2>
<ib><topic>
<i><topic> begin a topic and should be placed in the first position
<i>of a line. The topic-tag should be followed by the key that
<i>the help function will search for. All the following lines untill
<i> a </topic> tag will be displayed as text for the topic.
<i><topic> 'key'
<h2>
<ib></topic>
<i>End a topic. </topic> should bo placed in the first position
<i>of a line.
<b>Example
<i><topic> start engine
The engine will be started by...
<i></topic>
The command
<b>xtt> help start engine
will display the text of this topic.
<h2>
<ib><bookmark>
Bookmark is a line inside a topic which can be found by a
link-tag or the /bookmark qualifier in the help command. The
bookmark tag should be placed at the end of the line and should
be followed by a name.
<i>'some text' <bookmark> 'name'
<b>Example
<i>This is a bookmark. <bookmark> first_engine
The command
<b>xtt> help start engine/bookmark=first_engine
will display the text of the topic and scroll to the bookmark.
<h2>
<ib><link>
<i>The <link> tag is a link to another help topic. The <link> tag
<i>should be placed at the end of the line. When the line of the link
<i>is doubleclicked the topic of the link will be displayed. The link
<i>tag should be followed by the topic, and can also be followed by a
<i>bookmark and the helpfile where the topic reside, separated with comma.
<i>If a line contains a link, is will be marked with an arrow.
<i>'some text' <link> 'topic'[,'bookmark'][,'helpfile']
<b>Example
<i>Link to first engine <link> show engine, first_engine
<h2>
<ib><index>
<i>The <index> tag is a special link that will display an index of
<i>the helpfile, that is a list of all the topics in alpabetical order.
<i>'some text' <index>
<h2>
<ib><h1>
<i>The <h1> tag will display a line as a header with larger text size.
<i>The tag should be placed at the beginning of the line. A header line
<i>can't contain any links.
<i><h1>'header text'
<b>Example
<i><h1>This is a h1 header
will be displayed as
<h1>This is a h1 header
<h2>
<ib><h2>
<i>The <h2> tag will display a line as a header with bold text surrounded
<i>by grey lines. The tag should be placed at the beginning of the line.
<i>A header line can't contain any links.
<b>Example
<i><h2>This is a h2 header
will be displayed as
<h2>This is a h2 header
<h2>
<ib><b>
<i>The <b> tag will display a line with bold text.
<i>The tag should be placed at the beginning of the line.
<b>Example
<i><b>This is a bold line
will be displayed as
<b>This is a bold line
<h2>
<ib><t>
<i>The <t> tag makes i possible to write columns. Only three columns
<i>(two <t> tags) is allowed.
<b>Example
<i>Col1 <t> Col2 <t> Col3
will be displayed as
Col1 <t> Col2 <t> Col3
<h2>
<ib><include>
<i>Includes another helpfile. The <inlclude> tag should not be placed
<i>inside a topic.
<i><include> 'filname'
<h2>
<b>Example
Look at the outlook of this topic <link>helpfile_example
<i><topic> helpfile_example
<i>Start and stop of engines.
<i>Engine 1 <link> helpfile_example, bm_engine_1
<i>Engine 2 <link> helpfile_example, bm_engine_2
<i>Characteristics <link> helpfile_example, bm_char
<i><h1>Engine 1 <bookmark> bm_engine_1
<i>Start engine one by pressing the start button.
<i>Stop engine one by pressing the stop button.
<i><h1>Engine 2 <bookmark> bm_engine_2
<i>Start engine two by pressing the start button.
<i>Stop engine two by pressing the stop button.
<i><h2>Characteristics <bookmark> bm_char
<i><b><t>Engine1 <t>Engine2
<i>Max speed <t> 3200 <t> 5400
<i>Max current <t> 130 <t> 120
<i></topic>
</TOPIC>
<headerlevel>
<topic> helpfile_example
Start and stop of engines.
Engine 1 <link> helpfile_example, bm_engine_1
Engine 2 <link> helpfile_example, bm_engine_2
Characteristics <link> helpfile_example, bm_char
<h1>Engine 1 <bookmark> bm_engine_1
Start engine one by pressing the start button.
Stop engine one by pressing the stop button.
<h1>Engine 2 <bookmark> bm_engine_2
Start engine two by pressing the start button.
Stop engine two by pressing the stop button.
<h2>Characteristics <bookmark> bm_char
<b><t>Engine1 <t>Engine2
Max speed <t> 3200 <t> 5400
Max current <t> 130 <t> 120
</topic>
</headerlevel>
</chapter>
//
// Script
//
<chapter>
<TOPIC> script
Xtt script
execute script <LINK> execute script
datatypes <LINK> datatypes
datatype conversions <LINK> datatype conversions
variable declarations <LINK> variable declarations
operators <LINK> operators
main-endmain <LINK> main-endmain
function-endfunction <LINK> function-endfunction
if-else-endif <LINK> if-else-endif
while-endwhile <LINK> while-endwhile
for-endfor <LINK> for-endfor
break <LINK> break
continue <LINK> continue
goto <LINK> goto
include <LINK> include
printf() <LINK> printf()
scanf() <LINK> scanf()
fprintf() <LINK> fprintf()
fgets() <LINK> fgets()
fopen() <LINK> fopen()
fclose() <LINK> fclose()
exit() <LINK> exit()
verify() <LINK> verify()
time() <LINK> time()
edit() <LINK> edit()
extract() <LINK> extract()
element() <LINK> element()
xtt-commands <LINK> xtt-commands
GetAttribute() <LINK> getattribute()
GetChild() <LINK> getchild()
GetParent() <LINK> getparent()
GetNextSibling() <LINK> getnextsibling()
GetClassList() <LINK> getclasslist()
GetNextObject() <LINK> getnextobject()
GetObjectClass() <LINK> getobjectclass()
GetNodeObject() <LINK> getnodeobject()
GetRootList() <LINK> getrootlist()
CutObjectName() <LINK> cutobjectname()
MessageError() <LINK> messageerror()
MessageInfo() <LINK> messageinfo()
GetCurrentText() <LINK> getcurrenttext()
GetCurrentObject() <LINK> getcurrentobject()
</TOPIC>
<headerlevel>
<TOPIC> execute script
Execute a script
A script-file will be executed from the command-line with the command
xtt> @'filename'
</TOPIC>
<TOPIC> datatypes
Datatypes
The datatypes are float, int and string.
int <t>integer value.
float <t>32-bit float value.
string <t>80 character string (null terminated).
There are three different tables in which a variable can be declared: local,
global and extern. A local variable is known inside a function, a global is
known in all functions in a file (with include-files), an external is known
for all files executed in a rtt session.
</TOPIC>
<TOPIC> datatype conversions
Datatype conversions
If an expression consists of variables and functions of different datatypes
the variables will be converted with the precedence string, float, int. If
two operands in an expression is of type int and float, the result will be float
If two operands is of type float and string, or int and string, the result will
be string. In an assignment the value of an expression will be converted to the
type of the assignment variable, even if the result is a string and the
variable is of type float or int.
<b>Example
<c>string str;
<c>int i = 35;
<c>str = "Luthor" + i;
The value in str will be "Luthor35".
<c>float f;
<c>string str = "3.14";
<c>int i = 159;
<c>f = str + i;
The value in f will be 3.14159.
</TOPIC>
<TOPIC> variable declarations
Variable declarations
A variable must be declared before it is used.
A declaration consists of
- the table (global or extern, if local the table is suppressed)
- the datatype (int, float or string)
- the variable name (case sensitive)
- equal mark followed by an init value, if omitted the init value is zero or
null-string
- semicolon
Example
int i;
float flow = 33.4;
string str = "Hello";
extern int jakob;
global float ferdinand = 1234;
</TOPIC>
<TOPIC> operators
Operators
The operators have the same function as i c, with some limitations. All
operators are not implemented. Some operators (+,=,==) can also operate on
string variables. Precedence of operators is similar to c.
Operator <t>Description <t>Datatypes
+ <t>plus <t>int, float, string
- <t>minus <t>int, float
* <t>times <t>int, float
/ <t>divide <t>int, float
++ <t>increment, postfix only. <t>int, float
-- <t>decrement, postfix only <t>int, float
>> <t>bits right-shifted <t>int
<< <t>bits left-shifted <t>int
< <t>less then <t>int, float
> <t>greater then <t>int, float
<= <t>less equal <t>int, float
>= <t>greater equal <t>int, float
== <t>equal <t>int, float, string
!= <t>not equal <t>int, float, string
& <t>bitwise and <t>int
| <t>bitwise or <t>int
&& <t>logical and <t>int
|| <t>logical or <t>int
! <t>logical not <t>int
= <t>assign <t>int, float, string
+= <t>add and assign <t>int, float
-= <t>minus and assign <t>int, float
&= <t>logical and and assign <t>int
|= <t>logical or and assign <t>int
</TOPIC>
<TOPIC> main-endmain <style> function
main-endmain
The main and endmain statements controls where the execution starts and stops
If no main and endmain statements will be found, the execution will start
att the beginning of the file and stop at the end.
<b>Example
<c>main()
<c> int a;
<c> a = p1 + 5;
<c> printf( "a = %d", a);
<c>endmain
</TOPIC>
<TOPIC> function-endfunction <style> function
function-endfunction
A function declaration consists of
- the datatype of the return value for the function
- the name of the function
- an argumentlist delimited by comma and surrounded by parenthesis. The
argumentlist must include a typedeclaration and a name for eatch argument.
The arguments supplied by the caller will be converted to the type of the
to the type declared in the argument list. If an argument is changed inside
the function, the new value will be transferred to the caller. In this way
it is possible to return other values then the return value of the function.
A function can contain one or several return statements. The return will hand
over the execution to the caller and return the supplied value.
<b>Example
<c>function float calculate_flow(float a, float b)
<c> float c;
<c> c = a + b;
<c> return c;
<c>endfunction
...
<c>flow = korr * calculate_flow( v, 35.2);
</TOPIC>
<TOPIC> if-else-endif <style> function
if-else-endif
The lines between a if-endif statment will be executed if the expression
in the if-statment is true. The expression should be surrounded by parentheses.
If an else statement is found between the if and endif the lines between else
and endif will be executed if the if-exepression is false.
<b>Example
<c>if ( i < 10 && i > 5)
<c> a = b + c;
<c>endif
<c>if ( i < 10)
<c> a = b + c;
<c>else
<c> a = b - c;
<c>endif
</TOPIC>
<TOPIC> while-endwhile <style> function
while-endwhile
The lines between a while-endwhile statment will be executed as long as the
expression in the while-statment is true. The expression should be surrounded
by parentheses.
<b>Example
<c>while ( i < 10)
<c> i++;
<c>endwhile
</TOPIC>
<TOPIC> for-endfor <style> function
for-endfor
The lines between a for-endfor statment will be executed as long as the
middle expression in the for-statment is true. The for expression consists
of three expression, delimited by semicolon and surrounded by parentheses.
The first expression will be executed the before the first loop, the third
will be executed after every loop, the middle is executed before every loop
and if true another loop is done, if false the loop is leaved.
<b>Example
<c>for ( i = 0; i < 10; i++)
<c> a += b;
<c>endfor
</TOPIC>
<TOPIC> break <style> function
break
A break statement will search for the next endwhile or endfor statement
continue the execution at the line after.
<b>Example
<c>for ( i = 0; i < 10; i++)
<c> a += b;
<c> if ( a > 100)
<c> break;
<c>endfor
</TOPIC>
<TOPIC> continue <style> function
continue
A continue statement will search for the previous while or for statement
continue the loop execution.
<b>Example
<c>for ( i = 0; i < 10; i++)
<c> b = my_function(i);
<c> if ( b > 100)
<c> continue;
<c> a += b;
<c>endfor
</TOPIC>
<TOPIC> goto <style> function
goto
A goto will cause the execution to jump to a row defined by label.
The label line is terminated with colon.
<b>Example
<c> b = attribute("MOTOR-ON.ActualValue", sts);
<c> if (!sts)
<c> goto some_error;
<c> ...
<c>some_error:
<c> say("Something went wrong!");
</TOPIC>
<TOPIC> include <style> function
include
An script include-file containing functions can be included with the
#include statement. The default file extention is '.rtt_com'
<b>Example
<c>#include <my_functions>
</TOPIC>
<TOPIC> printf() <style> function
printf()
int printf( string format [, (arbitrary type) arg1, (arbitrary type) arg2])
<b>Description
Formatted print. C-syntax. Format argument and non, one or two value arguments.
Returns number of printed characters.
<b>Arguments
string <t>format <t>Format.
arbitrary type <t>arg1 <t>Value argument. Optional. Can be int,
<t> <t>float or string.
arbitrary type <t>arg2 <t>Value argument. Optional. Can be int,
<t> <t>float or string.
<b>Example
<c> printf( "Watch out!");
<c> printf( "a = %d", a);
<c> printf( "a = %d och str = %s", a, str);
</TOPIC>
<TOPIC> scanf() <style> function
scanf()
int scanf( string format , (arbitrary type) arg1)
<b>Description
Formatted input. C-syntax
Returns number of read characters.
<b>Arguments
string <t>format <t>Format.
arbitrary type <t>arg1 <t>Value argument. Returned. Can be int,
<t> <t>float or string.
<b>Example
<c> scanf( "%d", i);
</TOPIC>
<TOPIC> fprintf() <style> function
fprintf()
int fprintf( int file, string format [, (arbitrary type) arg1,
(arbitrary type) arg2])
<b>Description
Formatted print on file. C-syntax. Format argument and non, one or two value
arguments.
Returns number of printed characters.
<b>Arguments
int <t>file <t>File id retured by fopen.
string <t>format <t>Format.
arbitrary type <t>arg1 <t>Value argument. Optional. Can be int,
<t> <t>float or string.
arbitrary type <t>arg2 <t>Value argument. Optional. Can be int,
<t> <t>float or string.
<b>Example
<c> int outfile;
<c> outfile = fopen( "my_file.txt", "w");
<c> if (!outfile)
<c> exit();
<c> fprintf( outfile, "Some text");
<c> fprintf( outfile, "a = %d", a);
<c> fclose( outfile);
</TOPIC>
<TOPIC> fgets() <style> function
fgets()
int fgets( string str, int file)
<b>Description
Reads a line from a specified file.
Returns zero if end of file.
<b>Arguments
string <t>str <t>Read line. Returned.
int <t>file <t>file returned by fopen.
<b>Example
<c> file = fopen("some_file.txt","r");
<c> while( fgets( str, file))
<c> say( str);
<c> endwhile
<c> fclose( file);
</TOPIC>
<TOPIC> fopen() <style> function
fopen()
int fopen( string filespec, string mode)
<b>Description
Opens a file for read or write.
Returns a file identifier. If the file could not be opened, zero is returned.
<b>Arguments
string <t>filespec <t>Name of file.
string <t>mode <t>Access mode
<b>Example
<c> int infile;
<c> int outfile;
<c> infile = fopen("some_file.txt","r");
<c> outfile = fopen("another_file.txt","w");
<c> ...
<c> fclose( infile);
<c> fclose( outfile);
</TOPIC>
<TOPIC> fclose() <style> function
fclose()
int fclose( int file)
<b>Description
Closes an opened file.
<b>Arguments
int <t>file <t>file-id returned by fopen.
<b>Example
<c> int infile;
<c> infile = fopen("some_file.txt","r");
<c> ...
<c> fclose( infile);
</TOPIC>
<TOPIC> exit() <style> function
exit()
int exit()
<b>Description
Terminates executions of the file.
<b>Example
<c> exit();
</TOPIC>
<TOPIC> verify() <style> function
verify()
int verify( [int mode])
<b>Description
Sets or shows verification mode. If verification is on all executed lines will
be displayed on the screen.
Returns the current verification mode.
<b>Arguments
int <t>mode <t>verification on (1) or off (0). Optional.
<b>Example
<c> verify(1);
</TOPIC>
<TOPIC> time() <style> function
time()
string time()
<b>Description
Returns the current time in string format.
<b>Example
<c> string t;
<c> t = time();
</TOPIC>
<TOPIC> edit() <style> function
edit()
string edit( string str)
<b>Description
Removes leading and trailing spaces and tabs, and replaces multipel tabs and
spaces with a single space.
Returns the edited string.
<b>Arguments
string <t>str <t>string to be edited.
<b>Example
<c> collapsed_str = edit(str);
</TOPIC>
<TOPIC> extract() <style> function
extract()
string extract( int start, int length, string str)
<b>Description
Extracts the specified characters from the specified string.
Returns the extracted characters as a string.
<b>Arguments
int <t>start <t>start position of the first character.
int <t>length <t>number of characters to be extracted.
string <t>str <t>string from which characters should be extracted.
<b>Example
<c> extracted_str = extract( 5, 7, str);
</TOPIC>
<TOPIC> element() <style> function
element()
string element( int number, string delimiter, string str)
<b>Description
Extracts one element from a string of elements.
Returns the extracted element.
<b>Arguments
int <t>number <t>the number of the element.
string <t>delimiter <t>delimiter character.
string <t>str <t>string of elements.
<b>Example
<c> string str = "mary, lisa, anna, john";
<c> string elem1;
<c> elem1 = elment( 1, ",", str);
</TOPIC>
<TOPIC> xtt-commands <style> function
Xtt commands
All the xtt-commands is available in the script code. An rtt-command line
should NOT be ended with a semicolon. Variables can be substituted in the
command line by surrounding them with apostrophes.
<b>Example
<c> string name = "PUMP-VALVE-Open.ActualValue";
<c> float value = 2.2;
<c> set parameter/name='name'/value='value'
<b>Example
<c> string name;
<c> string parname;
<c> int j;
<c> int i;
<c> for ( i = 0; i < 3; i++)
<c> parname = "vkv-test-obj" + (i+1);
<c> create obj/name='parname'
<c> for ( j = 0; j < 3; j++)
<c> name = parname + "-obj" + (j+1);
<c> create obj/name='name'
<c> endfor
<c> endfor
</TOPIC>
<TOPIC> getattribute() <style> function
GetAttribute()
(variable type) GetAttribute( string name [, int status])
<b>Description
Get the value of the specified attribute. The returned type is dependent
of the attribute type. The attribute will be converted to int, float or string.
<b>Arguments
string <t>name <t>name of the attribute to be fetched.
int <t>status <t>status of operation. Returned. If zero, the
<t> <t>attribute could not be fetched. Optional.
<b>Example
<c> int alarm;
<c> int sts;
<c> alarm = GetAttribute("Roller-Motor-Alarm.ActualValue");
<c> on = GetAttribute("Roller-Motor-On.ActualValue", sts);
<c> if ( !sts)
<c> say("Could not find motor on attribute!");
</TOPIC>
<TOPIC> getchild() <style> function
GetChild()
string GetChild( string name)
<b>Description
get the first child of an object. The next children can be fetched with
GetNextSibling().
Returns the name of the child. If no child exists a null-string is returned
<b>Arguments
string <t>name <t>name of object.
<b>Example
<c> string child;
<c> child = GetChild("Roller-Motor");
</TOPIC>
<TOPIC> getparent() <style> function
GetParent()
string GetParent( string name)
<b>Description
Get the parent of an object.
Returns the name of the child. If no parent exists a null-string is returned.
<b>Arguments
string <t>name <t>name of object.
<b>Example
<c> string parent;
<c> parent = GetChild("Roller-Motor");
</TOPIC>
<TOPIC> getnextsibling() <style> function
GetNextSibling()
string GetNextSibling( string name)
<b>Description
Get the next sibling of an object.
Returns the name of the sibling. If no next sibling exists a null-string is
returned.
<b>Arguments
string <t>name <t>name of object.
<b>Example
<c> string name;
<c> int not_first;
<c> name = GetChild("Rt");
<c> not_first = 0;
<c> while ( name != "")
<c> if ( !not_first)
<c> create menu/title="The Rt objects"/text="'name'"/object="'name'"
<c> else
<c> add menu/text="'name'"/object="'name'"
<c> endif
<c> not_first = 1;
<c> name = GetNextSibling(nname);
<c> endwhile
<c> if ( !not_first )
<c> MessageError("No objects found");
</TOPIC>
<TOPIC> getclasslist() <style> function
GetClassList()
string GetClassList( string class)
<b>Description
Get the first object of a specified class. The next object of the class
can be fetched whith GetNextObject().
Returns the name of the first object. If no instances of the class exists a
null-string is returned.
<b>Arguments
string <t>name <t>name of class.
<b>Example
<c> string name;
<c> name = GetClassList("Dv");
</TOPIC>
<TOPIC> getnextobject() <style> function
GetNextObject()
string GetNextObject( string name)
<b>Description
Get the next object in a classlist.
Returns the name of the object. If no next object exist a null-string is
returned.
<b>Arguments
string <t>name <t>name of object.
<b>Example
<c> string name;
<c> name = GetClassList("Di");
<c> while ( name != "")
<c> printf("Di object found: %s", name);
<c> name = GetNextObject(name);
<c> endwhile
</TOPIC>
<TOPIC> getobjectclass() <style> function
GetObjectClass()
string GetObjectClass( string name)
<b>Description
Get the class of an object.
Returns the name of the class.
<b>Arguments
string <t>name <t>name of object.
<b>Example
<c> string class;
<c> class = GetObjectClass("Motor-Enable");
</TOPIC>
<TOPIC> getnodeobject() <style> function
GetNodeObject()
string GetNodeObject()
<b>Description
Get the node object.
Returns the name of the node object.
<b>Example
<c> string node;
<c> node = GetNodeObject();
</TOPIC>
<TOPIC> getrootlist() <style> function
GetRootList()
string GetRootList()
<b>Description
Get the first object in the root list.
Returns the name of the root object. The next object in the root list can be
fetched with GetNextSibling().
<b>Example
<c> string name;
<c> name = GetRootList();
<c> while( name != "")
<c> printf( "Root object found: %s", name);
<c> name = GetNextSibling(name);
<c> endwhile
</TOPIC>
<TOPIC> cutobjectname() <style> function
CutObjectName()
string CutObjectName( string name, int segments)
<b>Description
Cut the first segments of an object name.
Returns the last segments of an object name. The number of segments left is
specified by the second argument
<b>Arguments
string <t>name <t>Path name of object.
int <t>segments <t>Number of segments that should be left.
<b>Example
<c> string path_name;
<c> string object_name;
<c> path_name = GetChild("Rt-Motor");
<c> object_name = CutObjectName( path_name, 1);
</TOPIC>
<TOPIC> messageerror() <style> function
MessageError()
string MessageError( string message)
<b>Description
Print an rtt error message on the screen.
<b>Example
<c> MessageError("Something went wrong");
</TOPIC>
<TOPIC> messageinfo() <style> function
MessageInfo()
string MessageInfo( string message)
<b>Description
Print an rtt info message on the screen.
<b>Example
<c> MessageInfo("Everything is all right so far");
</TOPIC>
<TOPIC> getcurrenttext() <style> function
GetCurrentText()
string GetCurrentText()
<b>Description
Get the text of the current menu item or update field.
<b>Example
<c> string text;
<c> text = GetCurrentText();
</TOPIC>
<TOPIC> getcurrentobject() <style> function
GetCurrentObject()
string GetCurrentObject()
<b>Description
Get the object associated with the current menu item.
If no object is associated, a null-string i returned.
<b>Example
<c> string object;
<c> object = GetCurrentObject();
</TOPIC>
</headerlevel>
</chapter>
<chapter>
<TOPIC> classes
Classes
<B>SystemClasses <LINK>pwrs, ,$pwr_lang/pwrs_xtthelp.dat
<B>BaseClasses <LINK>pwrb, ,$pwr_lang/pwrb_xtthelp.dat
<B>BaseComponent <LINK>basecomponent, ,$pwr_lang/basecomponent_xtthelp.dat
<B>NMps <LINK>nmps, ,$pwr_lang/basecomponent_xtthelp.dat
<B>Profibus <LINK>profibus, ,$pwr_lang/profibus_xtthelp.dat
<B>Opc <LINK>opc, ,$pwr_lang/opc_xtthelp.dat
<B>OtherIO <LINK>otherio, ,$pwr_lang/otherio_xtthelp.dat
<B>SsabOx <LINK>ssabox, ,$pwr_lang/ssabox_xtthelp.dat
<B>OtherManufacturer <LINK>othermanufacturer, ,$pwr_lang/othermanufacturer_xtthelp.dat
<B>ABB <LINK>abb, ,$pwr_lang/abb_xtthelp.dat
<B>Siemens <LINK>siemens, ,$pwr_lang/siemens_xtthelp.dat
</TOPIC>
</chapter>
<include> $pwr_lang/pwrs_xtthelp.dat
<include> $pwr_lang/pwrb_xtthelp.dat
<include> $pwr_lang/basecomponent_xtthelp.dat
<include> $pwr_lang/nmps_xtthelp.dat
<include> $pwr_lang/profibus_xtthelp.dat
<include> $pwr_lang/opc_xtthelp.dat
<include> $pwr_lang/ssabox_xtthelp.dat
<include> $pwr_lang/otherio_xtthelp.dat
<include> $pwr_lang/othermanufacturer_xtthelp.dat
<include> $pwr_lang/abb_xtthelp.dat
<include> $pwr_lang/siemens_xtthelp.dat
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment