Commit 4162c3ec authored by Claes Sjofors's avatar Claes Sjofors

Designer's guide modifications

parent 2657329a
......@@ -34,15 +34,15 @@
<hr>
2009-01-27
Version 4.6.0
2010-07-16
Version 4.7.0
<hr>
</topic>
<topic> __DocumentInfoPage
Copyright (C) 2008 SSAB Oxel?sund AB
Copyright (C) 2010 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
......@@ -51,8 +51,6 @@ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
First Edition Mars 2005
......@@ -506,7 +504,7 @@ The traffic lights should be able to operate in two different modes:
- Flash: The traffic lights are flashing yellow.
<image> dg_fig1.gif
<b>Traffic lights in an Intersection
<b>Fig Traffic lights in an Intersection
The operating mode of the traffic lights is decided by an operator at via operator station, or
by a maintenance technician, who influences a switch. The maintenance technician can change
......@@ -517,7 +515,7 @@ the operator and maintenance technician respectively, to be able to monitor and
system. These could be realized with plant graphics on the operator station or with hardware.
<image> dg_fig2.gif
<b>Traffic Lights, Control Panels
<b>Fig Traffic Lights, Control Panels
</topic>
<topic> io_specification
......@@ -579,7 +577,7 @@ station. They are root volumes so we can choose an idle volume identity in the i
station, and enter the volume mode in the administator to register these volumes.
<image> dg_fig11.gif
<b>Volume registration
<b>Fig Volume registration
<h2>Create users
Eric is a developer in the traffic department, an Carl is an operator. They are both involved
......@@ -588,17 +586,17 @@ projects and let them share users. We grant Eric developer and system privileges
operator privileges and Lisa maintenance privileges.
<image> dg_fig4.gif
<b>Created users
<b>Fig Created users
<h2>Create Project
We create the project with the hierarchy name 'trafic-trafficcross1'.
We create the project with the hierarchy name 'traffic-trafficcross1'.
<image> dg_fig10.gif
<b>Created project
<b>Fig Created project
<h1>Configure the project
The project has a directory volume in which the nodes and volumes of the project are configured.
In the upper window the volumes are configured with RootVolumeConfig objects. In the lower
In the left window the volumes are configured with RootVolumeConfig objects. In the right
window the process and the operator station are configured with NodeConfig objects. The
NodeConfig objects is put beneath a BusConfig object that states in which QCOM bus the nodes are
communicating.
......@@ -615,7 +613,7 @@ Note also the system object with the attribute SystemGroup that is assigned the
'trafficdepartment'. This grants the users eric, carl and lisa access to the project.
<image>dg_fig5.gif
<b>The Directory Volume
<b>Fig The Directory Volume
</topic>
<topic> plant_configuration
......@@ -643,7 +641,7 @@ The figure below illustrates how a plant has been configured. We see how signals
configured on different levels, and even how the PLC programs are configured in the plant.
<image> dg_fig3.gif
<b>An Example of a Plant Configuration
<b>Fig An Example of a Plant Configuration
We choose to call our plant TrafficCross1 and we decide on the following structure:
......@@ -677,7 +675,7 @@ Reset <t>Dv <t>A value which is used to reset the program to initial mo
<bookmark> plant_example
<image> dg_fig6.gif
<b>The Plant Configuration of the Intersection
<b>Fig The Plant Configuration of the Intersection
As you can see we have a plant object at the topmost level, TrafficCross1 of the class
$PlantHier. We use other objects of class $PlantHier to group our objects. We also create an
......@@ -690,7 +688,7 @@ available in the operator station. We have mounted the topmost $PlantHier object
'TrafficCross1' with a MountObject with the same name.
<image> dg_fig14.gif
<b>The Plant Configuration in the operator volume.
<b>Fig The Plant Configuration in the operator volume.
</topic>
<topic> node_configuration
......@@ -716,28 +714,27 @@ The rack and the cards are configured in a manner much like what you would do ph
have a node, place the rack in the node, the card in the rack, and the channels on each card.
<image> dg_fig7.gif
<b>Node Configuration of the Process Station
<b>Fig Node Configuration of the Process Station
We also configure the PLC program with a PlcProcess object, and below this, a PlcThread object
for each time base. We are content with one 100 ms timebase.
<image> dg_fig12.gif
<b>Timebase configuration of the PLC program
<b>Fig Timebase configuration of the PLC program
Each object has a number of attributes that you may have to change. To give an understanding of
how to change attributes, some of the attributes in the PlcProcess object are edited below.
<image> dg_fig13.gif
<b>Change of Attribute Value
<b>Fig Change of Attribute Value
<h2>Operator Station
The node hierarchy of the operator station is configured in the volume VolOpTrafficCross1.
Below the node object we find an OpPlace object that defines the operator place, and below
this a User object that defines a user. Below the OpPlace object there is also a XttGraph object
for the process graph of the operator station.
Below the node object we find an OpPlace object that defines the operator place, and below this
a XttGraph object for the process graph of the operator station.
<image> dg_fig8.gif
<b>The Node Configuration i the Operator Volume.
<b>Fig The Node Configuration i the Operator Volume.
<h1> Connecting channels to signals
When you have configured the plant and the nodes, it is time to connect the logical signals to
......@@ -752,10 +749,10 @@ Di-channel Di4-00 is representing the channel, we have to make a connection betw
objects.
<image> dg_fig15.gif
<b>Connection between a signal and a channel
<b>Fig Connection between a signal and a channel
<image> dg_fig9.gif
<b>Connect a signal to a channel
<b>Fig Connect a signal to a channel
</topic>
<topic>plcprogram
......@@ -766,7 +763,7 @@ However we must first connect the PlcPgm object to a PlcThread object in the nod
This states which timebase the PLC program is executed on.
<image> dg_fig16.gif
<b>The Graphical PLC Editor
<b>Fig The Graphical PLC Editor
We will use the PLC Editor to create a sequential control program for the traffic lights. There
are two ways to solve the problem concerning the two operating modes for a traffic light,
......@@ -787,7 +784,7 @@ signals.
<image>dg_fig17.gif
<b>The Flashing Light Sequence
<b>Fig The Flashing Light Sequence
This is the sequence that will be executed when you want the lights to flash yellow.
......@@ -796,7 +793,7 @@ normal operating mode sequence. This implies that the two sequences cannot execu
time.
<image>dg_fig18.gif
<b>The Normal Sequence
<b>Fig The Normal Sequence
The program for the normal operating mode is based on a traffic light following the sequence:
......@@ -818,7 +815,7 @@ When step S8 has been active for a certain time, it will be deactivated, and the
is once again activated.
<image> dg_fig19.gif
<b>Trigger Signals
<b>Fig Trigger Signals
The program above shows the logic that controls different operating modes.
......@@ -841,7 +838,7 @@ Plant graphics are often used as an interface between the operator and the proce
graphics are created with the Plant Graphics Editor.
<image> dg_fig20.gif
<b>The Plant Graphics Editor
<b>Fig The Plant Graphics Editor
Plant graphics can contain dynamics, which are connected to the logical signals, e.g.:
......@@ -858,7 +855,81 @@ lights (red, yellow, and green) are dynamic as shown in figure. How to create th
graphics is described in chapter 5 Creating Plant Graphics .
<image>dg_fig21.gif
<b>The Plant Graphics for the Intersection
<b>Fig The Plant Graphics for the Intersection
</topic>
</chapter>
<chapter>
<topic>dg_create_project
Create a project
<h1>Installation of development environment
Before you can begin to work with Proview you have to install the Proview development
environment. There are a number of packages for different Linux distributions available, and
if there is no package for the disired distribution you can also download the Proivew source
and build from sources.
The installation packaged if named with the version number in the name, e.g. pwr47. This
makes it possible to install several versions side by side, which is an advantage when you
have plenty of projects in production running at different versions.
You will find more information about the installation on the Download page on www.proview.se.
<h1>setup script
At the installation the Linux user 'pwrp' with password 'pwrp' is created. By logging in as
pwrp you can start Proview by clicking on the Proview icon on the screen.
If you want to run Proview as another user, you have to initiate Proview at login. Insert
the following line into the file .bashrc in the home directory
<c>source /src/pwrp/adm/db/pwr_setup.sh
If you have several users with common Proview projects, you have to make sure that they have
write access to files in the projects. On way to achive this is to set umask to 002, and let
all users have the same group, e.g. pwrp.
<h1>Users
In the Case Study above, we saw how to create users belonging to different system groups.
This is described in the Administration chapter. At installation of the development package,
a user database is include containing the systemgroup 'common' with five users, pwrp, op1,
op2, op3 and op4. pwrp is a development user and has system privileges in runtime. The op
users is operators and have operator privileges in runtime. These users work for many
applications, and we will settle with them for the moment.
<image> dg_fig23.gif
<b>Users included in the installation
Note that when building Proview from sources, you have to create users before creating a
project.
<h1>Register volumes
As we also saw in the Case Study you can register volumes in the GlobalVolumeList. This can
be done later, by letting the configuration guide for the project register the volumes and
fetch the next free volume identity. We choose this way for the moment, but if you have
several independent development stations you should handle the registration manually to avoid
kollisions of volume identities. If you have a larger plant with plenty of volumes, we also
recommend that you assign the volume identities manually and group them in a suitable way.
<h1>Create a project
To create a project you enter the project list of the administrator, by clicking on the
Proview icon, or by the command
<c>> pwra
pwra is defined as 'wb -p pwrp pwrp', i.e. it is logging in as user pwrp. If you have defined
other users for development, you have to redefined 'pwra' or use the 'wb -p' command directly.
wb takes user and password as arguments.
In the project list you enter edit mode and create a ProjectReg object on the top level or
under a hierarchy object. In the ProjectReg object you specify project name, Proview version
and path for the project. When you save, the project directories are created.
How to create a project is described in the Getting Started Guide. We recommend that you
go trough the sections for creating the project and configuring the directory volume before
continuing.
</topic>
</chapter>
......@@ -868,25 +939,31 @@ Directory Volume Configuration
<h1>Open a project
When the project is created, it is found in the administrator project tree. You open a project
by activating 'Open Project' in the popupmenu for a ProjectReg object. The workbench is now
opened for the project, and the Volume selection window is displayed, showing all the volumes
in the project. So far, only the DirectoryVolume is created, and our first task is to configure
this volume, with the volumes and nodes of the system.
by activating 'Open Project' in the popupmenu for a ProjectReg object.
Select the DirectoryVolume and click on the Ok button to open the configuration editor for the
volume.
You can also use the 'sdf' command to attach to a project. sdf takes the project name as
argument
<image> dg_fig23.gif
<c>> sdf trafficcross1
The directory volume is now opened by the command
You can also create a project with a shell command. You tie to the project with the command
<c>> pwrs
> pwrp set project 'projectname'
pwrs is defined as 'wb pwrp pwrp', i.e. it is logging in as user pwrp. If you have defined
other users for development, you have to redefined 'pwrs' or use the 'wb' command directly.
wb takes user and password as arguments (and also volume as third argument).
The Workbench is opened with the command
If the volume is empty, a guide to help with the configuration is started. To create a simple
project with a node and a volume you just have to press the 'Next' button.
> wb
The guide looks for volumes registred for the project. If there are no volumes registred it
suggests volumes with suitable volume names and free volume identities, and registres the
volumes if the suggestions are approved. The guide also creates all the configuration objects
in the directory volume and inserts suitable data into them.
wb takes user, password and volume as arguments.
If you later will expand the systems with more nodes and volumes, its good to have some
knowledge of the configuration is done, thus we describe how to configure the volume manually.
<h2>The Configuration Editor
......@@ -923,7 +1000,7 @@ It is also possible to display the attributes of an object directly in the confi
<h2>Configure the nodes
In the lower window, the nodes in the project is configured. You group the nodes by which
In the right window, the nodes in the project is configured. You group the nodes by which
QCOM bus they communicate on. We create two BusConfig objects, one for the production nodes
and one for simulation. In the BusNumber attribute the busnumber is defined.
......@@ -961,13 +1038,15 @@ questions and create the volumes.
If the volume selection window is opened now, 'File/Open' in the menu, all the configured
volumes are displayed. The next step is to configure a RootVolume.
</topic>
</chapter>
<chapter>
<topic>configure_rootvolume
Configure a Root Volume
A root volume is opened from the volume selection window. Select the volume and click on the
Ok button. This will start the configuration editor for the root volume. As for the
DirectoryVolume it is separated in two windows, but this time, the upper window shows the
plant configuration and the lower the node configuration.
DirectoryVolume it is separated in two windows, but this time, the left window shows the
plant configuration and the right the node configuration.
<h1>Plant Configuration
The Plant Configuration describes the different plants which you can find in the Proview
......@@ -1032,8 +1111,8 @@ object.
The Node Configuration defines the nodes of your PROVIEW/R system. The nodes are named and
their contents specified.
<b>Node Configuration
<image> dg_fig44.gif
<b>Fig Node Configuration
<h2>$NodeHier Object
The node hierarchy object is used to group objects in the Node Configuration. This object is
......@@ -1079,8 +1158,8 @@ ChanIi <t>Integer input.
ChanIo <t>Integer output.
ChanCo <t>Counter input.
<b>I/O configuration
<image> dg_fig43.gif
<b>Fig I/O configuration
<b>Distributed I/O
As an example of distributed I/O we choose profibus. In this case, all the four levels is used.
......@@ -1144,24 +1223,13 @@ See Backup_Conf in Object Reference Manual <classlink>backup_conf,"",$pwr_lang/p
To define an operator place you place an object of the OpPlace class under the $Node object.
The following attributes must be given values:
- OpNumber indicates the number of the operator place. Every operator place in the node
should be allocated a unique integer.
See OpPlace i Object Reference Manual <classlink>opplace,"",$pwr_lang/pwrb_xtthelp.dat
<h2>User Object
For each operator place you must define an out unit of the user type (operator). To do this
you use a User object. You can only have one user per operator place. User objects should
also be defined for RttConfig and WebHandler objects.
The following attributes must be given values:
- UserName indicates the name of the user.
- OpNumber must have the same number as the operator place.
- UserName is a name of a Proview user, defined in the UserDatabase. The privileges of the
user determines the access to the system.
- MaxNoOfEvents indicates the number of events which the operator's event list can hold at
the same time.
- SelectList indicates the object hierarchies in the Plant Configuration, from which the
the same time.
- EventSelectList indicates the object hierarchies in the Plant Configuration, from which the
operator will be receiving events.
If we look at the figure above, which illustrates the plant A, and assume that we want to
......@@ -1169,8 +1237,8 @@ receive events only from the encircled objects, we state 'A-C' as an alternative
select list. This choice means that we will be receiving events from the supervised object C,
and from all supervised objects, which have C as their parent.
<b>SelectList example 1
<image> dg_fig41.gif
<b>Fig SelectList example 1
Another example:
......@@ -1180,28 +1248,27 @@ TrafficCross1 handles two traffic lights, TrafficLightNS and TrafficLightWE. Let
we want events only from TrafficLightNS. In that case we state 'TrafficCross1-TrafficLightNS'
instead of TrafficCross1.
<b>Selectlist example 2
<image> dg_fig42.gif
<b>Fig EventSelectlist example 2
If you want to receive messages from the CycleSup object the supervises the plc threads, you
must also state the hierarchy name of the $Node object.
In FastAvail you specify the complete hierarchy name of the XttGraph object, which will be
possible to start from the graphics buttons of the Operator Window NoFastAvail specifies
the number of graphics buttons to be used. You can have 0- 15 push buttons. Buttons which are
not used become invisible.
possible to start from the graphics buttons of the Operator Window. You can have 0 - 25 push
buttons. Buttons which are not used become invisible.
See User i Object Reference Manual <classlink>user,"",$pwr_lang/pwrb_xtthelp.dat
See OpPlace in Object Reference Manual <classlink>opplace,"",$pwr_lang/pwrb_xtthelp.dat
<b>Operator Window
<image> dg_fig45.gif
<b>Fig Operator Window
<h2>The Plant Graphics Object - the XttGraph Object
In order to be able to show plant graphics which are unique to the project in the operator
station, you must configure XttGraph objects. These objects define, for instance, what the
files with the plant graphics are called. The objects are referred to in the User object
FastAvail attribute, and in the DefGraph attribute that is found in $PlantHier and signal
objects.
files with the plant graphics are called. The objects are referred to in the FastAvail
attribute of the OpPlace object, and in the DefGraph attribute that is found in $PlantHier and
signal objects.
When the object is refered in a FastAvail you can use the possibility to execute a Xtt command
from the XttGraph object. In this way, you can set a signal from a pushbutton in the operator
......@@ -1754,8 +1821,8 @@ The plc editor consists of
- a palette with grafcet objects and function blocks, and a palette with connections.
- a navigation window, from which the work area can be scrolled and zoomed.
<b>The Plc editor
<image> dg_fig46.gif
<b>Fig The Plc editor
A function object is created by selecting a class in the palette, and pressing MB2 in the
working area.
......@@ -1807,8 +1874,8 @@ for transition 1 has been fulfilled. Then the initial step becomes inactive.
A Grafcet program is always a closed sequence.
<b>A Simple Straight Grafcet Sequence
<image> dg_fig47.gif
<b>Fig A Simple Straight Grafcet Sequence
<h2>Diverged sequence
......@@ -1817,8 +1884,8 @@ alternative branches in your program, for instance when you have a machine, whic
manufacture three different products. At the points where the production differs, you introduce
alternative branches.
<b>Sequece Selection
<image> dg_fig48.gif
<b>Fig Sequence Selection
The example in the figure above shows the sequence for a machine which can manufacture the
three products, Red, Green, and Blue. At the point of divergence, point 1 in the figure, you
......@@ -1833,8 +1900,8 @@ Sometimes it may be necessary to start several parallel working procedures at th
It must be possible for these working procedures to operate independent of each other. In
order to do this, parallel sequences are used.
<b>Parallel Sequences
<image> dg_fig49.gif
<b>Fig Parallel Sequences
The example in the figure above illustrates the sequence for two machines, which are drilling
two holes at the same time and independent of each other. When the transition condition before
......@@ -1871,14 +1938,14 @@ As mentioned above, the transition (Trans) is used to start a transition between
and an inactive step. A logical condition, for instance a digital signal, is connected to a
transition, and determines when the transition is taken place.
<b>A Transition Example
<image>dg_fig52.gif
<b>Fig A Transition Example
<h2>Order
It is possible to connect one or more orders to each step.
<b>An Order Example
<image>dg_fig53.gif
<b>Fig An Order Example
Normally the output is active when the input is active, but for each order you have a number
of attributes, with which you can influence the function of the output:
......@@ -1894,28 +1961,28 @@ that you indicate the name of the attribute (capital letters) and possible time
Object Editor. The figure below illustrates how to delay an order from being active for 10
seconds.
<b>DOrder Attributes
<image>dg_fig54.gif
<b>Fig DOrder Attributes
The selected order attributes are written in the order symbol.
The figure below illustrates how you can use an order object with delay to make a step active
for a certain time.
<b>A Delayed Transition
<image>dg_fig55.gif
<b>Fig A Delayed Transition
Note! You must use a ConFeedbackDigital connection to connect the delayed order object with
the transition object, otherwise the order of execution will be ambigous.
See Feedback Connection <link>plceditor_refman, feedback_connection
<h2>Subsekvens - SubStep
<h2>Subsequence - SubStep
When you are creating complex Grafcet programs, it is often suitable to use subwindows,
and to place subsequences in these to get a better layout of the program.
<b>Subsequence
<image>dg_fig56.gif
<b>Fig Subsequence
The above figure shows the sub sequence of a SubStep. A sub sequence always starts with an
SsBegin object, and ends with an SsEnd object. In its turn a subsequence can contain
......@@ -1923,13 +1990,13 @@ subsequences.
<h1>An Introduction to Function Block Programming
<h2>Block to fetch and store values
Block to fetch and store are used to read and write values. There are fetch and store blocks
<h2>Blocks to fetch and store values
Blocks to fetch and store are used to read and write values. There are fetch and store blocks
for each type of signal. In the figure below a number of these blocks are displayed. They
are found in the 'Signal' folder in the palette.
<b>Block to fetch and store values
<image>dg_fig57.gif
<b>Fig Blocks to fetch and store values
To read signals you use blocka like GetAi, GetIi, GetDv or GetAo. When you want to give a value
to a signal, you use for instance StoAv, StoDo, SetDv or ResDo.
......@@ -1956,8 +2023,8 @@ A number of objects are available for logical programming, for instance And-gate
Or-gate (Or), inverter or timer. For the logical programming digital signals are used. The
objects are placed in the folder Logic.
<b>Logic Blocks
<image> dg_fig58.gif
<b>Fig Logic Blocks
The figure below shows an And-gate. For this object the following applies:
......@@ -1973,8 +2040,8 @@ The figure below shows an And-gate. For this object the following applies:
The attributes of the And-gate are changed with the Object Editor.
<b>Attributes of the And-Gate
<image> dg_fig60.gif
<b>Fig Attributes of the And-Gate
The other objects in the 'Logic' folder have similar parameters, see Proview Objects Reference
Manual .
......@@ -1983,8 +2050,8 @@ Manual .
The folder 'Analog' contains a number of objects for handling analog signals, for instance
filters, summation blocks, and integrators.
<b>Arithmetical Calculation Block
<image> dg_fig61.gif
<b>Fig Arithmetical Calculation Block
In this guide we do not describe the function of the objects, but it may be expedient to
comment on the use of arithmetic blocks. The blocks are used for calculation of user defined
......@@ -2015,8 +2082,8 @@ supervisory), which is in the folder Logic.
The desired signal or attribute, is fetched with a Get-object that is connected to the DSup
object. Outputs of logical blocks can be directly connected to the DSup object.
<b>Digital Supervisory Objects
<image> dg_fig62.gif
<b>Fig Digital Supervisory Objects
Figure above illustrates supervision of a Dv signal and a digital attribute.
......@@ -3097,7 +3164,7 @@ Modbus TCP is implemented as an I/O-system in Proview. See more information abou
<h2>Receiving messages
When we receive a buffer, we search for RemTrans.Address[0] and [1] that matches the fields
slave adress and function code in the message header.
slave address and function code in the message header.
If the data object for this message is big enough to contain the message, the message will be stored,
and the DataValid flag will be set.
......@@ -4439,41 +4506,144 @@ at installation of the pwrrt package, would be
<chapter>
<topic>conf_test
Running and Testing a Proview System
Starting and testing a Proview system
In preceding chapters we have described how to configure a PROVIEW/R system, how to create
PLC programs and how to create plant graphics. Now it is time to run and test the system.
This chapter shows how to:
- create load files
- create a boot file
- distribute
- build the system. <link> dg_build
- start the simulate environment <link> dg_simulate
and the runtime monitor. <link> runtime_monitor
- distribute. <link> dg_distribute
- start the runtime environment <link> dg_rtstart.
<h2>Syntax control
Before creating load files it is appropriate to make a syntax control. This is done from the
menu in the navigator, 'File/Syntax'.
<h1>Syntax check
Some classes have a syntax check method, checking that the object is correctly configured.
The methods of the signals objects check for example that they are connect to a channel, and
the method for a PlcPgm that it is connected to a plc thread object etc. The syntax methods
captures a great deal of errors, but is not a guarantee that everything will work faultlessly.
<h2>Creating Load Files
Before starting the runtime environment you have to create a number of load files, one for each
volume in your system. You create the load files from the Navigator of each volume,
'Function/Build Volume'.
The syntax methods are executed from 'Functions/Sytax Check' in the Configurator menu.
<h2>Creating Boot Files
For every node in the project you have to create a boot file. The bootfile contains mainly the
root volume to load for the node. The bootfile is created from the configurator menu,
'Functions/Build Node'. This command will also build the plcprogram for the node.
</topic>
<topic> dg_build
Build
Before you have a running system for a node, you have to build the node. It means that you
generates what you need in the runtime environment, e.g. a boot file specifying which volumes
are to be loaded, loadfiles for the volumes containing info about the objects in the volume,
an executable for the plc program etc.
You build by activating 'Functions/Build Node' in the Configurator menu, or the corresponding
button in the tools panel. If there are several nodes configured in the project, you also
have to select a node from the viewed list of nodes.
<b>Select node when creating a bootfile
<image> dg_fig66.gif
<b>Fig Node selection
At this point, everything in the development environment is configured and generated, and its
time to set up the runtime environment.
Also the build is divided into methods for different classes. The build method for a PlcPgm
generates code for the modified windows and compile this code. The build method for a
volume creates a loadfile for the volume, and calls the build mehtods for all objects
in the volume. The build method for a node calls the build method for the volume, creates
a bootfile for the node, and to link the plc executable. The build methods for an object can
be called by selecting the object and activating 'Functions/Build Object' in the menu, and
the build method for the current volume by activating 'Functions/Build Volume'.
<h2>Install the Proview runtime package
...
Below follows a description of some build methods.
<h2>Distribute
...
XttGraph <t>Copies the .pwg file for the graph from $pwrp_pop to $pwrp_exe.
WebGraph <t>Exports the graph to java, compiles and inserts into an archive.
WebHandler <t>Generates html-files for the homepage of the node, and converts xtt helpfiles
<t>to web format.
PlcPgm <t>Generates c-code that is compiled by the c compiler.
RootVolume <t>Calls the build method for all objects in the volume, and creates a load file
<t>with info about the objects in the volume. Also creates crossreference files
<t>if specified in Options.
ClassVolume <t>Generates include files with c structs for the classes of the volume, and
<t>create a loadfile with the type and class definitions.
Node <t>Calls the build method for the rootvolume, if the volume is available. Creates
<t>a bootfile with info about which volumes are to be loaded, and links the
<t>plc program of the node.
Normally the build methods first checks if anything is modified, and only performs the build
if it finds a modification. In some cases you want to force a build, and then sets 'Force' in
the Build column in options opened from 'Options/Settings' in the menu. It is also possible
to mark that you want to create crossreference files ag build, or that compile and link of
the plc should be performed with debug.
If a node contains subvolumes or shared volumes, these have to be built by 'Build Volume'
before building the node.
</topic>
<topic> dg_simulate
Simulate
Simulate means starting the system for a process or operator station on the development
station. This is a fast way to test programs and process graphics during the development
phase. Also when a system is in production, you can test modifications of the system before
downloading them to the production system.
When simulating, the input data from the process has to be simulated. This is done by creating
a PlcPgm the reads output data to the process, i.e. Do an Ao values, and from these set
values to Ai and Di objects. There are special StoDi and StoAi objects for this purpose, only
used at simulation. You have to assure that simulate program only executes at simulation, e.g.
by setting the ScanOff attribute of the PlcWindow object if IOSimulflag in the IOHandler
object is 1.
To be able to simulate on the development station, it has to be configured in the directory
volume. The simulation is performed on a separate QCom bus, which is configured by a
BusConfig object on the top level in the right window of the directory volume. In this you
state the bus identity, e.g. 999. Below the BusConfig object you place a NodeConfig object
for the development station, and fill in the node name and IP address. You can use the
loopback address 127.0.0.1 as long as you don't plan to communicate to other nodes. You also
have to specify which volume you want to simulate by setting the name of the RootVolumeLoad
object below the NodeConfig object, to the name of the volume.
Note that the configuration guide for the directory volume normally creates a simulate bus
and a simulate node.
<image>dg_fig104.png
<b>Fig Directory volume with configuration of the development station newton
When the development station is configured, you build by opening the configurator for the
volume that is to be simulated, and activate 'Build Node' and select the development station
in the viewed list of nodes.
Before starting the runtime you have to define the environment variable PWR_BUS_ID to the
identity fo the simulation bus. A default value for PWR_BUS_ID set set in the file
/etc/proview.cnf, parameter QcomBusId. With the command
<c>> echo $PWR_BUS_ID
you check the bus identity, and with the command
<c>> export PWR_BUS_ID=999
you assign another value. This command you can for example insert in $pwrp_login/login.sh.
Now you can start the Proview runtime with
<c>> rt_ini &
and stop with
<c>> . pwr_stop.sh
If Proview doesn't start you can add -i to the start command to see error messages.
<c>> rt_ini -i
Note that you always have to reset by executing '. pwr_stop.sh' before a new start attempt.
When the runtime environment is running you can explore the system by starting the runtime
navigator
<c>> rt_xtt
You can also use the runtime monitor to start the runtime environment. See below.
</topic>
<topic>runtime monitor
......@@ -4510,6 +4680,110 @@ is started already.
</topic>
<topic> dg_process_station
Process and operator stations
In this section we go through the steps to start Proview on a process or operator station.
- configuration of the node in the directory volume.
- build the node.
- installation of the runtime package.
- distribute to the node. <link> dg_distribute
- start the runtime environment on the node. <link> dg_rtstart
<h1>Directory volume configuration
The node has to be configure in the directory volume by a NodeConfig object. This is placed
below a BusConfig object that contains the bus identity for the production bus. In the
NodeConfig object the node name and IP address is configured, and below the NodeConfig object
there is a RootVolumeLoad object that states which root-volume is to be started on the node.
The node is built from the rootvolume configurator by activating 'Functions/Build Node' and
selecting the process station in the node list (if there is only one single node configured
the node list is not viewed).
<h1>Installation of the runtime package
The runtime package is installed on the process/operator node by installing the pwrrt package
of the present Linux distribution. Read the installation guide on the Download page on
www.proview.se for more information.
</topic>
<headerlevel>
<topic> dg_distribute
Distribute
Distribute, means collecting the files that are created when the node is built, and that
is needed to execute the runtime environment, into a package. The package is copied to the
process or operator station and unpacked there.
Which files are going to be a part of the package, is configured in the directory volume with
a Distribute object beneath the NodeConfig object of the node. The Distribute object contains
the attribute Components where you specify what types of components or files that is selected.
If there are components specified that is not generated, a warning message will companion the
distribution.
<image> dg_fig106.png
<b>Fig The Distribute object
If there are other files, e.g. application programs, that is to be a part of the package, you
add an object of type ApplDistribute below the Distribute object. In the ApplDistribute object
you can state which files are to be added (specification with wildcard is allowed) and where
they are to be copied.
All files needed at runtime should be a part of the package. It is important that a package
represents a complete version of the system, making it possible to restore the runtime
environment if you for example want to go back to a previous version. If a disk crash occurs,
it is also important to be able to restore the system on a new disk without any manual
copying and modifications of files.
The distribution is preformed from the Distributor that is opened from 'Functions/Distribute'
in the Configurator menu. Select the node you want to distribute to, and select
'Functions/Distribute' in the Distributor menu.
<image> dg_fig105.png
<b>Fig Distributören
The distributor will now collect the specified files into a package and copy the package to
the user 'pwrp' on the process node with ssh. ssh requires password, and this has to be
typed two times in the terminal window from which the configurator is started. At installation
the user 'pwrp' is given the password 'pwrp', but this may have been changed for security
reasons.
If you don't have network contact with the process station, you can create a package and move
it to the process station for example with an USB stick. Select the node in the Distributor
and activate 'Functions/Create Package'. The package is stored on $pwrp_load with the name
pwrp_pkg_'nodename'_'version'.tgz, e.g. pwrp_pkg_cross1_0002.tgz. On the process station you
unpack the package with the script pwr_pkg.sh which takes the name of the package as argument.
<c>> pwr_pkg.sh pwrp_pkg_cross1_0002.tgz
<h1>Restore a previous version
Sometimes a modification of the system doesn't work as planned, and you want to restore a
previous version. This is easily done with pwr_pkg.sh. The packages are stored in the home
directory of user pwrp, /home/pwrp. By finding the package for the previous version and start
pwr_pkg.sh with this package, you restore the version.
<c>> pwr_pkg.sh pwrp_pkg_cross1_0001.tgz
</topic>
<topic> dg_rtstart
Start the runtime environment
The runtime environment on a process or operator station is started with the command
<c>> pwr start
and stopped with
<c>> pwr stop
or
<c>> pwr kill
The command 'pwr stop' requires that all processes are alive, while 'pwr kill' clears all
in all situations.
</topic>
</headerlevel>
</chapter>
<chapter>
......@@ -4896,7 +5170,7 @@ for edit functions are dimmed.
If you have edit privileges you can enter the edit mode. Now it is possible to create and
modify objects.
<b>Trace och Simulate
<b>Trace and Simulate
If you want to trace the program you enter the trace mode. This requires that the Proview
runtime environment is started in the development station. Simulate works as trace, but
you can also set values to signals.
......@@ -5181,7 +5455,7 @@ document header is filled in automatically. The document object is found under t
ShowPlcAttr can be used as an extension of the document header. In the object is displayed
information about volume, scantime and reset object for Grafcet sequences.
<b>Head, Title, Text och BodyText
<b>Head, Title, Text and BodyText
These objects are used to write informational text in the document. Head, Title and Text
contains singleline texts of different size with max 79 characters. Bodytext contains a
multiline text with max 1023 characters. The objects is found under 'Edit' in the palette.
......@@ -9131,7 +9405,7 @@ arbitrary type <t>arg2 <t>Value argument. Optional. Can be int,
<c> printf( "Watch out!");
<c> printf( "a = %d", a);
<c> printf( "a = %d och str = %s", a, str);
<c> printf( "a = %d and str = %s", a, str);
</TOPIC>
<TOPIC> scanf() <style> function
......
src/doc/man/src/dg_fig20.gif

71.7 KB | W: | H:

src/doc/man/src/dg_fig20.gif

40.4 KB | W: | H:

src/doc/man/src/dg_fig20.gif
src/doc/man/src/dg_fig20.gif
src/doc/man/src/dg_fig20.gif
src/doc/man/src/dg_fig20.gif
  • 2-up
  • Swipe
  • Onion skin
src/doc/man/src/dg_fig21.gif

9.54 KB | W: | H:

src/doc/man/src/dg_fig21.gif

22.1 KB | W: | H:

src/doc/man/src/dg_fig21.gif
src/doc/man/src/dg_fig21.gif
src/doc/man/src/dg_fig21.gif
src/doc/man/src/dg_fig21.gif
  • 2-up
  • Swipe
  • Onion skin
src/doc/man/src/dg_fig23.gif

8.12 KB | W: | H:

src/doc/man/src/dg_fig23.gif

18.9 KB | W: | H:

src/doc/man/src/dg_fig23.gif
src/doc/man/src/dg_fig23.gif
src/doc/man/src/dg_fig23.gif
src/doc/man/src/dg_fig23.gif
  • 2-up
  • Swipe
  • Onion skin
src/doc/man/src/dg_fig8.gif

23.3 KB | W: | H:

src/doc/man/src/dg_fig8.gif

23.1 KB | W: | H:

src/doc/man/src/dg_fig8.gif
src/doc/man/src/dg_fig8.gif
src/doc/man/src/dg_fig8.gif
src/doc/man/src/dg_fig8.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -31,15 +31,15 @@
<hr>
2008-10-21
Version 4.6.0
2010-07-16
Version 4.7.0
<hr>
</topic>
<topic> __DocumentInfoPage
Copyright 2008 SSAB Oxelösund AB
Copyright 2010 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
......@@ -47,8 +47,6 @@ or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
First Edition Mars 2005
......@@ -844,37 +842,116 @@ Skapa processbilder.
</chapter>
<chapter>
<topic>dg_create_project
Skapa ett project
<h1>Installation av utvecklingsmiljön
Innan man kan börja arbeta med Proview måste Proview's utvecklingsmiljö installeras. Det
finns ett antal olika paket för olika Linux distributioner, och finns det inte något paket
för den önskade distributionen kan man även ladda hem Proview källkod och bygga från denna.
Installationspaketet för utvecklingsmiljön har namngivits med versionsnummer i namnet,
t ex pwr47. Detta gör det möjligt att ha flera versioner installerade parallellt, vilket
är en fördel när man har många projekt i produktion som går på olika versioner.
Mer information om installation finns på Download sidan på www.proview.se.
<h1>setup script
Installationen skapar Linux-användaren 'pwrp' med password 'pwrp'. Genom att logga in som
pwrp kan man starta Proview genom att klicka på Proview ikonen på skärmen.
Vill man köra Proview som en annan användare måste man initiera Proview vid inloggningen.
Lägg in följande rad i filen .bashrc på hemma katalogen
<c>source /src/pwrp/adm/db/pwr_setup.sh
Har man flera användare med gemensamma Proview projekt måste man se till att de har
skrivrättigheter på filer i projekten. Ett sätt att uppnå det är att sätta umask till 002,
dvs skrivrättighet för grupp, och ange en gemensam grupp på alla användare, t ex pwrp.
<h1>Användare
I fallstudien ovan såg vi hur man kan skapa användare som tillhör olika systemgrupper.
Detta finns beskrivet i Administration kapitlet. Vid installationen av utvecklingspaketet
följer det med en användardatabas med en systemgrupp, common, och fem användare, pwrp, op1,
op2, op3 och op4. pwrp är utvecklings användare och har system-privilegier in runtime. op
användarna är operatörer och har operatörspriviliger i runtime. De här användarna fungerar
för många applikationer, och vi nöjer oss tills vidare med dessa.
<image> dg_fig23.gif
<b>Användare som följer med vid installationen
Notera att om man bygger Proview från källkoden, måste man skapa användare innan man kan
gå vidare och skapa ett projekt.
<h1>Registrera volymer
Som vi också såg i fallstudien kan man registrera volymer i GlobalVolumeList. Man kan även
välja att vänta med detta och låta konfigurerings guiden för projeket registrera volymer
och hämta ut nästa lediga volymsidentitet. För att inte fördjupa oss i detaljer låter vi
tills vidare konfigurerings guiden registrera volymerna. Om man har flera oberoende
utvecklingsstationer bör man registrera volymerna manuellt så att volymsidentitetera inte
kolliderar. Har man större anläggningar med många volymer rekommenderar vi också att man
tilldelar volymsidentiteter manuellt och grupperar på lämpligt sätt.
<h1>Skapa ett projekt
För att skapa ett project går man in i administratörens projektlista, antingen genom klicka
på Proview ikonen, eller med kommandot
<c>> pwra
pwra är definerad som 'wb -p pwrp pwrp' dvs loggar in som användare pwrp. Har man definerat
andra användare för utveckling måste man definiera om 'pwra' eller använda 'wb -p' kommandot
direkt. wb har användare och password som argument.
I projektlistan går man in i editerings mod och skapar ett ProjectReg objekt, på topp-nivå
eller under ett hierarki objekt. I ProjectReg objektet anger man projektnamn,
Proview-version och katalog för projektet. När man sparar, skapas projekt-katalogerna för
projektet.
Hur man skapar ett projekt finns närmare beskrivet i Getting Started Guide. Vi
rekommenderar att går igenom avsnitten för att skapa projektet och konfigurere directory
volymen innan man fortsätter.
</topic>
</chapter>
<chapter>
<topic>configure_directoryvolume
Konfigurera Directory volymen
<h1>Öppna ett projekt
När projektet har skapas han man hitta det i administratören projektträd. Man öppnar ett
När projektet har skapas kan man hitta det i administratörens projektträd. Man öppnar ett
projekt genom att aktivera 'Open Project' i popupmenyn för ett ProjectReg objekt.
Arbetsbänken öppnas nu för projektet, och volymsväljar fönstret, som listar alla volymer
i projektet, visas. Hittills är endast directory volymen skapad, och vår första uppgift
är att konfigurera denna volym, med de volymer och noder som ingår i systemet.
Man kan också använda 'sdf' kommandot för knyta upp sig mot ett project. Projektnamnet
skickas med som argument till sdf.
Välj ut directory volymen och klicka på Ok knappen för att öppna navigatören för volymen.
<c>> sdf trafficcross1
<image> dg_fig23.gif
Directory volymen kan sedan startas med
<c>> pwrs
Man kan även öppna ett projekt med shell kommandon. Man knyter upp sig mot ett projekt
med kommandot
pwrs är definerad som 'wb pwrp pwrp' dvs loggar in som användare pwrp. Har man definerat
andra användare för utveckling måste man definiera om 'pwrs' eller använda 'wb' kommandot
direkt. wb har användare och password som argument (och även volym som tredje argument).
> pwrp set project 'projektnamn'
<h1>Konfiguratören
Vi öppnar nu konfiguratören för directoryvolymen. I konfiguratören finns två fönster, i det
vänstra visas volymer i projektet, och i det högra noder.
Arbetsbänken öppnas med kommandot
> wb
Om volymen är tom, startas en guide som hjälper till med konfigureringen. För att skapa
ett enkelt projekt med en nod och en volym behöver man i princip bara klicka på 'Next'
knappen.
wb tar användare, passerord och volym som argument.
Guiden letar efter registrerade volymer för projektet. Om det inte finns några, ger
förslag på lämpliga volymsnamn och lediga volymsidentiteter, och registrerar volymerna om
förslagen godkänns. Guiden skapar också alla konfigurations-objekt i directory volymen och
sätter lämpliga data.
<h1>Konfiguratören
Vi öppnar nu konfiguratören för directoryvolymen. I konfiguratören finns två fönster, i det
övre visas volymer i projektet, och i det under noder.
Vill man senare utöka systemet med fler noder och volymer krävs att man har lite större
insikt, vi gör därför en genomgång hur man konfigurerar för hand.
<h2>Konfigurera volymer
Först ska alla rotvolymer, subvolymer och klassvolymer i projekt konfigureras. Det gör man
......@@ -905,9 +982,9 @@ Man kan
- Välj ett attribut och aktivera 'Functions/Change value' i menyn för att ändra ett värde.
<h2>Konfigurera noder
I det under fönstret ska noderna i projektet konfigureras. Man delar in noderna efter vilken
QCOM bus de kommunicerar på. Skapa därför två BusConfig objekt, ett för produktions noderna
och ett för simulering. Öppna objekten och lägg in BusNumber.
I det vänstra fönstret ska noderna i projektet konfigureras. Man delar in noderna efter
vilken QCOM bus de kommunicerar på. Skapa därför två BusConfig objekt, ett för produktions
noderna och ett för simulering. Öppna objekten och lägg in BusNumber.
Som barn till BusConfig objekten läggs nu ett NodeConfig objekt för varje process- och
operatörsstation. När NodeConfig objektet skapas, skapas ytterligar ett par objekt
......@@ -941,13 +1018,27 @@ volymerna.
Om volymsväljaren öppnas nu, 'File/Open' i menyn, visas alla konfigurerade volymer. Nästa
steg är att konfigurera en rotvolym.
</topic>
</chapter>
<chapter>
<topic>configure_rootvolume
Konfigurera en rotvolym
En rootvolym öppnas från volymsväljar förstret. Välj ut volymen och klicka på 'Ok'. Detta
startar konfiguratören för rotvolymen. Liksom för directoryvolymen är den separerad i två
fönster, men nu visar det övre fönstret anläggingshierarkin och det under nodehierarkin.
En rootvolym öppnas från directory volymen genom att man högerklickar på ett VolumeConfig
objekt och aktiverar 'Open Project' i popupmenyn.
Om man har gjort 'sdf' till projektet kan man även öppna med 'pwrs' kommandot genom att
skicka med volymsnamnet som argument.
<c>> pwrs voltrafficcross1
Detta startar konfiguratören för rotvolymen. Liksom för directoryvolymen är den separerad
i två fönster, men nu visar det övre fönstret anläggingshierarkin och det undre
nodehierarkin.
Om man öppnar en tom volym, startas en guide för att konfigurera volymen. Guiden
konfiguerar nod hierarkin genom att skapa diverse objekt för server processer mm, men
man kan även skapa dessa för hand, se nedan.
<h1>Konfigurering av anläggningshierarkin
I anläggningshierarkin beskrivs de olika anläggningarna som finns med i Proview systemet.
......@@ -1121,22 +1212,10 @@ F
objektet.
Föjande attribut måste ges ett värde:
- OpNumber är en numrering av operatörsplatsen inom noden. Varje operatörsplats ska ha ett
unikt nummer.
Se OpPlace i Objektshandboken <classlink>opplace,"",$pwr_lang/pwrb_xtthelp.dat
<h2>User objekt
För operatörsplatsen måste man även skapa ett User objekt. Detta ska ligga som barn till
OpPlace objektet. Det kan endast finnas ett User objekt per operatörsplats. Userobjekt
ska även definieras för RttConfig och WebHandler objekt.
Följande attribut ska fyllas i:
- UserName talar om vilken Proview användare som ska loggas in. När operatörsmiljön startas
hämtas information om användaren från Proview's användardatabas, bl a vilka rättigheter
operatören har att påverka systemet från processbilder.
- OpNumber ska vara samma som i OpPlace objektet.
- MaxNumberOfEvents anger antalet händelser som operatörens händelselista kan innehålla
samtidigt.
- SelectList anger vilka hierakier i anläggninghierakin, som operatören vill ta emot larm
......@@ -1167,14 +1246,14 @@ I FastAvail specificerar man XttGraph objekt som ska kunna startas fr
'Operator window'. NoFastAvail specificerar antalet tryckknappar som används. Man kan ha
upp till 15 tryckknappar. Oanvända tryckknappar visas ej i Operator Window.
Se User i Objektshandboken <classlink>user,"",$pwr_lang/pwrb_xtthelp.dat
Se OpPlace i Objektshandboken <classlink>opplace,"",$pwr_lang/pwrb_xtthelp.dat
<b>Operator Window
<image> dg_fig45.gif
<h2>XttGraph objekt
XttGraph objekt används främst för att visa processbilder. I objektet pekar man ut den graf
som ska visas. Objekten refereras i User objektets FastAvail attribut, och i attributet
som ska visas. Objekten refereras i OpPlace objektets FastAvail attribut, och i attributet
DefGraph som bl a finns i $PlantHier och signal objekt.
När objektet refereras i FastAvail kan man även utnyttja möjligheten att exekvera
......@@ -4393,35 +4472,135 @@ skapar PLC program och processbilder. Nu
I avsnitten visas hur man
- skapar laddatafiler.
- skapar bootfil.
- distribuerar.
- bygger systemet. <link> dg_build
- startar simulerings miljö <link> dg_simulate
och runtime monitorn. <link> runtime_monitor
- distribuerar. <link> dg_distribute
- startar runtime miljö.
<h2>Syntax kontroll
Innan man skapar laddatafiler för en volym är det lämpligt att göra en syntaxkontroll.
Det görs från menyn i konfiguratören, 'File/Syntax'.
<h1>Syntax kontroll
Vissa klasser har en syntax metod som kontrollerar att objektet är rätt konfigurerat.
Metoden för signaler kontrollerar t ex att de är kopplade till en kanal, metoden för
ett PlcPgm att den är kopplade till ett trådobjekt etc.
Syntax metoderna fångar upp en del fel, men är inte någon garanti för allt fungerar
felfritt.
Syntax-metoderna körs när 'Functions/Syntax Check' aktiveras i Configuratorn.
</topic>
<h2>Skapa laddatafiler
Innan runtimemiljön kan startas för systemet, måste man skapa laddatafiler, en för varje
rotvolym, subvolym och klassvolym. Laddatafiler skapas från menyn i konfiguratören,
'Function/Build Volume'.
<topic> dg_build
Bygga
Innan man har en körbart system för en nod måste man bygga noden. Det innebär att man
genererar alla de filer som behövs i runtime-miljön, t ex en boot-fil som talar om
vilka volymer som ska laddas, laddatafiler för volymerna som innehåller info om objekt i
volymen, en exe-fil för plc-programmet etc.
<h2>Skapa bootfil
För varje nod i projektet ska man skapa en bootfil. Bootfilen innehåller huvudsakligen vilken
rotvolym som ska laddas in när noden startas. Bootfilen skapas från menyn i konfiguratören,
'Functions/Build Node'. Detta kommando bygger även ihop ett plcprogram för noden.
Man bygger genom att aktivera 'Functions/Build Node' i konfiguratorns meny, eller motsvarande
knapp i verktygspanelen. Om man har flera noder definierade i projektet måste man även välja
nod i den lista som visas.
<b>Val av nod vid skapande av bootfil
<image> dg_fig66.gif
<b>Fig Val av nod
Nu är allt i utvecklingsmiljön konfigurerat och genererat och det är dags att sätta upp
runtime miljön.
Också bygget är uppdelat i metoder för olika klasser. Byggmetoden för ett PlcPgm är att
generera kod för de fönster som är ändrade och kompilera dessa. Byggmetoden för en volym är
att anropa byggmetoderna för alla objekt i volymen, samt att skapa en laddatafil för volymen.
Byggmetoden för en nod är att anropa byggmetoden för volymen, samt skapa en boot-fil och
länka plc-programmet. Byggmetoden för ett objekt kan anropas genom att välja ut objektet och
aktivera 'Functions/Build Object' i menyn, och byggmetoden för aktuell volym genom att aktivera
'Functions/Build Volume'.
<h2>Installera Proview runtime paket
...
Här följer en beskrivning på några byggmetoder.
<h2>Distribuera
...
XttGraph <t>Kopierar .pwg filen för grafen från $pwrp_pop till $pwrp_exe.
WebGraph <t>Exporterar grafen till java, kompilerar och lägger in i arkiv.
WebHandler <t>Genererar html-filer för nodens hemsida och konverterar xtt-hjälp filen till
<t>web format (html).
PlcPgm <t>Genererar c-kod som kompileras av c-kompilatorn.
RootVolume <t>Anropar byggmetoden för all objekt i volymen, samt skapar en laddatafil med
<t>info om volymens objekt. Skapar även korsreferens filer
<t>om detta är specificerat i Options.
ClassVolume <t>Genererar include-filer med c-struct'ar för volymens klasser, samt skapar
<t>en laddatafil med typ och klassbeskrivningarna.
Node <t>Anropar byggmetoden för rotvolymen om volymen är tillgänglig. Skapar en bootfil
<t>med info om vilka volymer som ska laddas in och länkar plc-programmet för noden.
Normalt kontrollera byggmetoderna först om något är ändrat, och utför endast bygget om den
hittar någon förändring. I vissa fall vill man tvinga ett bygge, och sätter då 'Force' i
Build kolumnen i options som öppnas från 'Options/Settings' i menyn. Här kan man även markera
om man vill skapa korsreferens-filer vid bygge av en volym, eller om man vill kompilera och
länka plc-programmet med debug.
Om man har använder subvolymer eller delade volymer måste dessa byggas med 'Build Volume'
innan noden byggs.
</topic>
<topic> dg_simulate
Simulering
Simulering innebär att man startar upp systemet för en process eller operatörs station på
utvecklingsstationen. På detta sätt kan man snabbt testa program och bilder under utvecklings-
fasen. Även när ett system har tagits i drift kan man testa ändringar i systemet innan man
laddar ner till produktions systemet.
Vid simulering måste indata från processen simuleras, och det gör man genom skapa ett PlcPgm
som läser data som ställs ut till processen, dvs Do och Ao, och utifrån dessa sätter värden på
Ai och Di objekt. Det finns speciella StoDi och StoAi objekt för detta som endast används vid
simulering. Man måste se till att simulerings-programmet enbart exekverar vid simulering,
t ex genom att sätta ScanOff attributet i PlcWindow objektet om IOSimulFlag i IOHandler
objektet inte är 1.
För att kunna starta en simulering på utvecklingsstationen den konfigureras i directory
volymen. Simuleringen sker på en separat QCom bus vilket konfiguras med ett BusConfig som
läggs på topnivån i directoryvolymens högra fönster. I detta anges även en busidentitet, t ex
999. Under BusConfig objektet lägger man ett NodeConfig objekt för utvecklingsstationen, och
fyller i nodnamen och ip-adress. Man kan använda loopback adressen 127.0.0.1 om man inte avser
att kommunicera med andra noder. Vidare måsta man ange vilken volym man vill simulera
genom att sätta volymen som namn på RootVolumeLoad objektet under NodeConfig objektet.
Notera att konfigurerings guiden för directoryvolymen normalt skapar en simuleringsbus och
en simuleringsnod.
<image>dg_fig104.png
<b>Fig Directoryvolymen med konfigurering för utvecklingsstation newton
När utvecklingsstationen är konfigurerad, bygger man genom att öppna konfiguratören för den
volym som ska simuleras, aktivera 'Build Node' och välja utvecklingsstationen in i listan
av noder som visas.
Innan man startar måste man definera omgivningsvariablen PWR_BUS_ID till identiteten för
simuleringsbussen. Defaultvärdet för PWR_BUS_ID anges i filen /etc/proview.cnf, parameter
QcomBusId. Med kommandot
<c>> echo $PWR_BUS_ID
kontrollerar man bussidentiteten, och med kommandot
<c>> export PWR_BUS_ID=999
sätter man ett annat värdet. Det här kommandot kan t ex läggas in i $pwrp_login/login.sh.
Nu kan man starta Proview runtime med
<c>> rt_ini &
och stoppa med
<c>> . pwr_stop.sh
Om Proview inte startar kan man addera -i till start-kommandot för att se eventuella
felutskrifter
<c>> rt_ini -i
Observera att man alltid måste nollställa genom att köra '. pwr_stop.sh' kommandot före ett
nytt startförsök.
När runtime-mijön är startad kan man utforska systemet genom att starta runtime navigatören.
<c>> rt_xtt
Man kan även använda runtime-monitorn för att starta runtime-miljön. Se nedan.
</topic>
<topic>runtime monitor
......@@ -4442,6 +4621,7 @@ F
- att rätt kommunikationsbuss är uppsatt. Det gör man genom att sätta omgivningsvariabeln
PWR_BUS_ID till den buss man har angivit i BusConfig objektet i projektvolymen. t ex
<c> export PWR_BUS_ID=999
För att runtime monitorn ska fungera krävs dessutom att det finns ett StatusMontitorConfig
......@@ -4456,10 +4636,108 @@ Knappen 'Restart Runtime' g
Observera att vissa ändringar inte följer med vid en mjuk omstart, t ex ändrade värden på
attribut i objekt som redan finns sedan tidigare.
</topic>
<topic> dg_process_station
Process och operatörsstationer
I det här avsnittet går vi igenom det punkter som måste genomföras för att Proview ska kunna
startas på en process eller operatörsstation.
- konfigurering av noden i directoryvolymen.
- noden ska byggas.
- installation av runtime paketet.
- distribuering till noden. <link> dg_distribute
- uppstart av runtime-miljön på noden. <link> dg_rtstart
<h1>Konfigurering in directory volymen
Noden måste vara konfigurerad i directory volymen med ett NodeConfig objekt. Detta läggs
under ett BusConfig objekt som innehåller bus identiteten för produktionsbussen. I NodeConfig
objektet konfigurerar man nodnamn och IP-adress, och under NodeConfig objektet ligger ett
RootVolumeLoad objekt som anger den rotvolym som ska startas i noden.
Noden byggs från rotvolymens konfiguratör genom att aktivera 'Functions/Build Node' och välja
ut noden i listan på noder (om det endast finns en nod konfigurerad visas inte listan).
<h1>Installation av runtimepaketet
Runtime-miljön installeras på process/operatörs-noden genom att installera pwrrt-paketet för
aktuell Linux distribution. Läs installationsguiden på Download-sidan på www.proview.se för
mer information.
</topic>
<headerlevel>
<topic> dg_distribute
Distribuera
Att distribuera innebär att man samlar ihop de filer som skapas vid bygget av en nod, och som
behövas för att kunna köra runtime-miljön, till ett paket. Paketet kopieras till process
eller operatörsstationen och packas upp där.
Vilka filer som ingår i paketet konfigueras i directoryvolymen med ett Distribute objekt som
läggs under NodeConfig objektet för noden. Distribute-objektet innehåller attributet Components
i där man anger vilken typ av komponenter eller filer som ska ingå. Om komponenter är
angivna som inte finns genererade resulterar det i varningsutskrifter vid distributionen.
<image> dg_fig106.png
<b>Fig Distribute objektet
Om man t ex har andra filer, t ex applikations-program, som ska ingå i paketet, lägger man ett
objekt av typen ApplDistribute under Distribute objektet. I ApplDistribute objektet kan man
ange den eller de filer (specification med wildcard är tillåten) som ska adderas, samt till
vilken katalog de ska kopieras.
Alla filer som behövs i runtime bör ingå i paketet. Dels är det viktigt att ett paket
representerar en fullständig version av systemet, så att runtimemiljön kan återskapas, t ex
om man vill backa tillbaka till en tidigare version. Råkar man ut för en disk-krash är det
också viktigt att allt finns i paketet, och att det inte behövs diverse handpåläggning för att
systemet ska starta med en ny disk.
Distributionen utförs från Distributören som öppnas från 'Functions/Distribute' i
konfiguratorns meny. Välj ut den nod som ska distribueras till och aktivera
'Functions/Distribute' distributörens menyn.
<image> dg_fig105.png
<b>Fig Distributören
Distributören samlar nu ihop angivna filer, skapar ett paket och kopierar till användaren
'pwrp' på processnoden. ssh kräver att man anger passerord, detta anges två gånger i det
terminalfönster från vilken konfiguratören är startad. Vid installationen har användaren
'pwrp' passerordet 'pwrp' men detta kan ha ändrats av säkerhetsskäl.
Om man inte har nätverkskontakt med processnoden, kan man skapa ett paket och flytta det t ex
med en USB sticka. Välj ut noden i distributören, och aktivera 'Functions/Create Package'.
Paketet lagras på $pwrp_load med namnet pwrp_pkg_'nodename'_'version'.tgz, t ex
pwrp_pkg_cross1_0002.tgz. På processtationen packar man upp med skriptet pwr_pkg.sh och
anger namnet på paketet.
<c>> pwr_pkg.sh pwrp_pkg_cross1_0002.tgz
<h1>Backa till tidigare version
Ibland fungerar inte en ändring som planerat och man vill backa tillbaka till föregående
version. Detta gör man enkelt med pwr_pkg.sh. Paketen lagras på användaren pwrp hemma-katalog
/home/pwrp. Genom att leta upp det paket som tidigare var installerat och starta pwr_pkg.sh
med detta återställer man till denna version.
<c>> pwr_pkg.sh pwrp_pkg_cross1_0001.tgz
</topic>
<topic> dg_rtstart
Starta runtime-miljön
Runtime-mijön startas med kommandot
<c>> pwr start
och stoppas med
<c>> pwr stop
eller
<c>> pwr kill
Kommandot 'pwr stop' kräver att alla processer lever, medan 'pwr kill' är lite tuffare och
rensar i alla lägen.
</topic>
</headerlevel>
</chapter>
<chapter>
......
......@@ -654,9 +654,9 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! @Summary Integer output IO1.
! @Summary Integer output OI1.
! Integer output.
! IO1 is used to refer to the output in the code.
! OI1 is used to refer to the output in the code.
!*/
Object OutI1 $Output 43
Body SysBody
......@@ -668,9 +668,9 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! @Summary Integer output IO2.
! @Summary Integer output OI2.
! Integer output.
! IO2 is used to refer to the output in the code.
! OI2 is used to refer to the output in the code.
!*/
Object OutI2 $Output 44
Body SysBody
......@@ -682,9 +682,9 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! @Summary Integer output IO3.
! @Summary Integer output OI3.
! Integer output.
! IO3 is used to refer to the output in the code.
! OI3 is used to refer to the output in the code.
!*/
Object OutI3 $Output 45
Body SysBody
......@@ -696,9 +696,9 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! @Summary Integer output IO4.
! @Summary Integer output OI4.
! Integer output.
! IO4 is used to refer to the output in the code.
! OI4 is used to refer to the output in the code.
!*/
Object OutI4 $Output 46
Body SysBody
......@@ -710,9 +710,9 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! @Summary Integer output IO5.
! @Summary Integer output OI5.
! Integer output.
! IO5 is used to refer to the output in the code.
! OI5 is used to refer to the output in the code.
!*/
Object OutI5 $Output 47
Body SysBody
......@@ -724,9 +724,9 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! @Summary Integer output IO6.
! @Summary Integer output OI6.
! Integer output.
! IO6 is used to refer to the output in the code.
! OI6 is used to refer to the output in the code.
!*/
Object OutI6 $Output 48
Body SysBody
......
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