Commit 97ef8500 authored by Claes Sjofors's avatar Claes Sjofors

Work with upgrade scipts and release notes

parent 7cdf625e
...@@ -111,4 +111,12 @@ ...@@ -111,4 +111,12 @@
090224 cs xtthelp New home button in help window. 090224 cs xtthelp New home button in help window.
090506 cs pwrb Bugfix in Max object. Default values were wrong and didn't work for negative input values. 090506 cs pwrb Bugfix in Max object. Default values were wrong and didn't work for negative input values.
090519 cs rtmon New help file for runtime monitor, and pushbutton for reset runtime. 090519 cs rtmon New help file for runtime monitor, and pushbutton for reset runtime.
090527 cs doc Getting Started Guide updated. 090527 cs doc Getting Started Guide updated.
\ No newline at end of file 090827 cs convert Bugfix in conversion of png-files to ps and pdf.
090827 cs doc New Operator's Guide.
090827 cs co Window to view a text added to wow.
090902 cs trace Translation of menu to swedish.
090909 cs script New scriptfunction get get the current language, get_language().
090909 cs plc New enumeration type for OpMode in PID mode objects.
090916 cs wbl User and RttConfig merged into OpPlace object. User and RttConfig is now obsolete.
090916 cs linksup SystemStatus attribute in NodeLinkSup object contains system status of supervised node.
\ No newline at end of file
This diff is collapsed.
...@@ -1483,11 +1483,13 @@ close alarmlist <t>Close alarmlist <LINK> close alarmlist ...@@ -1483,11 +1483,13 @@ close alarmlist <t>Close alarmlist <LINK> close alarmlist
close eventlist <t>Close eventlist <LINK> close eventlist close eventlist <t>Close eventlist <LINK> close eventlist
close graph <t>Close a graph <LINK> close graph close graph <t>Close a graph <LINK> close graph
close navigator <t>Close the navigator <LINK> close navigator close navigator <t>Close the navigator <LINK> close navigator
create item <t>Create a menu item <LINK> create item create item <t>Create a menu item in the Xtt menu <LINK> create item
create opmenuitem <t>Create a menu item in the operator window menu <LINK> create opmenuitem
crossreference<t>Show crossreferenses <LINK> crossreference crossreference<t>Show crossreferenses <LINK> crossreference
exit <t>close xtt <LINK> exit exit <t>close xtt <LINK> exit
define <t>Define a symbol <LINK> define define <t>Define a symbol <LINK> define
delete item <t>Delete a menu item <LINK> delete item delete item <t>Delete a menu item in the Xtt menu <LINK> delete item
delete opmenuitem <t>Delete a menu item in the operator window menu <LINK> delete opmenuitem
help <t>Display help <LINK> help help <t>Display help <LINK> help
login <t>User login <LINK> login login <t>User login <LINK> login
logout <t>User logout <LINK> logout logout <t>User logout <LINK> logout
...@@ -1695,6 +1697,31 @@ collect <LINK> collect ...@@ -1695,6 +1697,31 @@ collect <LINK> collect
collect show <LINK> collect show collect show <LINK> collect show
</TOPIC> </TOPIC>
<TOPIC> create opmenuitem <style> function
Command create opmenuitem
Create a menu item in the operator window menu.
The action of the item can be either to execute a command.
<B>xtt> create opmenuitem /name= /command= /pixmap=
/name<t>Menu item name, with the name of above menues included.
<t>The name should begin with 'Functions-' or its translation.
<t>For other name segments submenues are created if they don't already exist.
<t>Ex Functions-MyMenu-MyGraph
/command<t>Xtt command that will be executed with the menu item is activated.
/before <t>The menu item is positioned first in the menu.
/after <t>The menu item is positioned last in the menu.
/pixmap <t>Pixmap for the menu item: 'graph' eller 'curve'.
Example
xtt> create opmenuitem /name="Functions-MyMenu-MyGraph"/after/pixmap=graph
<H2>related subjects
delete opmenuitem <LINK> delete opmenuitem
</TOPIC>
<TOPIC> create item <style> function <TOPIC> create item <style> function
Command create item Command create item
...@@ -1771,6 +1798,25 @@ show symbol <LINK> show symbol ...@@ -1771,6 +1798,25 @@ show symbol <LINK> show symbol
symbolfile <LINK> symbolfile symbolfile <LINK> symbolfile
</TOPIC> </TOPIC>
<TOPIC> delete opmenuitem <style> function
Command delete opmenuitem
Delete a menu item in the operator window menu.
The menu item can be created by the user or an item of
the standard configuration.
<B>xtt> delete opmenuitem /name=
/name<t>Name of the menu item.
Example
xtt> delete opmenuitem /name=Functions-Curves
<H2>related subjects
create opmenuitem <LINK> create opmenuitem
</TOPIC>
<TOPIC> delete item <style> function <TOPIC> delete item <style> function
Command delete item Command delete item
...@@ -2226,6 +2272,7 @@ extract() <LINK> extract() ...@@ -2226,6 +2272,7 @@ extract() <LINK> extract()
element() <LINK> element() element() <LINK> element()
toupper() <LINK> toupper() toupper() <LINK> toupper()
tolower() <LINK> tolower() tolower() <LINK> tolower()
get_language() <LINK> get_language()
translate_filename() <LINK> translate_filename() translate_filename() <LINK> translate_filename()
xtt-commands <LINK> xtt-commands xtt-commands <LINK> xtt-commands
GetAttribute() <LINK> getattribute() GetAttribute() <LINK> getattribute()
...@@ -2814,6 +2861,31 @@ string <t><t>string in lower case. ...@@ -2814,6 +2861,31 @@ string <t><t>string in lower case.
<c> str2 = tolower( str); <c> str2 = tolower( str);
</TOPIC> </TOPIC>
<TOPIC> get_language() <style> function
translate_filename()
string get_language()
<b>Description
Get the current language.
<b>Returns
string <t><t>The current langage, e.g en_us, sv_se, de_de.
<b>Example
<c> string lng;
<c> lng = get_language();
<c> if ( lng == "sv_se")
<c> create opmenu/name="Funktioner-Bilder-Översikt"/command="open graph overview"
<c> endif
<c> if ( lng == "en_us")
<c> create opmenu/name="Functions-ProcessGraphs-Overview"/command="open graph overview"
<c> endif
</TOPIC>
<TOPIC> translate_filename() <style> function <TOPIC> translate_filename() <style> function
translate_filename() translate_filename()
......
...@@ -1472,11 +1472,13 @@ close alarmlist <t>St ...@@ -1472,11 +1472,13 @@ close alarmlist <t>St
close eventlist <t>Stäng händleslistan <LINK> close eventlist close eventlist <t>Stäng händleslistan <LINK> close eventlist
close graph <t>Stäng en graf <LINK> close graph close graph <t>Stäng en graf <LINK> close graph
close navigator <t>Stäng navigatorn <LINK> close navigator close navigator <t>Stäng navigatorn <LINK> close navigator
create item <t>Skapa ett menyalternativ <LINK> create item create opmenuitem <t>Skapa ett menyalternativ i operatörsfönstret <LINK> create opmenuitem
create item <t>Skapa ett xtt menyalternativ <LINK> create item
crossreference<t>Visa korsreferenser <LINK> crossreference crossreference<t>Visa korsreferenser <LINK> crossreference
exit <t>Stäng xtt <LINK> exit exit <t>Stäng xtt <LINK> exit
define <t>Definiera en symbol <LINK> define define <t>Definiera en symbol <LINK> define
delete item <t>Ta bort ett menyalternativ <LINK> delete item delete opmenuitem <t>Ta bort ett xtt menyalternativ <LINK> delete item
delete item <t>Ta bort ett menyalternativ i operatörsfönstret <LINK> delete item
help <t>Visa hjälp <LINK> help help <t>Visa hjälp <LINK> help
login <t>Inloggning av användare <LINK> login login <t>Inloggning av användare <LINK> login
logout <t>Utloggning av änvändare <LINK> logout logout <t>Utloggning av änvändare <LINK> logout
...@@ -1682,6 +1684,31 @@ collect <LINK> collect ...@@ -1682,6 +1684,31 @@ collect <LINK> collect
collect show <LINK> collect show collect show <LINK> collect show
</TOPIC> </TOPIC>
<TOPIC> create opmenuitem <style> function
Kommando create opmenuitem
Skapa ett menyalternativ i operatörsfönstrets meny.
Menyalternativet kan användas för att exekvera ett xtt kommando.
<B>xtt> create opmenuitem /name= /command= /pixmap=
/name<t>Namn på menyalternativet inklusive namn på ovanliggande menyer.
<t>Namnet bör inledas med 'Functions-' eller med dess översättning.
<t>För övriga namnled skapas nya undermenyer om de inte redan finns.
<t>Ex Functions-MyMenu-MyGraph
/command<t>Xtt kommando som exekveras när menyalternativet aktiveras.
/before <t>Menyalternativet läggs först i menyn.
/after <t>Menyalternativet läggs sist i menyn.
/pixmap <t>Pixmap för menyalternativet: 'graph' eller 'curve'.
Exempel
xtt> create opmenuitem /name="Functions-MyMenu-MyGraph"/after/pixmap=graph
<H2>Se även
delete opmenuitem <LINK> delete opmenuitem
</TOPIC>
<TOPIC> create item <style> function <TOPIC> create item <style> function
Kommando create item Kommando create item
...@@ -1762,11 +1789,30 @@ show symbol <LINK> show symbol ...@@ -1762,11 +1789,30 @@ show symbol <LINK> show symbol
symbolfile <LINK> symbolfile symbolfile <LINK> symbolfile
</TOPIC> </TOPIC>
<TOPIC> delete opmenuitem <style> function
Kommando delete opmenuitem
Ta bort ett menyalternativ från operatörsfönstrets meny.
Menyalternativet kan vara skapat av användaren, eller tillhöra
standardmeny.
<B>xtt> delete opmenuitem /name=
/name<t>Namn på menyalternativet.
Exempel
xtt> delete opmenuitem /name=Functions-Curves
<H2>Se även
create opmenuitem <LINK> create opmenuitem
</TOPIC>
<TOPIC> delete item <style> function <TOPIC> delete item <style> function
Kommando delete item Kommando delete item
Ta bort ett menyalternativ. Ta bort ett menyalternativ ur Xtt-menyn.
Menyalternativet kan vara skapat av användaren, eller tilhöra xtt's Menyalternativet kan vara skapat av användaren, eller tillhöra xtt's
standardmeny. standardmeny.
<B>xtt> delete item /name= <B>xtt> delete item /name=
...@@ -2216,6 +2262,7 @@ extract() <LINK> extract() ...@@ -2216,6 +2262,7 @@ extract() <LINK> extract()
element() <LINK> element() element() <LINK> element()
toupper() <LINK> toupper() toupper() <LINK> toupper()
tolower() <LINK> tolower() tolower() <LINK> tolower()
get_language() <LINK> get_language()
translate_filename() <LINK> translate_filename() translate_filename() <LINK> translate_filename()
xtt-commands <LINK> xtt-commands xtt-commands <LINK> xtt-commands
GetAttribute() <LINK> getattribute() GetAttribute() <LINK> getattribute()
...@@ -2804,6 +2851,31 @@ string <t><t>str ...@@ -2804,6 +2851,31 @@ string <t><t>str
<c> str2 = tolower( str); <c> str2 = tolower( str);
</TOPIC> </TOPIC>
<TOPIC> get_language() <style> function
translate_filename()
string get_language()
<b>Beskrivning
Returnerar nuvarande språk.
<b>Returns
string <t><t>Aktuellt språk, t ex en_us, sv_se eller de_de.
<b>Exempel
<c> string lng;
<c> lng = get_language();
<c> if ( lng == "sv_se")
<c> create opmenu/name="Funktioner-Bilder-Översikt"/command="open graph overview"
<c> endif
<c> if ( lng == "en_us")
<c> create opmenu/name="Functions-ProcessGraphs-Overview"/command="open graph overview"
<c> endif
</TOPIC>
<TOPIC> translate_filename() <style> function <TOPIC> translate_filename() <style> function
translate_filename() translate_filename()
......
...@@ -555,6 +555,7 @@ usage() ...@@ -555,6 +555,7 @@ usage()
renamedb Rename old databases. renamedb Rename old databases.
dirvolume Create directory volume. dirvolume Create directory volume.
loaddb Load dumpfiles. loaddb Load dumpfiles.
cnvobjects Convert objects in the database.
compile Compile all plcprograms in the database compile Compile all plcprograms in the database
createload Create new loadfiles. createload Create new loadfiles.
createboot Create bootfiles for all nodes in the project. createboot Create bootfiles for all nodes in the project.
...@@ -595,7 +596,7 @@ for db in $tmp; do ...@@ -595,7 +596,7 @@ for db in $tmp; do
fi fi
done done
passes="dumpdb directorystructure classvolumes renamedb dirvolume loaddb compile createload createboot" passes="dumpdb directorystructure classvolumes renamedb dirvolume loaddb cnvobjects compile createload createboot"
#echo "Pass: $passes" #echo "Pass: $passes"
echo "" echo ""
echo -n "Enter start pass [dumpdb] > " echo -n "Enter start pass [dumpdb] > "
......
!** Invisible: Script for converting Profibus objects during upgrading from v3.9 to v4.0.0 !** Invisible: Script for converting OpPlace and WebHandler objects during upgrading from v4.6 to v4.7.0
! !
! Proview $Id: upgrade_pb.pwr_com,v 1.3 2008-11-28 17:15:37 claes Exp $ ! Proview $Id: upgrade_pb.pwr_com,v 1.3 2008-11-28 17:15:37 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB. ! Copyright (C) 2005 SSAB Oxelsund AB.
...@@ -18,87 +18,195 @@ ...@@ -18,87 +18,195 @@
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
! !
! !
! Script for converting Profibus objects during upgrading from v3.9 to v4.0.0 ! Script for converting OpPlace and WebHandler objects during upgrading from V4.6 to V4.7.0,
! and to remove User and RttConfig objects.
! !
! Traverse all trees under every $NodeHier root object to find every Pb_DP_Slave object. ! Find all OpPlace objects and move UserName, FastAvail and SelectList from the user object
! Attribute ByteOrdering has a new meaning and should be changed, was formerly bitmask. ! to the opplace object.
! The new ByteOrdering in Pb_DP_Slave object is ONLY ByteOrdering ! Replace RttConfig with an OpPlace object named OpDefault.
! Move SelectList from user object to WebHandler object.
! !
! Every Pb_Di, Pb_Do, Pb_Ai and Pb_Ao object also has new arguments, Orientation and
! NumberRepresentation that should be set according to the old ByteOrdering bitmask. main
! string op;
! Pb_Ii and Pb_Io are new objects in v4.0.0 and don't need changing. string user;
! string aname;
function int convert(string slave)
int old;
int sts; int sts;
string attr; int opnumber;
string child; int usernumber;
string class; int found;
string value;
attr = slave + ".ByteOrdering"; int ivalue;
old = GetAttribute(attr, sts); int i;
string rttconfig;
if (sts != 0) string webhandler;
child = GetChild(slave); verify(1);
while (child != "")
class = GetObjectClass(child); ! For all OpPlace objects
if (class == "Pb_Di" || class == "Pb_Do") op = GetClassList( "OpPlace");
if (old & 2) while ( op != "")
set attr/attr=Orientation/value=16/name='child'/noco
else aname = op + ".OpNumber";
set attr/attr=Orientation/value=8/name='child'/noco opnumber = GetAttribute( aname, sts);
endif if ( !sts)
endif op = GetNextObject( op);
if (class == "Pb_Ai" || class == "Pb_Ao") continue;
if (old & 4) endif
set attr/attr=NumberRepresentation/value=0/name='child'/noco
else found = 0;
set attr/attr=NumberRepresentation/value=1/name='child'/noco user = GetClassList( "User");
endif while ( user != "")
aname = user + ".OpNumber";
usernumber = GetAttribute( aname, sts);
if ( usernumber == opnumber)
found = 1;
break;
endif endif
child = GetNextSibling(child); user = GetNextObject( user);
endwhile endwhile
if (old & 1) if ( !found)
set attr/attr=ByteOrdering/value=1/name='slave'/noco printf( "No corresponding User object for %s\n", op);
else op = GetNextObject( op);
set attr/attr=ByteOrdering/value=0/name='slave'/noco continue;
endif
save
endif
endfunction
function int traverse(string parent)
string child;
string class;
child = GetChild(parent);
while(child != "")
class = GetObjectClass(child);
if (class == "Pb_DP_Slave")
convert(child);
else
traverse(child);
endif endif
child = GetNextSibling(child); printf( "Processing %s\n", op);
aname = user + ".UserName";
value = GetAttribute( aname, sts);
aname = op + ".UserName";
SetAttribute( aname, value);
for ( i = 0; i < 15; i++)
aname = user + ".FastAvail[" + i + "]";
value = GetAttribute( aname, sts);
if ( value != "" && value != "Undefined attribute")
aname = op + ".FastAvail[" + i + "]";
SetAttribute( aname, value);
endif
endfor
for ( i = 0; i < 20; i++)
aname = user + ".SelectList[" + i + "]";
value = GetAttribute( aname, sts);
if ( value != "")
aname = op + ".EventSelectList[" + i + "]";
SetAttribute( aname, value);
endif
endfor
aname = user + ".MaxNoOfAlarms";
ivalue = GetAttribute( aname, sts);
aname = op + ".MaxNoOfAlarms";
SetAttribute( aname, ivalue);
aname = user + ".MaxNoOfEvents";
ivalue = GetAttribute( aname, sts);
aname = op + ".MaxNoOfEvents";
SetAttribute( aname, ivalue);
ivalue = 3;
aname = op + ".OpWindPop";
SetAttribute( aname, ivalue);
ivalue = 14;
aname = op + ".OpWindLayout";
SetAttribute( aname, ivalue);
ivalue = 1;
aname = op + ".AlarmBell";
SetAttribute( aname, ivalue);
delete object/name='user'/noconf
op = GetNextObject( op);
endwhile endwhile
endfunction ! Create OpDefault
op = GetNodeObject();
main() create object/name="OpDefault"/class=opplace/dest='op'/last
string object; op = op + "-OpDefault";
string class;
! ivalue = 1;
object = GetRootList(); aname = op + ".OpWindLayout";
while (object != "") SetAttribute( aname, ivalue);
class = GetObjectClass(object);
if (class == "$NodeHier") ! For the RttConfig object
traverse(object); rttconfig = GetClassList( "RttConfig");
if ( rttconfig != "")
aname = rttconfig + ".UserObject";
user = GetAttribute( aname, sts);
if ( user == "" || user == "Undefined attribute")
break;
endif endif
object = GetNextSibling(object);
endwhile printf( "Processing %s\n", op);
aname = rttconfig + ".SymbolFileName";
value = GetAttribute( aname, sts);
aname = op + ".SetupScript";
SetAttribute( aname, value);
for ( i = 0; i < 20; i++)
aname = user + ".SelectList[" + i + "]";
value = GetAttribute( aname, sts);
if ( value != "")
aname = op + ".EventSelectList[" + i + "]";
SetAttribute( aname, value);
endif
endfor
aname = user + ".MaxNoOfAlarms";
ivalue = GetAttribute( aname, sts);
aname = op + ".MaxNoOfAlarms";
SetAttribute( aname, ivalue);
aname = user + ".MaxNoOfEvents";
ivalue = GetAttribute( aname, sts);
aname = op + ".MaxNoOfEvents";
SetAttribute( aname, ivalue);
delete object/name='user'/noconf
delete object/name='rttconfig'/noconf
endif
! For the WebHandler object
webhandler = GetClassList( "WebHandler");
if ( webhandler != "")
aname = webhandler + ".UserObject";
user = GetAttribute( aname, sts);
if ( user == "" || user == "Undefined attribute")
break;
endif
printf( "Processing %s\n", webhandler);
for ( i = 0; i < 20; i++)
aname = user + ".SelectList[" + i + "]";
value = GetAttribute( aname, sts);
if ( value != "")
aname = webhandler + ".EventSelectList[" + i + "]";
SetAttribute( aname, value);
endif
endfor
aname = user + ".MaxNoOfAlarms";
ivalue = GetAttribute( aname, sts);
aname = webhandler + ".MaxNoOfAlarms";
SetAttribute( aname, ivalue);
aname = user + ".MaxNoOfEvents";
ivalue = GetAttribute( aname, sts);
aname = webhandler + ".MaxNoOfEvents";
SetAttribute( aname, ivalue);
delete object/name='user'/noconf
endif
endmain endmain
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