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

Work with upgrade scipts and release notes

parent 7cdf625e
......@@ -111,4 +111,12 @@
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.
090519 cs rtmon New help file for runtime monitor, and pushbutton for reset runtime.
090527 cs doc Getting Started Guide updated.
\ No newline at end of file
090527 cs doc Getting Started Guide updated.
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
close eventlist <t>Close eventlist <LINK> close eventlist
close graph <t>Close a graph <LINK> close graph
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
exit <t>close xtt <LINK> exit
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
login <t>User login <LINK> login
logout <t>User logout <LINK> logout
......@@ -1695,6 +1697,31 @@ collect <LINK> collect
collect show <LINK> collect show
</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
Command create item
......@@ -1771,6 +1798,25 @@ show symbol <LINK> show symbol
symbolfile <LINK> symbolfile
</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
Command delete item
......@@ -2226,6 +2272,7 @@ extract() <LINK> extract()
element() <LINK> element()
toupper() <LINK> toupper()
tolower() <LINK> tolower()
get_language() <LINK> get_language()
translate_filename() <LINK> translate_filename()
xtt-commands <LINK> xtt-commands
GetAttribute() <LINK> getattribute()
......@@ -2814,6 +2861,31 @@ string <t><t>string in lower case.
<c> str2 = tolower( str);
</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
translate_filename()
......
......@@ -1472,11 +1472,13 @@ close alarmlist <t>St
close eventlist <t>Stäng händleslistan <LINK> close eventlist
close graph <t>Stäng en graf <LINK> close graph
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
exit <t>Stäng xtt <LINK> exit
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
login <t>Inloggning av användare <LINK> login
logout <t>Utloggning av änvändare <LINK> logout
......@@ -1682,6 +1684,31 @@ collect <LINK> collect
collect show <LINK> collect show
</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
Kommando create item
......@@ -1762,11 +1789,30 @@ show symbol <LINK> show symbol
symbolfile <LINK> symbolfile
</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
Kommando delete item
Ta bort ett menyalternativ.
Menyalternativet kan vara skapat av användaren, eller tilhöra xtt's
Ta bort ett menyalternativ ur Xtt-menyn.
Menyalternativet kan vara skapat av användaren, eller tillhöra xtt's
standardmeny.
<B>xtt> delete item /name=
......@@ -2216,6 +2262,7 @@ extract() <LINK> extract()
element() <LINK> element()
toupper() <LINK> toupper()
tolower() <LINK> tolower()
get_language() <LINK> get_language()
translate_filename() <LINK> translate_filename()
xtt-commands <LINK> xtt-commands
GetAttribute() <LINK> getattribute()
......@@ -2804,6 +2851,31 @@ string <t><t>str
<c> str2 = tolower( str);
</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
translate_filename()
......
......@@ -555,6 +555,7 @@ usage()
renamedb Rename old databases.
dirvolume Create directory volume.
loaddb Load dumpfiles.
cnvobjects Convert objects in the database.
compile Compile all plcprograms in the database
createload Create new loadfiles.
createboot Create bootfiles for all nodes in the project.
......@@ -595,7 +596,7 @@ for db in $tmp; do
fi
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 ""
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 $
! Copyright (C) 2005 SSAB Oxelsund AB.
......@@ -18,87 +18,195 @@
! 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.
! Attribute ByteOrdering has a new meaning and should be changed, was formerly bitmask.
! The new ByteOrdering in Pb_DP_Slave object is ONLY ByteOrdering
! Find all OpPlace objects and move UserName, FastAvail and SelectList from the user object
! to the opplace object.
! 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.
!
! Pb_Ii and Pb_Io are new objects in v4.0.0 and don't need changing.
!
function int convert(string slave)
int old;
main
string op;
string user;
string aname;
int sts;
string attr;
string child;
string class;
attr = slave + ".ByteOrdering";
old = GetAttribute(attr, sts);
if (sts != 0)
child = GetChild(slave);
while (child != "")
class = GetObjectClass(child);
if (class == "Pb_Di" || class == "Pb_Do")
if (old & 2)
set attr/attr=Orientation/value=16/name='child'/noco
else
set attr/attr=Orientation/value=8/name='child'/noco
endif
endif
if (class == "Pb_Ai" || class == "Pb_Ao")
if (old & 4)
set attr/attr=NumberRepresentation/value=0/name='child'/noco
else
set attr/attr=NumberRepresentation/value=1/name='child'/noco
endif
int opnumber;
int usernumber;
int found;
string value;
int ivalue;
int i;
string rttconfig;
string webhandler;
verify(1);
! For all OpPlace objects
op = GetClassList( "OpPlace");
while ( op != "")
aname = op + ".OpNumber";
opnumber = GetAttribute( aname, sts);
if ( !sts)
op = GetNextObject( op);
continue;
endif
found = 0;
user = GetClassList( "User");
while ( user != "")
aname = user + ".OpNumber";
usernumber = GetAttribute( aname, sts);
if ( usernumber == opnumber)
found = 1;
break;
endif
child = GetNextSibling(child);
user = GetNextObject( user);
endwhile
if (old & 1)
set attr/attr=ByteOrdering/value=1/name='slave'/noco
else
set attr/attr=ByteOrdering/value=0/name='slave'/noco
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);
if ( !found)
printf( "No corresponding User object for %s\n", op);
op = GetNextObject( op);
continue;
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
endfunction
main()
string object;
string class;
!
object = GetRootList();
while (object != "")
class = GetObjectClass(object);
if (class == "$NodeHier")
traverse(object);
! Create OpDefault
op = GetNodeObject();
create object/name="OpDefault"/class=opplace/dest='op'/last
op = op + "-OpDefault";
ivalue = 1;
aname = op + ".OpWindLayout";
SetAttribute( aname, ivalue);
! For the RttConfig object
rttconfig = GetClassList( "RttConfig");
if ( rttconfig != "")
aname = rttconfig + ".UserObject";
user = GetAttribute( aname, sts);
if ( user == "" || user == "Undefined attribute")
break;
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
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