Vigo Fieldbus Management System For Windows 95/98/ME/XP/NT/2000/XP/VISTA
Vigo Fieldbus Management System For Windows 95/98/ME/XP/NT/2000/XP/VISTA
VIGO
Manual
GB
PROCES-DATA A/S
NAVERVEJ 8, DK-8600 SILKEBORG • Tel. +45-87 200 300 • Fax +45-87 200 301 • [email protected] • www.proces-data.com
502 086 07
September 2006
502 086 07
Contents
1 General information
VIGO is a Fieldbus Management System, installed on PC’s running the Microsoft Win-
dowsTM operating systems. VIGO is used in conjunction with process automation systems,
where individual control units are distributed within a plant, and where one or more Field-
buses are used for the data inter-communication. Microsoft WindowsTM is an operating sys-
tem, which executes programmes, controls the keyboard and screen, manages the hard
disc and contains tools for configuration and program execution. In a similar way, VIGO is
an "operating system", used to handle the different tasks specific to a Fieldbus system.
• To hold information about the location and type of each identifier. This information in-
cludes the node address for the interface module, a logical or symbolic address, an
offset, the data structure, the data type etc.
• To keep track of which tools can be used with the various types of data and data struc-
tures, with consideration for the actual physical objects and interface modules used
within the plant. These tools may be configuration tools, compilers, assemblers etc.
• To provide information to compilers and assemblers about variables that already exist
in VIGO, so that they do not need to be declared again. It is therefore possible to cre-
ate compilers where one does not need to declare global variables, because the com-
piler itself can load the necessary information directly from the description that VIGO
holds about a plant.
• To associate the users program files, help files, connection diagrams, data specifica-
tions etc., with the physical objects and modules, which are contained within the VIGO
description of the plant.
• To simulate plant data within the PC. This facility can be used in connection with an
off-line configuration, backup / restore of plant information and when simulating plant
functionality. This is useful for training purposes.
From the users point of view, all these tasks are handled by VIGO, and the result is a sim-
ple, uniform and well-defined interface to all data on the networks. VIGO is an open sys-
tem, where the program interface is written in such a way, that new tools and new Fieldbus
systems can be developed and added by the user.
The impact of using VIGO is significant, in that there is now only a need to interface to one
system, no matter what the Fieldbus type is. Tools, utilities and programmes developed for
use with VIGO can therefore be regarded as general purpose. This means that an increas-
ing number of companies can provide packages for common use, which will result in a
shorter development phase. This will also lead to cost savings, since an integrator needs
only to understand one system.
VIGO allows user applications to be designed without consideration for the underlying net-
works, by representing those networks as a collection of independent, installable compo-
nents.
VIGO provides the opportunity for the user to dynamically add new tools, such as a Node
Configuration Editor, a MAP file converter, a Backup/Restore utility, a Monitor, a Compiler,
etc.
All this makes VIGO an open system, which can always be expanded for inclusion of new
network connections to physical objects, and new tools for configuration. It is open, in the
sense that anyone can provide a network or tool implementation, and anyone can develop
an application that uses the communication functions offered by VIGO.
Within the following sections, the elements of VIGO will be examined in greater detail.
VIGOSERV supports functions, such as read and write to variables, upload and download
of files, start, stop and reset of programs, etc., without being aware of network operations.
These functions, together with all their parameters, define the Common Application Service
Interface. The figure below illustrates the link between VIGOSERV and user applications.
In VIGO, the entire collection of variables within a Node can be regarded as one large vari-
able of complex type, the Node type. Access to a variable within a Node is described using
the same method as with an access to a Record in the Pascal or C languages, where the
Node is the Record and the variable is a field within that Record.
In a similar way, the contents of all Nodes within a plant can be regarded as one huge vari-
able, organised as a Record and represented by a Project identifier. Access to a Node
within a Project is then described by means of the Node identifier, where the Project is the
Record, and the Node is a field within the Project Record.
A global identifier, unique for a specific variable within the plant, may now be composed by
combining the above-mentioned structured elements. A global identifier is the same for any
device within the Project and starts with the Project identifier followed by a ':'. The rest of
the global identifier is then constructed, by appending the Node identifier and the sub-
element identifiers, to create the complete path to the variable. Each identifier is separated
by '.', in exactly the same way as access to fields in a Record, e.g.:
Project_Identifier:Node_Identifier.Variable_Identifier
As an example, a simple Variable will be used. The Variable is identified by a Name, called
the Variable_Identifier. The location of the Variable describes the internal address within a
Node. The Type description for a simple Variable just defines one of the basic data types,
e.g. real, byte, boolean etc.
If more than one Variable of identical Type is found within a Project, the Type only needs to
be defined once. This includes Node Types.
Node Types are typically rather complex, but having a well-defined structure. Such types
may be generated automatically from device descriptions or by compilers/assemblers.
As described above, the MIB contains all the information required to access a physical ob-
ject, such as a digital I/O, an analog I/O, a flow meter, etc. When VIGOSERV requests in-
formation from the MIB, using a global identifier for a physical object, the MIB collates all
necessary information about the physical object, and returns this to VIGOSERV.
In other words, the MIB describes how data is structured, how different data elements are
related, where data is stored, and who has access to that data. It therefore enables a
physical plant to be completely described as a Project, in terms of data, related data struc-
tures and data location.
Once the data definition is completed, a system is capable of automatically acquiring data
from, and distributing data to, control level devices, such as Windows applications, process
computers, PCs, PLC’s, I/O modules, etc.
This data must be packed in such a format in order that the related network driver is able to
transform it for network communication. The IDC and network driver is always closely
linked to each other, by means of an internal network specific packet format.
HUGO2 is designed for both time critical and non-time critical communication. Time critical
communication is controlled by hardware interrupts, whilst non-time critical communication
is performed by means of messages within the Windows environment.
HUGO2 can dynamically load network drivers, which gives the user the opportunity to add
new network drivers if required. Basically, HUGO2 is a transport system, which means it
does not need to know what is being sent. The interpretation of Fieldbus messages is car-
ried out by the associated IDC.
HUGO2 is also a communication system that manages data security and integrity, for data
inquiries made to the plant.
A communication network can be realised in several different ways. Three network types
can be connected to HUGO2. These are Fieldbuses, Local Area Networks (LAN) and Wide
Area Networks (WAN). There are distinct differences in the usage of these network types.
The LAN and the WAN types are only used for transporting messages, which means they
have no knowledge of what is being sent on the network, whereas Fieldbuses have built in
protocols, which interpret the contents of what is being sent and received.
The combination of network types provides the capability of installing a Windows applica-
tion on a PC, which has access to a Local Area Network and/or Wide Area Networks, and
then routing the information via another PC, which has access to a Fieldbus, to which the
physical object is connected.
User
Applications
VIGOSERV MIB
P-NET
P-NET
Protocol
HUGO2 HUGO2
The VIGO window consists of three tabs: [MIB View], [Workspace] and [MIB Edit].
VIGO can be used for a variety of purposes, which depend on the requirements of the user.
Before VIGO can be used, it must be configured to match the required VIGO environment.
This includes establishment of a Workspace having a selection of projects enabled, to-
gether with all the parameters of the appropriate drivers correctly set.
MIB Edit is used by the systems integrator who wants to set up a new, or modify an existing
system, and needs to carry out the necessary configuration of the nodes. In this situation,
VIGO can be started up from the Start Menu, from a shortcut or directly from the Windows
Explorer.
that are relevant to the selected item. Such tools can be selected from a menu that appears
when the right mouse button is clicked on a highlighted item.
The MIB supports a Grouping element that allows the user to group nodes, aliases etc. A
group is shown with a group symbol, which is similar to a folder in Windows. The use of
groups helps to provide you with an improved structural overview of your project, since you
can create a group for a specific section of your plant or for a single machine.
[MIB View] utilises a custom control, called MIBOCX, which is an "OLE Control Extension",
designed for VIGO. The MIBOCX is used to provide a visual representation of the structure
and relationship of the variables within a project.
The project structure is shown in the form of a tree, in a similar way as does the Windows
Explorer file manager. However, instead of showing folders and files, the MIBOCX in [MIB
View], illustrates the nodes and variables relating to the project description of the system.
The same MIBOCX control can be included in other programs, such as those developed
using Visual C++, Visual Basic or Delphi, since all of these languages support the use of
such controls.
If the right mouse button is pressed when an element in the structure is highlighted, a menu
is shown. This menu provides a choice of functions and tools, but which are only relevant
for the selected element.
A Node within the Project description (the MIB) is defined as a module or a unit within the
physical plant (e.g. a PD3221- Universal Process Interface, UPI).
Each Node is represented by a Node icon in the MIBOCX.
A Node, which is a variable, is based on a type, a Node type. The Node type describes the
data structure within the node. The data structure of a particular Node variable, e.g. it’s
channels and registers, can be seen by clicking on the Node icon’s + sign. A particular
Node type can be used many times within a project description.
The MIB description is built using a number of inter-related elements. These elements may
be of different Kinds. One Kind of element can represent a Node. Another Kind of element
can represent an Array, and yet another can represent a Channel. Each Kind of element is
represented with a particular icon, used to illustrate the variable in the MIBOCX.
It is also possible to select an element of an array, by changing the element index number.
Click once on the selected index number, type in a new index number and then click the
mouse pointer elsewhere.
In the example shown above, the Project is called Simulation Project and the Node is called
UPI. Within the UPI node, the data structure in the form of channels can be seen. Within
the ANALOG_IN_1 channel, the register ANALOGIN is highlighted. The complete global
identifier for a selected variable is shown in the Global identifier field.
The ANALOGIN register shown above has the complete global Physical identifier:
SimulationProject:UPI.ANALOG_IN_1.ANALOGIN
2.2 Workspace.
A [Workspace] in VIGO describes which projects will be loaded, defines the default project
and identifies a Node in a project where the driver parameters and port settings are de-
fined.
Each workspace holds its own set of parameters. The name for the workspace can be cho-
sen to be the same as the name of the location. Workspaces can be added/deleted from
the pull down menu. The [Workspace] list box shows the selected workspace used by
VIGO.
A [Default project] can be selected. When the global identifier is without project name, the
default project is assumed. A Project may contain a number of networks, each with a num-
ber of Fieldbus nodes connected. These networks are specified as properties of the project.
The <Driver Parameters> button will display a new window, showing Port and Net proper-
ties for the driver in question. The properties cannot be edited from this window. See also
Guidance for selecting node address … on page 65.
The values of the properties are stored in the MIB file, so the values can be edited from the
[MIBEdit] tab.
Some drivers, e.g. the P-NET 3920 driver for Windows NT, requires parameters that are
not suited to store in the MIB file. These parameters can be edited by clicking the <Ad-
vanced> button in the [Driver Parameters] window. The <Advanced> button will only be
present if the driver in question needs such parameters.
2.2.1 Import/Export
From the [Workspace] menu it is possible to both import and export a Workspace.
Exporting a Workspace will gather all relevant configuration data relating to the workspace
(including MIB and SIM files for enabled projects) and put this data in a single file. This
VIGO Configuration File will have the extension vcf, and can be imported from another PC.
The Import/Export feature is a fast and simple way to move a configuration from one PC to
another. Companies who install VIGO along with their own products can also use it. They
can setup their workspace as needed, export it and copy the file to a floppy disk. Inserting
the disk in the PC during the VIGO install, will force VIGO to import this configuration file
instead of the default configuration files that follows with the VIGO system.
The various Types used within the MIB can be divided into two distinct groups:
The properties of an Array type element holds information about the type structure of the
Array elements, as well as the minimum and maximum index for the Array. A string is a
special form of an Array (consisting of an array of characters) and is represented by a red
String type Icon.
Group 2:
This group of types
(complex types) is
described in the
MIB as a Type Ele-
ment, and is
shown with a red
icon, and having
one or more Sub
Elements, indi-
cated with blue
Icons. The Type
Element properties
hold the name of
the type, and the
structure of the
type, (Nodetype,
Channeltype, Re-
cordtype etc.).
Blue icons are also used for physical Nodes, Aliases and Virtual names. These icons are
not shown in Types view.
The MIBOCX offers the ability to show Nodes or Virtual elements or both, in Variables view.
The icons shown in the MIBOCX represent variables, and they are normally blue, except
for the Project icon and the array index, which are red. The purpose of providing a means
of selecting which elements to show reduces the total number of icons displayed, and helps
to make it easier to select a particular icon.
By clicking a “+” sign, the MIBOCX will automatically find and show the icons representing
the Sub elements. New nodes, and Virtual elements of an already defined type, can be
easily inserted.
Virtual names and aliases can be used to give alternative names to already defined Vari-
ables.
In the Types View mode, the MIBOCX only shows the tree structure of the types to two lev-
els. A red icon with a “+” sign can be opened, and one or more blue icons will appear. This
mode provides the opportunity to see all type definitions available within the Project, and to
define new types.
When a new type is created, such as a new Nodetype, a Recordtype or an Arraytype, all
the associated sub elements must already be declared, before the complex type is defined.
This is similar to the procedure used when declaring types in Pascal or C++.
The Properties of a
new Element must
be set up, before
the new element
can become operational. This is achieved by using the Properties Window, selected by us-
ing the right mouse button menu inside the MIBOCX.
The [MIB Edit] tab loads a copy of the MIB files into memory. These files are not used for
communication, and during editing VIGO will continue to use the old version of the MIB
files, until the new files are saved. When the MIB files are saved, all VIGO objects will
automatically be updated to reflect the contents of these new files.
To save memory, MIB Edit can be disabled, using the [Disable MIB Edit] check box.
The MIB is a collection of such elements, which are referenced to each other as Parent,
Sub, Next or Previous element.
The [Type Info] tab provides information about the selected type, and cannot be modified
from here. The [Summary Info] tab shows the access conditions that VIGO is using to ac-
cess the selected variable. These access conditions are not necessarily the same access
conditions that are defined for the element, as shown on the [Element Info] tab sheet. Fur-
thermore, the [Summary Info] shows the Internal address as the sum of SWNo and Regis-
terNo for the variable.
If the MIBOCX is in Types View, [Element Info] shows the Kind of element and type Name
of the selected item (red icons). For sub elements (blue icons), [Element Info] is used to se-
lect the type and relative location of the sub type. The [Type Info] shows the properties of
the selected type and can be modified from here (modification can only be undertaken with
red icons).
Kind
The Kind field shows the selected MIB Element type. Depending on the Kind actually se-
lected, some of the following Properties can be applied, and are shown either in the [Ele-
ment Info] or [Type Info] sheets.
The Kind is selected during the generation of new MIB elements. The New function is
available in the MIB Edit’s right mouse menu. The Kind for a MIB element in the MIBOCX
can only be changed, by firstly deleting it and then by adding a new MIB element of the re-
quired Kind.
The different Kind icons are listed below. The first group being red icons, the next group be-
ing blue icons, and the last group being icons used for special elements.
Project
BasicType NodeType ChannelType
RecordType Enumerated ArrayType
BitArrayType BufferType SetType
String BitMapType PointerType
Procedure Function VirtualRecordType
VirtualArrayType EnumeratedName NetType
Node (*)
Channel Register SoftwireNo
RecordField Constant Alias
VirtualName Port Net
* Elements of Kind Node can have different icons, depending on the NodeType:
When clicking on the Icon in the properties window, a new window for selecting an icon will
appear, and the user can change the Icon for a specific Node.
Name
The Name field holds the partial identifier for the variable or the type, which the MIB Ele-
ment represents. The identifier can be modified, by first selecting the icon from the
MIBOCX, then clicking the left-hand mouse button once on the name string, to enable the
editing facility.
Type
The Type field indicates a type identifier for the variable or the type, which the MIB Element
represents. In the Variables view, the Type can be selected or changed for Nodes and Vir-
tual Names, by using the list box, and choosing one of the already defined types. In the
Types View, the Type is used to select or change the sub types, which are to be included in
already defined types.
[Max CtrlCards]. If the Operating system in the hardware device supports multiple commu-
nication blocks for LongLoad and LongStore, this value indicates how many communication
blocks the PC should try to use.
[Ports] – Identifying the available Communication ports for this Node Type. You can jump to
a Port by selecting it in the list box and click on the <Go to Port> button.
[SWNo:]. In P-NET, a SoftWire number (SWNo), defines a logical address to identify a vari-
able. The [SWNo] must be set in accordance with the actual value within the node.
[RegisterNo] - holds the number, which references the location of a variable within a Chan-
nel. (SoftWire offset)
[Offset] - holds the offset, (in number of bytes) of a Record Field within a Record.
[Node Addr(dec)]. This field holds the node address, which has been reserved for the node.
This field is used together with the property of the Net, to form the complete route to the
node. The Node address is a decimal value.
If the Net, to which the node is connected, is a Modem port, an additional field appears
within which a telephone number must be set.
If the Port is a LAN port, the node address is either an IP or an IPX address (help on setting
up an IP or IPX connection is found on the [Workspace] tab under [Driver parameters] for
the IP or IPX driver). This field is also used by P-NET, when utilising the Set P-NET Node
Address program.
[Reference] is used to describe the full global identifier for an Alias. The reference can only
refer to another identifier within the same project description, and therefore the Reference
must be without the Project Identifier.
A Project may include a number of different communication networks, each having a variety
of Fieldbus nodes connected. Each network (Net) is identified with a Net Identifier.
Public Nets, which have been defined and named within a particular Project, are available
to other projects within a given Workspace. Public Nets in different projects with identical
names are therefore assumed to be connected. Private Nets having the same name as
given in other Projects are assumed to be different Nets.
A pre-defined Nettype can be selected for use by a Net, such as a Local Area Network
(LAN), Modem, Fieldbus etc. The type list box provides the means to select the required
Net type for the net in question. Only NetTypes defined within the same project will be
shown.
The information about all the Nets that are included in a Project is stored in the MIB file.
This means that a MIB file can be located in a server, and shared with others.
“Create new standard MIBfile” - which means that a description file called “PDTYPES.MIB”
is copied and associated with the new project. This file contains several predefined Types,
which can be used inside other Types, or for setting up new variables or a complete Pro-
ject. New Types can also be added to this Project description file.
“Create new empty MIBfile” - which means that a description file called “EMPTY.MIB” is
copied and associated with the new project. This file contains only simple predefined
Types. New Types can also be added to this Project description file.
“Copy From Existing MIBFile” – means that a new MIB is created, which is based on a MIB
that already exists. Amendments to this file will not affect the MIB from which this file origi-
nated.
“Use existing MIBfile” – which means that the MIB file associated with this project is not
copied but uses one that has already been generated. An existing MIB file can be selected
by using the Browse facility. It should be noted that any amendments made to this file
would also be seen by other projects, which have been specified to use this MIB.
The actual name and location for a MIB file for a specific project can be found by selecting
Properties on the right mouse menu for the Project in question. A new MIB file can also be
selected by clicking the Browse button.
Modifying Projects
Selecting an element in a Project description is performed using the left-hand mouse but-
ton. Sub elements can be displayed if a plus [+] sign, associated with an element is clicked.
Sub elements become hidden when a minus [-] sign is clicked. It is also possible to select
an element of an array, by changing the element index number. Click once on the selected
index number, type in a new index number and then click the mouse pointer elsewhere.
When modifying a Project description, the right mouse button menu is used to add, copy,
paste and delete Elements within the MIB. This can be performed from within one Project
description, or between different Project descriptions.
The right mouse menu is object oriented, which means that the functions in the menu vary,
depending on the selected object/element. The principle is, to present only the functions
and tools, applicable to the selected object.
To ensure that all types within a Project description are declared before they are used, a
Consistency check can be performed (selected by using the right mouse button).
The result of the Consistency check is automatically displayed in the form of a dialogue box
indicating OK, or by providing a list of errors.
The Properties for any element are set from the [Properties] window, available from the
right mouse button menu, when the element is selected.
If [None] is selected, no writing to any variable is permitted, but they can all be read.
When [To not protected variables] is selected, normal unprotected variables can be written
to.
Generally, if the property of a variable in the MIB indicates no write access, the above se-
lection will have no effect, and the result will be no write access to that variable.
Besides the [Default write access for projects], a [Specific write access for project] can be
defined. In this way, the write access can be defined individually for each or a specific pro-
ject. The write access definition for a specific project will overwrite the default definition.
The availability of certain [Right mouse button programs] can be limited for the different
types of users. The right mouse button programs are divided into five groups, and each of
the groups can be selected as available or not. The selection will be directly reflected on
the right mouse button menu when selecting the elements in the MIB using the MIBOCX.
VIGO
set Object1 = CreateObject("VIGO.Std")
Virtual
Object:
From now on, the application will point to the Vir- Object1
tual Object by using the Virtual object Identifier.
Application #1 Domain
Step 2:
Software
The next step is to associate the Application #1
eg. Visual Basic
virtual object with the physical ob-
ject. Object1.PhysId = "Valve_1"
VIGO
The virtual object within VIGO,
Virtual Manager
has a property called PhysId, Object:
Target
Information
Object1 Base
which contains the Physical Iden- Specification
All information that is necessary to access the physical object will be obtained from the
previously configured Manager Information Base (MIB), by setting the PhysId property.
See the figure above.
For example, a valve is the Physical Object, and labelled as 'Valve_1’. In the Manager In-
formation Base, the 'Valve_1' is used as the Physical Identifier for this valve and points to
the physical Valve.
Object1.PhysId = "Valve_1"
Physical Identifier
VIGO property
Step 3:
Once the virtual object points to the Software
physical object, it is possible to operate Application #1
eg. Visual Basic
upon the physical object. For example, it
is possible to read or write to a variable. X = Object1.Value 1 4
VIGO
In the case of the valve identified as
Valve_1, it is now possible to get (read) Virtual
or set (write) the state of Valve_1. Object:
"Object1"
By assigning the Value property of the virtual object "Object1" to the local application vari-
able X, X will contain a Boolean value indicating the valve state of the physical object.
If the application needs to manipulate another physical object, step 2 and step 3 have to be
carried out again.
For example, to read the value within a physical object uniquely identified as "FlowRate"
and then to read a temperature in a different object, the following code would be used when
using the same virtual object.
Object1.PhysId = "FlowRate"
Y = Object1.Value
Object1.PhysId = "SampleProject:UPI.ANALOG_IN_1.ANALOGIN"
Z = Object1.Value
For example:
Set Object1 = CreateObject("VIGO.Std")
Set Object2 = CreateObject("VIGO.Std")
Set Object3 = CreateObject("VIGO.Std")
Step 2:
The second step is to get the virtual objects to point to the Physical Objects.
The association of virtual objects with physical objects only needs to be carried out once.
This means that the procedure of calling the MIB with the global identifier, in order to re-
trieve the related information and apply it to the Target Specification, is only done once.
Following this, the physical objects can be directly manipulated via the virtual objects, lead-
ing to a faster access, because all the network and address information is available within
the Target Specification.
For example:
Object1.PhysId = "Sample:UPI.Service.DeviceId.DeviceNumber"
Object2.PhysId = "ValveState"
Object3.PhysId = "Temperature"
Software
Application #1
eg. Visual Basic
Object1.PhysId = "Sample:UPI.Service.DeviceID.DeviceNumber"
Object2.PhysId = "ValveState"
Object3.PhysId = "Temperature"
VIGO
Virtual
Target
Object:
Specification
Object1
Virtual Manager
Object: Target Information
Object2 Specification Base
Virtual
Object: Target
Object3 Specification
Application #1 Domain
Step 3:
Now that the virtual objects are Software
pointing to their associated physical Application #1
objects, each of the three physical eg. Visual Basic
Virtual
(Read device number) Object:
X = Object1.Value Object2
(Read valve state) Virtual
Y = Object2.Value Object:
(Read temperature) Object3
Z = Object3.Value
Application #1 Domain
Physical Process
The first assignment will enable the device number to be ascertained from the application’s
local variable X. The second assignment will enable the valve position to be determined by
the local variable Y. The third assignment will ensure that the variable Z contains the tem-
perature value.
When it is required to update the values several times, only step 3 needs to be carried out
again. No further calls to the Manager Information Base will be carried out, because all the
required data are already contained within the virtual objects.
If a number of separate applications need to operate on the same physical object, each ap-
plication has to create its own private virtual object, and point to the same physical object
as the other applications. For example, two applications want to access the same meas-
urement value, identified as "Temperature":
Application #1 (Eg: Excel)
Appl1 = CreateObject("VIGO.Std")
Appl1.PhysId = "Temperature"
In this situation, both the virtual objects “Appl1” and “Appl2”, are pointing to the same physi-
cal object.
Different applications may use the same identifier for the virtual object, but VIGOSERV will
still contain a virtual object for each application, as illustrated in the figure below.
VIG O
Virtual Virtual
O bject: O bject:
O bject2 O bject4
Virtual Virtual
O bject: O bject:
Ob ject1 O bject1
Two different modes can be used to access a physical object. The first mode is called Di-
rect-access, which sends a command via the network, i.e. a read command, waits for the
result and then returns to the application when the command has finished and data has
been obtained from the physical process system. The Direct-access approach is shown in
the figure below, in the figure to the left.
Software Software
Application #1 Application #1
eg. Visual Basic eg. Visual Basic
1 4 1 2 5 6
Start Operation and Obtain Data in the
Request Data Obtain Data
get acknowledge Virtual Object
VIGO VIGO
Virtual Virtual
Object: Object:
Object1 Object1
Application Application
#1 Domain #1 Domain
2 3 3 4
Network Request Network Response
Network Request Network Response
The second mode is called Buffered-access, which also sends a command via the network,
i.e. a read command, but here VIGOSERV will return immediately to the requesting
application before the command has finished and the data has been obtained from the
physical object. After a while, VIGOSERV will return the result to the specific VIGOSERV
property associated with that particular physical object, and it is now up to the application to
read the result. This is shown in the figure above, to the right. To initiate a request using
Buffered-access, two Methods called DoRead and DoWrite are used. The VIGO object
must be created as a VIGO.PRO object to get access to these methods.
The idea behind Buffered-access is to make parallel execution possible. For example, by
initiating the reading of ten different values from the process system, the latest sampled re-
sults held within VIGOSERV can be read later by the application, when required.
If a new result has not yet been obtained by the virtual object property following a DoRead,
by the time the application requires the use of it, the property will act like Direct-access. In
this case, the return to the application will only occur when the result has been obtained.
VIGOSERV is able to transfer a complex variable from a node into a virtual object, using a
single request from the user application. To do this, the property PhysId already knows the
variable is of a complex type, and by using the DoRead Method, the data is obtained in the
virtual object.
For example, the complex variable "Coordinate" is composed of “X_Value”, “Y_Value” and
“Z_Value”.
Coordinate
X_Value
Y_Value
Z_Value
The physical identifer for the complex variable would therefore be:
Object1.PhysId = “Coordinate”
The next step is to load the complex variable from the node, for the virtual object Object1:
Object1.DoRead
The above-mentioned complex data is now available within the virtual object
To select one of the sub-fields within the complex structure, another property called Sub-
PhysId must be used. The internal access property InValue is used to operate on these
data elements in the sub-fields.
For example:
Object1.SubPhysId = “X_Value”
X = Object1.InValue
Object1.SubPhysId = “Y_Value”
Y = Object1.InValue
Object1.SubPhysId = “Z_Value”
Z = Object1.InValue
In a similar way to reading the entire complex variable with a single request, it is also pos-
sible to write the complete complex variable, using a single request from the user applica-
tion. For example:
Object1.DoWrite
This way of handling complex data structures can reduce the total number of data trans-
missions on a network. This feature also gives the ability to obtain information, which is
closely related, and time synchronised.
When using properties or methods for an object, the VIGO system will set an ErrorCode
Property to a value that corresponds to the result of the performed action. The ErrorCode
may relate to errors in communication, conversion errors or errors from searching in the
MIB.
The ErrorCode can be monitored by the application, following any access to a property or
method for the object. If an error occurs, the ErrorCode is set to a unique number. If no er-
ror occurs, the ErrorCode will be SUCCESS (0x0000).
The application can also read the ErrorCode as a text string. The error string is contained in
the ErrorString Property. When reading the ErrorString property, a translation of the Error-
Code into a text string is automatically performed. If an error occurs, the application can be
programmed to take specific action, as shown in the examples below.
Error handling in VIGO follows the OLE Automation Exception rules contained within the
Microsoft WindowsTM OLE2 specification. When virtual objects are created, Exceptions are
disabled.
It is possible to disable and enable exceptions using the following property for the object:
Sub Timer1_Timer ()
On Error GoTo ErrorHandler ‘Exception
TempText.Text = Object1.Value
Finish: Exit Sub
ErrorHandler:
TempText.Text = Object1.ErrorString
Resume Finish
End Sub
The example above shows that the error information given by the object property Error-
String, will be shown instead of the temperature "Object1.Value", in cases where an error
occurs.
Below is a Visual Basic example, where the ErrorCode is monitored following an access to
a read Property:
Object1.PhyId ="Temperature"
Temp = Object1.Value
If Object1.ErrorCode Is SUCCESS Then
TempText.Text = Temp
Else
TempText.Text = Object1.ErrorString
End If
The error information given by the object property ErrorString will be shown in the text field
identified by “TempText”, in cases where an error occurs.
The error message is converted from an error code into an error message, which is auto-
matically translated into the same language as that selected on the machine in which VIGO
is running. The error messages are found in files, having the file-extension corresponding
to the language definition specified by Microsoft. A VIGO standard installation provides
texts for Danish and English errors. The text files are found in the VIGO program folder with
the extension “DAN” and “ENG” respectively.
Copying an existing error text file into another file with the same file name can create an er-
ror text file for a new language, but with a file extension that matches the new language.
The error messages can then be translated into the new language within the new file.
The corresponding property in the MIB, called Online access can also be set to specify
whether variables are located externally or internally.
If the OnLineAccess property for a VIGO object is set to false (not-checked in the proper-
ties window), it means that the value of a particular variable can be read or modified from
an internal location (on the PC), rather than relying on the fact that the physical node would
normally have to be connected. This facility can be extremely useful during the
commissioning and testing phases of a new project. Once one of the properties has been
set, VIGO ensures that any reading or writing to a declared variable will be directed to the
internal simulated variable. Any additional operations on this variable, such as, for example,
to simulate the incrementing of a counter, would be arranged using a separate simulation-
test program, which will run in parallel with the application being tested.
Each property offers a pair of functions, one to get (read) the property value and one to set
(write) the property value. Therefore, when object properties are used in application pro-
grammes through VIGOSERV, one of two things are performed:
With most properties, their values can either be read or set according to the needs of the
application. Properties that can be read or set are called read-write properties. Some prop-
erties only allow an application to get their value. These are called read-only properties.
A method performs an action on an object, and may or may not return a value. Methods
may take a number of arguments. Arguments can be passed by value or by reference.
3.10 Performance
The performance of VIGO is not dependent on the user application, because VIGO is built
for real-time communication, which is performed using interrupts. The communication task
will not stop, even if the loading of a large file is taking place or a word processing program
is being started.
VIGO is able to handle several hundred external data requests per second. However, per-
formance depends on the efficiency of the underlying network driver and network perform-
ance.
VIGO standard is a reduced interface for ease of use, where the number of properties
available is limited to the following: PhysId, Value, ErrorCode, ErrorString. All commonly
used read and write operations can be achieved.
To establish contact with VIGO standard, an OLE automation object must be created,
where the OLE name for the VIGO standard object is VIGO.STD.
Invoking a particular command, which depends on the programming language being used,
performs this.
VIGO professional is used for advanced programming, with an extended set of properties
and methods.
To establish contact with VIGO professional, an OLE automation object must be created,
where the OLE name for the VIGO professional object is VIGO.PRO.
Invoking a particular command, which depends on the programming language being used,
performs this.
Application
Read:Value is a Read: Write: SubPhysID is
sequence of InValue InValue used to select part
DoRead and of the Data in the
Read: InValue object.
Data conversion
Fieldbus
A Read of a variable within a node into an application is divided into two steps. First, the
content of the variable is loaded into the Object Data. The next step is to convert the re-
ceived data, and then transfer the converted data to the application. A similar situation oc-
curs to Write, except that the first step is to convert data sent from the application, and then
to store the converted data in Object Data.
4.1.1 PhysId
PhysId is used to relate the VIGO object to a variable within a Node. Assigning the Global
Identifier to the PhysId will achieve this. The normal format for a Global Identifier is:
ProjectIdentifier:NodeIdentifier.ChanneIIdentifier.Register…
If the global Identifier does not contain a ProjectIdentifier, the default project selected in the
[Workspace] tab in VIGO will be assumed.
Writing to this property will start a search in the MIB. This search will return all the neces-
sary information about the variable, such as the Addresses and Offsets needed to access
the variable within a particular Node.
Writing to the PhysId property will resize and clear the Object Data to zero.
The following Properties of an object are set according to the contents of the MIB:
DoRead/ DoWrite methods, or a read/write of the Value property, will use these properties
when accessing Variables in Nodes via the Fieldbus.
The following assignments are also performed:
SubOffset= 0
SubDataType= DataType
SubBitNo= BitNo
SubSize= Size
These properties are used when reading/writing to the Value and InValue properties.
The result of the search in the MIB, will also set the following properties:
ReadAccess, WriteAccess, OnLineAccess
The ErrorCode will be set, depending on the result of the search in the MIB.
4.1.2 SubPhysId
SubPhysId is used to specify a sub-part of a complex variable already specified in PhysId.
The SubPhysId must be assigned with the additional “.Identifier” , e.g. a record field identi-
fier. The PhysId can be set to point to a complex array-variable. The SubPhysId property
can then, for example, be used to specify a specific array element.
The SubPhysId property cannot hold: Project, Node, Channel, Register or SwNo, only Ar-
ray [index] 's and Record field Identifiers. The PhysId must be pointing to at least a SwNo
or a Register in a Channel, before SubPhysId can be used to select part of the SwNo or the
Register.
Writing to the SubPhysId property will start a search in the MIB, to get the value of the fol-
lowing properties: SubOffset, SubDataType, SubBitNo, SubSize.
No other properties are affected, including Object Data.
If the SubPhysId is set as an empty string, the following assignments are performed:
SubOffset= 0
SubDataType= DataType
SubBitNo= BitNo
SubSize=Size
The ErrorCode will be set according to the result of the search in the MIB. The properties
set by SubPhysId have an influence on the access, when using the InValue property and
Value property.
Read/Write to InValue:
If SubPhysId is empty, the entire variable specified by the PhysId will be transferred be-
tween the application and the VIGO object.
If SubPhysId is not empty, only the part of the variable specified by the SubPhysId, will be
transferred between the application and the VIGO object.
4.1.3 InValue
InValue represents a sub-part of the variable in Object Data, as specified by the Sub-
PhysId. The InValue property is declared as a Variant type, and can handle all kinds of data
(Integer, Real, String, Arrays, etc.). A Read of this property will return the specified part of
the internal variable in the VIGO object. Similarly, a Write will write to the Object Data.
There is no Fieldbus communication.
When reading InValue, VIGO converts the part of Object Data specified by the SubDa-
taType, and returns this data as a Variant. A part of this conversion task, is also to swap
the bytes, according to the little/big endian principle (Intel/Motorola). The data-conversion is
ONLY performed on simple data-types (Boolean, byte, integer, real...). It is therefore not
recommended to use InValue on complex variables.
In the same way, a Write to InValue, will convert the Variant from the application to the cor-
rect data type appropriate for the variable in the field device, and will then store the data in
the internal Object Data.
If the SubPhysId holds a part of an identifier, only the part specified by the SubPhysId will
be transferred between the application and the object.
4.1.4 DoRead
The DoRead method is used to load a variable from a node into Object Data. The variable
is specified by the properties set by PhysId (NodeAddress, InternalAddress, Offset, BitNo,
Size, ObjectType, DataType, IDCNo, NodeCapabilities). The data is NOT converted.
DoRead starts the communication, and then immediately returns to the calling application.
The Data will arrive later in Object data. If a new DoRead is started, within the same VIGO
object, before the previous DoRead or DoWrite has been completed, the process will not
return to the application, before the former DoRead/DoWrite is completed and the new
DoRead has been started. DoRead cannot raise an exception due to communication er-
rors. The application program must read ErrorCode before accessing the data.
The DataReady property will be “FALSE”, until a completed response from the Node is re-
ceived.
4.1.5 DoWrite
The DoWrite method is used to transfer the data from Object Data into a variable in a node.
The variable is specified by the properties set by PhysId (NodeAddress InternalAddress,
Offset, BitNo, Size, ObjectType, DataType, IDCNo, NodeCapabilities). The data is NOT
converted.
DoWrite starts the communication, and returns immediately to the calling application. The
response will arrive later. If a new DoWrite is started, within the same VIGO object, before
a previous DoRead or DoWrite has been completed, the process will not return to the ap-
plication before the former DoRead/DoWrite is completed and the new DoWrite has been
started. DoWrite cannot raise an exception due to communication errors. The application
program must read ErrorCode when DoWrite has completed.
The DataReady property will be “FALSE”, until the completed acknowledge from the Node
is received.
4.1.6 Value
Value is a property, representing the variable specified by PhysId and the SubPhysId. The
Value property is declared as a Variant type, and can handle all kinds of data (Integer,
Real, String, Arrays, etc.).
A Read or Write to this property is equivalent to a read or write to the variable. VIGO re-
turns to the calling application when the data is available, or when no response has been
received after a timeout of a maximum of two seconds.
During a Write to Value, VIGO takes care of converting the Variant received from the appli-
cation into the correct data type appropriate for the variable in the field device. It also
swaps the bytes according to the little/big endian principle (Intel/Motorola). When reading
Value, VIGO converts the loaded data into a Variant, using the properties set by
SubDataType. The data conversion is ONLY performed on simple data types (Boolean,
byte, integer, real etc.). It is therefore not recommended to use Value on complex vari-
ables.
If SubPhysID is empty, a read from Value is the same as first calling DoRead, followed by
Reading InValue, and a write to Value is the same as Writing to InValue, followed by calling
DoWrite.
If the SubPhysId is not empty, only the part specified by the SubPhysId will be transferred
between the application and Object Data, but the whole variable will be transmitted on the
network to/from the Node.
Note: Be careful if SubPhysId is not empty when using Value ! Some of the data in the
object may be zero.
form a logical AND function between Data written to the property and the Data already in
the variable. The result is stored in the Variable.
4.1.9 TestAndSet
The TestAndSet property is a P-NET specific Read Only property, to Test-And-Set a Boo-
lean in a P-NET Node. Reading this property will start a special communication service that
reads and sets the Boolean true in the Node. The result of the reading is returned to the
application as a Variant.
4.1.10 ErrorCode
ErrorCode is a Read Only property of the type Integer (2 bytes). This property indicates
whether an error has occurred, after accessing certain properties and methods.
ErrorCode = 0 indicates that there is no Error. If the ErrorCode <> 0, this indicates, that
some aspect of a transfer has been found to be incorrect.
The ErrorCode is not changed until one of the mentioned VIGO properties or methods is
used again. The ErrorCode can be read as error text in the ErrorString property.
4.1.11 InformationInErrorCode
This Boolean property controls if Historical Errors are visible in the ErrorCode. If Informa-
tionInErrorCode is set to “TRUE”, then Historical Errors are also visible in ErrorCode. The
default value for InformationInErrorCode is “FALSE”.
4.1.12 ErrorString
The ErrorString is defined as a Read Only string (max 150 characters). In reading this
property, a text string will be returned, containing an explanation of the ErrorCode. The lan-
guage of the error string depends on the language that has been selected on the machine.
If the selected language is not supported in VIGO, English will be chosen.
4.1.13 DataReady
DataReady indicates whether a DoRead, DoWrite, Upload or Download cycle has finished.
DataReady should be tested before a new DoRead or DoWrite is used on the same object,
DataReady returns “False” when a DoRead or DoWrite method is in progress. DataReady
returns to the calling application immediately.
4.1.14 SetVIGOMessage
This method is used to set up a message that will be sent when a DoRead or DoWrite on
the particular object has finished.
An application can call this method before starting a DoRead or DoWrite. This way it is not
necessary for the application to continuously call DataReady to check if the
DoRead/DoWrite has finished. The SetVIGOMessage method must be called before start-
ing the DoRead or DoWrite.
4.1.15 EnableExceptions
If EnableExceptions is set “TRUE”, all errors from VIGO will perform an Error Exception in
the client program. The client program must then handle the exception.
The Exception handler can then read the ErrorCode and ErrorString.
4.2.1 InternalAddress
The InternalAddress property is designed to hold the “internal address” of a variable in a
Fieldbus module.
For P-NET, the “internal address” is a Softwire number, but it can also be a physical ad-
dress in a module. If PhysAddress is true, a physical address is assumed.
The InternalAddress is used by DoRead, DoWrite, Download and Upload, and indirectly by
Value.
InternalAddress is automatically set when writing to a PhysId.
4.2.2 BitNo
The BitNo property is used to select a single bit in a BitArray. This property is used when
accessing a field device. The BitNo is used by DoRead, DoWrite and indirectly by Value. It
is automatically set when writing to a PhysId.
Writing to the BitNo property will copy BitNo to SubBitNo.
4.2.3 Offset
The Offset property is used to specify a byte offset within a complex variable in a Node.
When a record field within a larger complex variable is to be selected, the offset specifies
the position of the first byte of this field within the record. Offset is used by DoRead, DoW-
rite, Download and Upload and indirectly by Value.
4.2.4 Size
The Size property indicates the size of the Variable (in bytes), to be accessed via the Field-
bus. It indicates to the communication stack the number of bytes to be transferred. It is also
used to allocate memory for the VIGO object. Size is used by DoRead, DoWrite and indi-
rectly by Value.
4.2.5 ObjectType
The ObjectType property holds an integer value associated with a particular type of object.
The object type is used to identify whether the object (specified by PhysId ), is a particular
type of Node, Channel, SwNo, or Register. As an example, all the different Channel types
have different object type numbers. The ObjectType should reflect the actual data type in
the field device.
An application program can use this property for testing the object type. For example, the
download program can only work with a Program Channel as the target. A list of Object
types for channels and modules can be found in the Appendix.
4.2.6 DataType
The DataType property holds an integer value, which defines a particular data type. This
object type should reflect the actual data type in the field device. It is not used for data
conversion. A list of data types can be found in the Appendix.
4.2.7 WriteAccess.
The property WriteAccess holds the status of a variable, selected by PhysID. When writing
to PhysId, this property is set to “True”, if all elements in the Global Identifier have [Write
Access] checked (Project, Node, Channel, Register or SwNo) else it will be set to “False”.
4.2.8 ReadAccess.
The property ReadAccess holds the status of the variable, selected by PhysID. When writ-
ing to PhysId, this property is set to “True”, if all elements in the Global Identifier have
[Read Access] checked (Project, Node, Channel, Register or SwNo), otherwise it will be set
to “False”.
4.2.9 OnlineAccess
OnlineAccess is a Boolean property, used to indicate whether a DoRead, DoWrite or indi-
rectly by Value, shall access an external Node or an internal simulation file. If OnlineAccess
is “True”, there will be communication on the Fieldbus network. If OnlineAccess is “False”,
the data will be read from or stored in a simulation file. When writing to PhysId, this prop-
erty is set to “True”, if all elements in the Global Identifier have “OnlineAccess” checked
(Project, Node, Channel, Register or SwNo), otherwise it will be set to “False”.
4.2.10 ProtectedWriteAccess.
This property reflects the state of the [Protected] checkbox of the variable selected by
PhysID. ProtectedWriteAccesss = “True”, means that the variable is protected by Write
Enable. It is also used to prevent the user accessing variables with ProtectedWriteAccess,
when [VIGO Access] is not granting write access to write protected variables.
4.2.11 NodeCapabilities
The NodeCapabilities property informs the IDC which protocol limitations that shall be used
for read or write to a specific Node.
The value in NodeCapabilities depends on the format that can be used on specific Field-
buses. A list of the capabilities numbers for P-NET can be found in the Appendix.
NodeCapabilities is used by DoRead, DoWrite and indirectly by Value. It is automatically
set when writing to PhysId.
Please note, that the value of NodeCapabilities is returned as a string, converted to hexa-
decimal format. For example, a value of 32 is returned as a string holding the characters
‘20’.
4.2.12 NodeAddress
The NodeAddress property holds the full address of a Node on the Fieldbus. The format for
the Node address must follow the HUGO2 standard for building a Node address.
NodeAddress is automatically set when writing to PhysId.
4.2.13 MaxRetry
Reserved for future use.
4.2.14 PhysAddress
The PhysAddress property is of type Boolean. When the property is set “TRUE”, VIGO will
inform the PNET IDC to use physical addressing, instead of logical addressing.
The physical address used must be written in the InternalAddress property.
This property is set “False” when writing to PhysId.
4.2.15 IDCNo.
The IDCNo property must hold the number for the IDC that is appropriate for the target
Node. PhysId normally sets this property. This property should only be accessed in very
special circumstances.
SubPhysId normally sets the following properties. These properties can be read, and by
this means, the MIB can be checked. In very special situations, the application program
can, with care, write to these properties.
4.3.1 SubBitNo
The SubBitNo property is used to select a single bit in a BitArray. This property is used
when the application exchanges data with the VIGO object, and the data type is a Bit array.
The SubBitNo is used by InValue and indirectly by Value.
4.3.2 SubOffset
The Suboffset property is used to specify the byte offset within a complex variable, located
in a VIGO object. When a record field within a larger complex variable is to be selected, the
offset specifies the location of the first byte of this field within the record. The SubOffset is
used by InValue and indirectly by Value.
4.3.3 SubSize
The SubSize property indicates the size (in bytes), of the selected part of the Variable in
the VIGO object. This property is used when the application exchanges data with the VIGO
object. The SubSize is used by InValue and indirect by Value.
4.3.4 SubDataType
The SubDataType property holds an integer value that identifies a particular data type. The
number should reflect the actual data type of the selected part (SubPhysId) of the variable
in the VIGO object. This SubDataType is used by the conversion function when the applica-
tion exchanges data with the VIGO object. A list of data types can be found in the Appen-
dix. When writing to PhysId or DataType, the new value of DataType is copied to
SubDataType.
4.4.1 ProgramState
The ProgramState property follows the MMS standard, and is used in Program Channels.
These channels must be of ObjectType 11 otherwise ProgramState cannot be used.
Further information about ProgramState can be found in the manual for any of the nodes
that have a Program Channel.
4.4.2 ProgramName
The ProgramName property follows the MMS standard, and is used in Program Channels.
These channels must have the ObjectType property set to 11 otherwise ProgramName
cannot be used.
Further information about ProgramName can be found in the manual for any of the nodes
that have a Program Channel.
4.4.3 FileName
This property is of type string. It is used to hold a path to a file when Download or Upload is
called.
4.4.4 Progress
Progress is a Read Only property of Integer type that holds the number of bytes transmitted
in percentage of the total number of bytes, to be transmitted. The Progress property is valid
with Download or Upload.
The Progress property is very useful, for indicating to the user that the data transmission is
still running.
4.4.5 StopSequence
The StopSequence method can stop a data transmission, which has been started with
DoRead, DoWrite, Download or Upload.
4.4.6 Download
This method is used to Download a program to a standard Program Channel. The paths
must be set prior to its use, in Filename.
4.4.7 Upload
This method is used to upload a program from a standard Program Channel. The paths
must first be set in FileName. This method is not implemented in VIGO 5.0.
4.4.8 DeleteDomain
This method is used to delete the selected domain in a standard Program Channel. The
domain must be selected first.
5 Monitor
The Monitor program is a service tool for monitoring fieldbus variables, and to enable pa-
rameters to be configured within Fieldbus based control systems. The Monitor can be used
to both display and modify the value of variables. Variables are usually identified using a
globally recognized name, called the Physical Identifier (PhysId).
The Monitor can display the value of many variables at the same time, each one allocated
to a separate line, these lines can then be grouped on different tab sheets.
Specified variables can be located within different projects, nets and nodes. Normally, each
line is divided into three fields: [Physical Identifier], [Type] and [Data]. An optional [Offset]
field can also be shown. The width of the [Physical Identifier], [Offset] and [Data] fields, can
be adjusted by dragging the vertical line shown between the [Type] and [Data] fields, and
by re-sizing the window.
Starting the Monitor from within VIGO will automatically create a monitorline holding the se-
lected PhysID.
The [Physical Identifier] field is used to define which variable to display. Double clicking a
line in this field will cause it to change into an editing field, which also includes a <MIB> but-
ton. The contents of the Physical Identifier field can now be keyed in manually, or alterna-
tively, by pressing the <MIB> button. The required variable can now be selected from the
project structure. The format of a Physical Identifier entry would normally consist of a "pro-
ject name" followed by a colon, then the rest of the identifier, which includes the node name
and the variable name. For example: "Test:UPI1.SERVICE.WDTIMER". The project identi-
fier and the colon can in fact be omitted. It is then assumed that the Default Project, as pre-
viously specified, will act as the project identifier.
Manual input of a Softwire number is performed by formatting the Physical Identifier as:
‘Project identifier:Node identifier.Softwire number’. For example, ‘SampleProject:UPI1.18’
(or UPI1.$12 in Hex ).
The MIB is used to convert the Physical Identifier into the actual "address", required to ac-
cess the variable.
If the Physical Identifier specifies an Array or Record, the Type field shows
"-----", because it is not possible to present the complete value of a complex
variable.
When accessing a variable using a Softwire number, or part of a complex
variable using an offset, the data type must be selected manually. As previ-
ously described, this is done by clicking the right mouse button within the
[Type] field, and then selecting the appropriate data type. If the selected
data type differs from the data type specified in the MIB, it is shown en-
closed in brackets, e.g. [LongInt], and the readings seen may be unpredict-
able. By selecting “Default”, the type specified by the MIB is used.
The [Data] fields Edit mode is activated by double clicking on the field. The [edit] field will in
edit mode change it’s appearance. In edit mode the user can manually change the value of
the selected data.
The readout format can be selected to be in Decimal (default), Hexadecimal or Binary, for
the following data types: Byte, Integer, Long Integer and Word. The number of digits dis-
played after the decimal point can be selected for variables of the Real data type. The se-
lection can be made by using the right mouse button, when the cursor is pointing to a par-
ticular value in the [Data] field.
If an error message or any other information relating to a variable is received, these are
appended in the [Data] field. As default, only error messages are shown. Display of addi-
tional information can be enabled from the <Options> menu.
5.4.1 File
The <File> menu contains the following items, which all relate to Monitor
screen layouts.
The New Page function creates a new tab sheet with five empty monitor
lines. The <Edit | Insert> menu item is used to add extra lines to the active
tab sheet.
<File | Open>
The Open function reloads a monitor layout from a previously saved file. The included iden-
tifiers will automatically be converted into the 'address' needed to access the variable. This
is performed using the contents of the MIB, and will therefore reflect any changes that have
been made to the MIB since the last screen save.
<File | Save>
The Save function will store the screen layout parameters together with the list of included
Identifiers in a file with the file extension ‘mon’.
<File | Exit>
Exit closes the program. When the Monitor is closed, the current Monitor layout is auto-
matically saved, as the default screen layout. Next time the Monitor is started, the default
Monitor layout is automatically loaded.
5.4.2 Edit
The edit functions are used to customize a screen layout. They apply to
the currently selected line. A monitor line can be selected by clicking on
the line with the left-hand mouse button. Selected lines are displayed with
all text as bold. It is possible to select multiple lines by following one of the
tree procedures described below.
• Pressing the <Ctrl> button and clicking on the lines in question enables the selec-
tion of multiple lines. The lines will on selection be displayed as lowered.
• The selection of continuous lines is possible when a line is selected and the <Shift>
button is pressed followed by a selection of another line. This will cause all of the
lines between the two selected lines to be selected. The lines will on selection be
displayed as lowered.
• Pressing <Ctrl>+<a> selects all Monitor lines on the currently selected tab sheet.
Notice that changing the active tab sheet will cause all selected Monitor lines to be unse-
lected.
<Edit | Insert>
The Insert function will insert an empty Monitor line over the selected line placed nearest to
the top of the active tab sheet. If no line is selected the new line will be placed at the top of
the active tab sheet.
<Edit | Delete>
The Delete function will delete the selected Monitor lines.
<Edit | Cut>
The Cut function will delete the selected Monitor lines, and save them on the clipboard.
<Edit | Copy>
The Copy function will save a copy of the selected Monitor lines on the clipboard.
<Edit | Paste>
The Paste function will insert monitor lines, previously saved on the clipboard, above the
selected line.
5.4.3 Options
The default fields in a Monitor line are: Physical Identifier, Type and
Data. However, it is possible to customise the lines using the Options
menu.
The option menu can also be made available, by clicking with the right
mouse button on the Monitor lines and selecting the desired menu or
submenu item from the popup menu. The choices in the popup menu
will only influence the currently selected Monitor line.
<Options | Font>
The menu item allows the user to change the font selection in the Monitor lines.
5.4.4 Help
Guidance in using Monitor is available from the Help menu. It is also possible to obtain
guidance on a specific subject by pressing <F1> after selecting an item in the Monitor.
6 P-NET Tools
A number of tools that are specifically used in conjunction with the P-NET Fieldbus, are
available in the VIGO program package. Some of the more general-purpose tools that can
be used with all P-NET standard modules are described in this chapter.
The purpose of this program, is to enable the setting of the node address within a physical
node, by means of using it’s serial number.
This program is launched from the MIB browser MIBOCX, by selecting it from the right
mouse button menu, when a Node is highlighted.
Selecting a different Node in the MIBOCX (by activating the [MIB] button), will automatically
update the [Node Identifier] in the Set P-NET Node Address program window, and will dis-
play data about that node.
If the node is recognised as a P-NET master module, a [No. Of Masters] field is also
shown. This indicates the maximum number of masters currently allowed to be connected
to the network segment.
The node in question must be included in the project description in the MIB, and it’s proper-
ties must also be set correctly, including the desired node address.
When the program is opened and a node is selected, the following four situations can oc-
cur:
1: If the node specified in the [Node-Identifier] field cannot be found at the node address as
specified in the MIB, the serial number of the should be keyed in, and then the <Apply> but-
ton should be pressed. The function of the <Apply> button is to send a broadcast message
to all nodes, commanding the node with serial number xxxxxxx, to set its node address to
the attached value. If a node with the specified serial number is found, the [Node info] for
the module in question will be shown.
If contact with the node cannot be established, the [Node info] field will display "No contact
with Node". If this is the case, it should be checked that the serial number of the module is
correct, and that the module has been correctly connected to the network.
2: A node is found on the network, and the serial number and the [Node info] is automati-
cally displayed for that node. If this information corresponds to what is required, as speci-
fied in the MIB, the communication parameters for the node are correctly set up, and no fur-
ther action needs to be taken.
3: A node is found, and the [Node info] is shown, but the node is not the expected node as
specified in the MIB. This indicates that the node has been configured with the wrong node
address, and it must be removed to ensure future communication integrity. By pressing the
<Remove> button, the node is removed from the network as far as communication is con-
cerned. This is done by setting the node address to zero. The [Node info] will now display
"No contact with Node" and situation 1 will now apply.
4: A node is found, and the [Node info] is shown, but the node is not the expected node as
specified in the MIB, or random communication errors occur. This could mean that two or
more nodes are configured for the same node address, and these nodes should be re-
moved and re-configured to maintain communication integrity.
6.1.1 Help
Help on the use of the Set P-NET Node Address, is provided from the <Help> menu. The
help file consists mainly of parts of this manual.
The middle section consists of a number of tab sheets, each containing a formatted view of
the various configuration registers, enabling ease of amendment or monitoring.
The lower section provides a display of real-time values, which are specific to the selected
channel type. Although the values shown depend on serviceable communication and the
state of the current process associated with the channel, many can be amended locally, us-
ing the PC keyboard or mouse, e.g. resetting a counter to zero, or changing the state of a
digital output.
The ability to display a particular channel configuration screen, depends on that channel
type being included and selected within a node already defined in the MIB project file.
Screens are available for the following Channel types: Service, Digital I/O, AnalogIn, PID,
AnalogOut, Weight, Communication and Program Channel.
The Program
Download utility also
supports the download-
ing of Calculator pro-
grams, to other mod-
ules supporting the
P-NET standard Pro-
gram Channel, such as
the PD3120 module.
When this program has
been launched via the
MIBOCX, the Channel
identifier is automati-
cally inserted. Pressing
the [MIB] button and
selecting a new Pro-
gram Channel can
change the identity of a
Channel.
A File browser can be opened for selecting a Code file by pressing the [FILE] button The
node to which a program is to be downloaded, must first be defined in the MIB, before a
download can proceed.
Clicking the [Details] button opens a window, from where the selected program can be
stopped, started, killed etc. In addition, the Actual size, Max size, Code type, and Version of
the program in the selected library can be seen.
6.3.1 Channel
The [Channel] combo box is used to insert the name of the channel, to which a program is
to be downloaded. The selected channel must be a standard Program Channel, of object
type 11. The object type is defined in the MIB. If the selected channel is not of object type
11, a message box will display "Error in PhysId name".
A channel identifier can be selected using four alternative methods. When this program has
been launched via the MIBOCX, the channel identifier is automatically inserted. The chan-
nel Identifier can also be inserted from the MIB by clicking the [MIB] button, and then dou-
ble clicking on a channel name within the MIBOCX. It can be included as a start up pa-
rameter for Program Download, or it can be directly keyed in into the combo box.
When a new channel identifier is inserted, it will always become the highlighted item in the
[Channel] combo box list. The selected item will be inserted at the top of the list. If the se-
lected channel was not previously included in the list and the list is full, the oldest channel
identifier will be deleted. Once a channel identifier is included in the combo box, it can be
easily selected from the list, which can hold up to 6 channel identifiers.
A code file name can be inserted in the [Code file] combo box using three methods. The
code file name can be included as a start up parameter for Program Download. Alterna-
tively, it can be selected from the Open file dialog, by clicking the [FILE] button, or it can be
directly keyed in into the combo box.
When a new file name is inserted, it will always become the highlighted item in the [Code
file] combo box list. The selected item will be inserted at the top of the list. If the selected
file was not previously included in the list and the list is full, the oldest file name will be de-
leted. Once a file name is included in the combo box, it can be easily selected from the list,
which can hold up to 6 file names.
Some node types can hold several programs within a library. With PD controllers, these
programs can be stored in different memory types. The list box adjacent to [Autostart after
reset], defines which program will be started, if [Autostart after reset] is checked.
The list box reflects the value of ChConfig.Ref_A in the Program Channel. The state of the
[Autostart] check box and list box can only be changed, if [Write enable] is checked.
The [Name] and [State] fields in the [Library] panel show the name and state of the se-
lected program in the library. The library list can also be used to monitor the names and
states of other programs in the library. Library State can take the following values:
0: Non-existent
1: Loading
2: Ready
3: In-use
4: Complete
5: Incomplete
14: Deleting
The [Selected library] list box reflects the value of LibraryStatus.LibraryIndex in the Pro-
gram Channel. When a new value is selected, it is stored in LibraryControl.LibraryIndex in
the Program Channel.
If a program is already running when selecting a new program, the running program will be
stopped and killed, and the new program will be selected, which will be put into the Idle
state.
After selecting a program, the program can be started by pressing the <Start> button.
The [Name] and [State] fields in the Program panel show the name and state of the se-
lected program. Program state can take the following values:
0: Non-selected
1: Unrunable
2: Idle
3: Running
4: Stopped
5: Starting
6: Stopping
7: Resuming
8: Resetting
The [Selected program] list box reflects the value of ProgramStatus.SelectedProgram in the
Program Channel. When a new value is selected, it is stored in ProgramCon-
trol.ProgramToSelect.
6.3.6 Download button
Before downloading, a channel must be specified, a code file and a library must be se-
lected, and [Write enable] must be checked. Clicking the <Download> button starts the
downloading procedure, for the code file selected in the [Code file] combo box, to the chan-
nel and library defined in the [Channel] combo box and the [Selected library] list box.
If the download parameters specify a memory area that is already in use, by being in a
state of e.g. running or selected, a message box showing “Selected library in use ! Con-
tinue ?” will appear. If <Yes> is selected, the program that is currently running or selected,
will be stopped and killed, and the new program will be downloaded.
6.3.9 Details
Pressing the [Details] button opens a window with
more detailed information about the selected channel.
The [Program] field in the Download details window
provides buttons to [Start], [Stop], [Resume], [Reset],
[Kill] and [Unselect] the program defined in the [Se-
lected program] list box.
When the Program Download tool is closed, the contents of the [Channel] and [Code file]
combo boxes are saved in a file called {PD}PROGRAMDOWNLOAD.CFG. This file is
placed in the current folder, which would typically be the VIGO folder. When Program
Download is started again, the contents of the 2 combo boxes will be restored, if no start up
parameters has been given.
OPSYSCH holds the controllers’ operating system, and PPPROGCH holds a Process-
Pascal program.
These two programs are inter-dependent. If the Process-Pascal program is running, a new
operating system cannot be downloaded.
If a Process-Pascal program is present in the Flash library, a new operating system cannot
be downloaded to Flash, because the operating system is located at the beginning of the
Flash memory area, and the Process-Pascal program is loaded immediately after it.
The situations described above are just two of the aspects, which the Program Download
utility automatically monitors, to ensure download integrity. Should any other prohibited
situations occur, the utility would provide any necessary warnings, before a program is
automatically stopped or deleted.
The tools described in this chapter relate only to modules manufactured by PROCES-
DATA A/S.
The program is downloaded to the controller specified by the identifier inserted in the
[Download to controller] edit field. After a program has been downloaded, it can be started
by clicking the <Start> button.
If the selected node is a PD 4000 controller, and it is required to store the code in flash
memory, the Process-Pascal program must be downloaded together with an operating sys-
tem. The name of the file holding the operating system is inserted in the [Operating system
code file] edit field.
When a controller, a Process-Pascal code file, and possibly an operating system code file,
have been specified, the program can be downloaded, by clicking the <Download> button.
A controller identifier can be inserted using four alternative methods. When this program
has been launched via the MIBOCX, the controller identifier is automatically inserted. The
controller name can also be included as a start up parameter. It can be inserted from the
MIB, by clicking the <MIB> button and then double clicking on a controller name within the
MIBOCX, or it can be directly keyed in into the edit field.
The integrity of the controller identifier is NOT checked, until the <Download> button or the
<Start> button is clicked. When either of these actions occurs, a test will establish whether
the controller is of the correct type and version. The version must be 2.00 or later.
A code file name can be inserted using three alternative methods. The code file name can
be included as a start up parameter when launching the PD 3000 / PD 4000 Download pro-
gram. It can be selected from an Open file dialog, by clicking the <FILE> button and then
opening the file, or it can be directly keyed in into the edit field. The integrity of the name,
type and version of the selected file is not checked, until the <Download> button is clicked.
The selected file must contain the PD 4000 operating system, as a ".COD" file, version 2.00
or later, (NOT a ".HEX " or ".EP0" file), as provided by PROCES-DATA A/S. For example,
the file might be called "4000v30.COD".
A operating system code file name can be inserted using three alternative methods. The
code file name can be included as a start up parameter when launching the PD 3000 / PD
4000 Download program. It can be selected from an Open file dialog, by clicking the
<FILE> button and then opening the file, or it can be directly keyed in into the edit field. The
integrity of the name, type and version of the selected file is not checked, until the
<Download> button is clicked.
7.1.4 Download to
The <Download to> radio buttons define to which memory type the program is to be
downloaded. If the controller is a PD 3000, the program can only be downloaded to “RAM”.
If the controller is a PD 4000, the program can be downloaded to either “RAM” or “FLASH”.
If <FLASH> is selected, the name of a file containing the PD 4000 operating system must
be inserted in the [Operating system code file] edit field, before clicking the <Download>
button. The correct selection of <RAM> or <FLASH> options is not checked, until the
<Download> button is clicked.
Clicking the <Download> button commences the process of downloading the code file(s)
specified in the code file edit field(s), to the selected controller.
Before a program is actually downloaded, the controller is stopped and reset.
If <FLASH> is selected, the “FLASH” memory is first cleared, which takes about 20 sec-
onds. The operating system is then downloaded. Finally, the Process-Pascal program is
downloaded.
Once a program has been downloaded, it can be started by clicking the <Start> button.
The state of the <Download to> radio buttons should not be changed during the period be-
tween download and start.
PD 3000 / PD 4000 Download may also be started by setting up a shortcut. In this situation,
it is also possible to transfer 4 command line parameters, by amending the shortcuts prop-
erties. The first parameter is the controller identity, to which the program is to be
downloaded. The value of this parameter will be inserted in the [Download to controller] edit
field. The second parameter is the name of the Process-Pascal code file, and this will be
inserted in the [Process-Pascal code file] edit field. The third parameter is the name of the
Operating system code file, which will be inserted in the [Operating system code file] edit
field. The fourth parameter defines the state of the <Download to> radio buttons. If the
value of this parameter is “RAM”, the <RAM> button will be checked, otherwise the
<FLASH> button will be checked.
When the PD 3000 / PD 4000 Download program is closed down, the contents of the
[Download to Controller], [Process-Pascal code file] and [Operating system code file] edit
fields, and the state of the <Download to> radio buttons, are all saved in a file called
{PD}PDDOWNLOAD.CFG. This file would normally be located in the current folder, e.g.
VIGO. When the PD 3000 / PD 4000 Download program is started again, these values are
restored, if no start up parameters have been specified.
The Calculator Assembler provides all the necessary services for a programmer to design,
edit, assemble and download programs to calculator channels in P-NET modules, from a
PC. The Calculator Assembler is an integrated program with an editor, an assembler, a de-
bugger and a loader for P-NET. Calculator programs are written as assembler instructions
in text files. By using the editor, the source text is edited and saved. By using the assem-
bler, the source text is assembled to generate the calculator instructions. These instructions
are downloaded to the Calculator channel, and the program can then be started. It is possi-
ble to debug the downloaded program by single steps or a break point.
In the following paragraphs, the different parts of the program are covered in detail sepa-
rately.
A new (blank) file window corresponding to a new assembler file can be created with the
'File | New' command.
The standard edit commands (listed in the Edit menu) for copy, cut and paste of a selected
text are available in the editor. Text can be exchanged to and from the Windows clipboard.
The editor can undo the last cut command. Marked text will be replaced when new text is
entered. The search and replace operations are listed in the Search Menu.
In the status line the cursor's position is shown. It is also indicated if the file has been mod-
ified since the last time it was saved.
Note that when the register window (used when debugging) is shown, the content of the
edit window is locked. If changes have to be made, close the register window, make the
changes, assemble the program and download it again. Then reopen the register window
to see the effect of the changes.
When an error is found, a dialogue will pop up to inform the user about the error. After
pressing the OK button in the status dialogue, the assembling process continues. Pressing
the cancel button in the status dialogue can interrupt the assembling process.
During the assembling process a debug (*.deb) file is generated. It contains a list of line
numbers, instruction addresses and label names. The list is used for debugging.
After a successful assembling (No errors found), it is possible to download the generated
code to a calculator channel. The download command in the main menu is the means to do
that.
Using the Assemble menu, generated code can be saved in a file. The 'Write to INC file'
command in the 'Assemble' menu, will create an include file for Process-Pascal. The 'Save
to COD file' command will save to a file on disk, ready to be downloaded to a calculator
channel.
When the desired destination channel is shown, select the <Download> menu. This will
start the standard P-NET downloader application. For further information on the download
program, refer to the documentation for the downloader.
After an assembling of a source text, the generated codes must be downloaded to a Calcu-
lator Channel, and the module must be reset to reinitialise the calculator. The debugger is
started by selecting <Register Window> in the main menu. When debugging starts, the reg-
ister window will show the calculator's registers. It is not possible to edit the program source
when the register window is shown.
The user can single step through the program, by pressing a key <F7>. To set a break
point, the user places the cursor on the line containing the instruction at which a stop is re-
quired, and then press the <F4> key. The Calculator then starts, and runs until the break
point is reached. When the execution stops the Calculator's internal registers can be in-
spected in the register window. The register values can also be changed. To restart the
Calculator Program from the first instruction, the <F2> key can be pressed.
The register window also contains three buttons, which acts as shortcuts to the [Debug
Step], [Debug Goto cursor] and [Debug Reset] commands. The [Debug Reset] command
stops the calculator if it is running, and resets the calculator's instruction pointer to the first
program instruction. When the debugger is reset, has been single stepped or has reached
a breakpoint, the line containing the next instruction to be executed, is highlighted as
marked text.
7.2.7 Help
Online information about this program, is available by using the Help menu.
If this utility
program is cal-
led using the
right mouse
button menu,
the identity of
the Channel to
which the
download is to
be made, is automatically provided. The Channel identity can be changed, by pressing the
<MIB> button, and then selecting a new Calculator Channel. A File browser can be opened
for selecting a Code file, by pressing the <FILE> button. The node containing the Calculator
Channel must be defined in the MIB, before any Download procedure can be started.
The program is downloaded to the Calculator Channel, specified by the identifier inserted in
the [Download to channel] edit field. The name of the file holding the calculator code, is
specified in the [Calculator code file] edit field.
Before downloading, a channel must be specified, and a code file selected. The Calculator
Download program automatically controls the state of the WriteEnable flag in the Node.
Following a download, the WriteEnable state is set back to the value it had, before the start
of the download.
A channel name can be inserted using four alternative methods. If this program is launched
using the right mouse button menu, the identity of the Channel is automatically inserted.
The channel name can also be included as a start up parameter. It can be selected from
the MIB, by clicking the <MIB> button and then double clicking on a channel name within
the MIBOCX, or it can be directly keyed into the edit field.
A code file name can be inserted using three alternative methods. The code file name can
be included as a start up parameter. It can be selected from an <Open file> dialog, by click-
ing the <FILE> button and opening the required file, or it can be directly keyed into the edit
field.
7.3.3 RunEnable
The [RunEnable] check box reflects the state of the boolean variable RunEnable, in the se-
lected Calculator Channel. Whenever RunEnable is true, indicated by a tick in the check
box, the Calculator Program will be running. When the downloading of the program is com-
plete, RunEnable is automatically set to false, so that the calculator program doesn't start
until [RunEnable] is checked.
The RunEnable variable is stored in a memory type called RAMInitEEPROM. This means,
that there are in fact two variables, one in “RAM” and one in “EEPROM”. It is the state of
RunEnable in “RAM” that determines, whether the Calculator Program is running or not. It
is the state of RunEnable in “RAM” that is mirrored by the [RunEnable] check box.
After a reset of a UPI or Weight node, the state of RunEnable is copied from EEPROM to
RAM. If the state is “TRUE”, the Calculator Program will automatically start running.
The state of RunEnable in EEPROM can be set “True”, by clicking the <ON> button under
[Autostart after reset]. If RunEnable in RAM was “False”, it will be set “True” for a short pe-
riod, during this operation.
The state of RunEnable in EEPROM can be set “False” by clicking the <OFF> button under
[Autostart after reset]. If RunEnable in RAM was “True”, it will be set “False” for a short pe-
riod, during this operation.
7.3.4 Download
Clicking the <Download> button will begin the procedure of downloading the code file,
specified in the [Calculator code file] edit field, to the selected channel.
Calculator Download may also be started using a previously set up shortcut. In this case, it
is possible to include two command line parameters, by amending the shortcut properties.
The first parameter is the identity of channel, to which the program is to be downloaded.
The value of this parameter will be shown in the [Download to channel] edit field. The sec-
ond parameter is the name of the Calculator code file, and will be shown in the [Calculator
code file] edit field.
If Calculator Download is started from within the Calculator Assembler, these two parame-
ters are automatically transferred.
When the Calculator Download program is closed down, the contents of the Channel and
code file edit fields are saved in a file called {PD}CALCULATORDOWNLOAD.CFG. This
file is placed in the current folder, which is typically the VIGO folder. When Calculator
Download is started up again, these values are restored, if no new parameters have been
specified.
The Screen Dump utility is used to up load screens displayed on P-NET controllers, manu-
factured by PROCES-DATA A/S. Once a picture has been up loaded, it can be printed out,
saved in a file, or transferred to the clipboard. The program is useful when creating docu-
mentation applicable to Process-Pascal application programs.
Screen Dump is able to up load display screens from PD 3010, PD 4000, PD 5010, PD
5015 and PD 5020 controllers. However, to obtain a picture from a PD 5020, which has a
larger screen, a special task and set of variables (VGALOAD) must be incorporated in the
Process-Pascal program in the controller.
Screen Dump can be started from the MIBOCX, using the right mouse button menu, when
a node of the following controller type is selected: PD 3010, PD 4000 or PD 5010, PD 5015
or PD 5020. These form one of the Object Types - 3000, 4000 or 5000.
If this procedure is used, the Controller Identifier will be automatically transferred to the
[Load picture from controller] edit field.
Screen Dump may also be started from a shortcut, in which case the controller identifier
may be transferred as a parameter.
When the identifier of a controller has been specified, the display screen can be up loaded
by pressing the <LOAD> button. After a picture has been loaded, it can be stored in a Win-
dows bitmap file ".BMP", by means of the <Save> or <Save as> menu items.
The picture can also be printed by means of the <Print> command in the <File> menu. If
required, the picture can be copied to the clipboard, and then imported into other programs,
such as Paintbrush, WordPerfect or Word.
The size and location of the Screen Dump window on the PC screen may be changed.
When the Screen Dump program is closed the actual size and location of the window is
saved, along with the controller identifier, and the name of the file last used. These values
are restored the next time Screen Dump is started. The controller identifier is not restored,
if Screen Dump is launched from within the MIBOCX or with a parameter.
7.4.2 Print
A loaded screen can be directed to print from within the Screen Dump program, by means
of the Print dialogue. This dialogue is called by clicking the <Print> button, or from within
the <File> menu, or by pressing <Ctrl> + <P> on the keyboard.
7.4.3 Load
Once a controller identifier has been inserted into the controller edit field in the program
window, the current controller screen image can be up loaded by clicking the <LOAD> but-
ton.
Loading pictures from a PD 3010, PD 4000, PD 5010 or PD 5015 only takes a few sec-
onds. However, loading pictures from a PD 5020 can take up to several minutes. If the
loading of a picture from a PD 5020 is cancelled (by pressing the <Cancel> button), a new
picture load must not be initiated during the next 30 seconds.
7.4.4 Copy to clipboard
Once a picture is loaded, it can be transferred to the standard Windows clipboard. From
here, it can be imported into other Windows programs. The loaded picture is copied to the
clipboard by pressing the <Copy to clipboard> button, or from the <Edit> menu, or by
pressing <Ctrl> + <C> on the keyboard.
The selected controller must be of type PD 3010, PD 4000, PD 5010, PD 5015 or PD 5020.
The Controller Identifier can be inserted using four alternative methods. If this program is
launched using the right mouse button menu, the identity of the controller is automatically
inserted. It can also be inserted using the MIB, by clicking the <MIB> button, and then dou-
ble clicking on the required Controller Identifier within the MIBOCX. The Controller Identifier
can also be inserted during Screen Dump start up, by using a saved parameter, or it can be
directly keyed in into the edit field.
7.5 MapToMIB
The MapToMIB program is a conversion utility used to convert MAP files to SMB files. This
utility is only required for programs compiled by Process-Pascal compiler versions prior to
4.00.
A MAP file is generated by older versions of the Process-Pascal compiler, and contains an
ASCII text description of the variable names and their types, as declared in a Process-
Pascal program.
The SMB file (produced by the MapToMIB program), is a binary representation of the same
information, but in a format that can be read by the MIB Edit program. SMB is short for
SubMIB.
A SMB file is used to update or create a new Node type in the MIB database.
The following section describes the functionality of the menus and buttons in the program
window. For a detailed description of how to create or update a Type in the MIB database,
refer to 'Step-by-step Instructions'
[File List]
The [File List] contains a list of MAP files for selection. These are the MAP files that are to
be converted by the MapToMIB program. To add or remove files, use the <File | Open>
and <File | Clear File List> menu commands.
The program can either convert one file or all the files in the [File List] (<File | Make> or
<File | Make All>). Clicking the down arrow to the left of the [File List], and then clicking the
filename can select a single file.
[Result]
This field contains a message indicating the result of a conversion, e.g. an error message.
<Exit>
Pressing this button will terminate the program.
<File | Open>
The <File | Open> command will show an open-dialog box. The selected
file will be added to the [File List].
<File | Open>
The <File | Open> command will show an open-dialog box. The selected file will be added
to the [File List].
<File | Make>
The <File | Make> command will convert the selected MAP file in the [File List] into a SMB
file, which will be placed in the same folder as the MAP file. This is the same as clicking the
<Make SMB File> button.
<File | Exit>
This command terminates the program.
<File | About>
Selecting this command will show an About box, stating the program name and the current
version.
Step-by-step Instructions
The following procedures should be used to update or create a node Type in the MIB data-
base, based on the variables and types declared in a Process-Pascal program.
2. Start the MapToMIB program. Add the MAP file to the [File List] by using the
<File | Open> command. Ensure that the MAP file is selected in the [File List]. If
it is not, select it by clicking the down arrow in the [File List] and then clicking
the filename.
Note, that the contents of the [File List] are preserved between each session of the Map-
ToMIB program, so once a file has been added, it will remain there until <File | Clear File
List> is selected.
3. Convert the MAP file into a SMB file by clicking the <Make SMB File> button. If
no errors occur, terminate the MapToMIB program by clicking the <Exit> button.
4. Select the [MIB Edit] tab and select <View | Show Types> in the menu. This
should reveal all the Types (red icons) currently defined in the MIB database.
a. Right click the project icon (e.g. SampleProject) and select New from the
menu.
d. Key in a Type name for the new node in the [New Name] field.
6. Right click the new type and select <Update Type> from the pop up menu. This
will show an Open File Dialog box. Select the SMB file created by the Map-
ToMIB program.
1a. Right click the new node type and select <Properties> from the pop up
menu.
The Properties window will now open.
1b. In the Properties window select the [Type Info] tab and enter the following
values:
Capabilities: 130
Object Type 3000 or 4000
1d. Select <View | Show Nodes/Virtual Names> in the [MIB Edit] window.
If the node is a PD 5000 Controller, the following steps (7.2a to 7.2f) should be performed:
2a. Right click the new node type and select <Properties> from the pop up
menu.
The Properties window will now open.
2b. In the Properties window select the [Type Info] tab and enter the following
values:
Capabilities: 32
Object Type 5000
2c. Expand the node-tree in the [MIB Edit] tab window by clicking the <+>
sign to the left of the new type name.
Use the scroll-bar on the right-hand side of the MIB Edit window, and scroll
down to find the following channel types:
Channel Name Object Type
Service 1
LedCh 2
AlarmCh 2
OpSysCh 11
PPProcCh 11
2d. Right click the channel name in the MIB Edit window, and select <Proper-
ties> from the pop up menu. In the Properties window, note the Type un-
der [Element info]. This is the Typename of the channel, e.g. 'TypeNo117'.
Use the scrollbar on the right-hand side of the MIB Edit window to find the
[Typename] of the channel. Left click the [Typename] to update the Proper-
ties window with the type information of the channel typename.
Select [Type Info] in the Properties window and change the [Object Type] to
the value in the above table.
2f. Select <View | Show Nodes/Virtual Names> in the MIB Edit window.
8. An instance of this newly created node type can now be incorporated within the
project. If it is a new Node, it should be created as described in this section. If
the node of this node type already exists, the node type will have already been
updated, and this step can be skipped.
To create a new Node, right click the project icon in the MIB Edit window and select
<New> in the pop up menu. In the [Add Element] dialog box, make sure that [Add
new as: Sub Element] is selected. Select “Node” in the [New Kind] combo box.
Type a name for the node in the [New Name] edit box. Now click the <OK> button.
Right click the new node icon and select <Properties> from the pop up menu. Un-
der the [Element Info] tab in the Properties window, select the new node type name
in the [Type] combo box. Select the network to which the Node is connected in the
[Net] combo box.
9. Right click the [WorkSpace] icon in the MIB Edit window, and select <Refresh>
from the pop up menu.
8 Error codes
This section describes the relationship between the Errorcode and ErrorString properties of
the VIGO.STD and VIGO.PRO objects. Different parts of the VIGO system can generate
error codes and strings. This section is divided into a subsection for each error code gener-
ating part of VIGO.
0xFF00=Out of memory
0xFF02=File not found
0xFF03=Path not found
0xFF05=Attempt to link dynamically
0xFF06=Library requires separate data segment
0xFF08=There was insufficient memory to start the application
0xFF0A=Incorrect Windows version
0xFF0B=Invalid executable file
0xFF0C=OS/2 application
0xFF0D=DOS application
0xFF0E=Unknown executable file type
0xFF0F=Attempt to load file in protected mode
0xFF10=Attempt to load a second instance
0xFF11=Attempt to load a file in large EMS mode
0xFF12=Attempt to load file in real mode
0xFF13=Attempt was made to load a compressed exe file
0xFF14=Dynamic-link library (DLL) file was invalid
0xFF15=Application requires Microsoft Windows 32-bit
0xFF16=Could not load driver
0xFF20=Response structure not decreased
0xFF21=Local free failed
0xFF22=String copy failed
0xFF23=No response number
0xFF24=Response no out of range
0xFF25=No response information added to Controlcard
0xFF26=No response type defined (Message, Callback or Polling)
0xFF27=Max length for extra data exceeded
0xFF30=Can't open license file
0xFF31=Illegal version of software
0xFF32=License no longer valid
0xFF40=MIB project file not found
0xFF41=No Default project loaded by VIGO.EXE
0xFF42=No valid handle to the Target Specification
0xFF43=The MIB project number out of range
0xFF44=Not able to load project into MIB
0xFF45=No default project found
0xFF80=Can not load Hugo2, because out of memory
0xFF82=Hugo2 not found
// LoadProject
0x0020=Project Info Pointer not found
0x0021=No file name
0x0022=No file type
0x0023=Unknow file type
// UpdateBlockIndexes / UpdateListIndexes
0x0030=Wrong Element size
0x0031=Wrong Element size
0x0032=Variable without type declaration
0x0033=Wrong Element size
// ReadSubBlockFromFile
0x0040=Error reading header
0x0041=Error in version
0x0042=Error in block size
0x0043=Reserved header name
0x0044=Update with another name failed
0x0045=File block name read failed
0x0046=Access to file denied
0x0047=File not found
0x0048=Unknown file
0x0049=Load subblock as project
0x004A=Load project as subblock
0x004C=File block read error
0x004D=Error when setting Read-File-Position
0x004E=Error in the project number
0x0241=Error in version, Use VIGO 3.0 for conversion
0x0242=Error in version, can't be converted
// OpenMIBBlockFile
0x004B=Project script file not found
// WriteSubBlockToFile
0x0050=Write header failed
0x0051=Write database failed
// PutElementFields:
0x0053=Name already exists
0x0169=The Port is already defined, can not be redefined
0x0170=Editing the PortName is not allowed
// DeleteElement
0x0054=Move block to bottum failed
// MoveNameToBottom
0x0055=Error in the Name string
// FindLocalName
0x0057=Error in the Name string
// FindName
0x0058=No name specified
0x0059=Name not found
0x005A=Subelement not found
0x005B=Invalid ProjectPtr or NameSpace index error
//FindPhysId
0x006B=TypeName In Reference
// AddElementWithSize
0x006D=No more nets allowed
// GetNameIndex:
0x0070=Name missing
0x0071=Type missing
// FillTargetSpecification:
0x0080=Project missing
0x0081=Name string missing
0x0082=Wrong version
0x0083=Invalid name space
0x0084=Consistency error, go to the MIB Edit Tab in VIGO.exe and run a Consistency
Check on the project and save the project
0x0085=Project is not enabled
0x0086=Cannot set SubPhysId, PhysId is not SWNo, Register or Channel
0x0087=PhysID is a group
// SubFillTargetSpecification:
0x0090='.' expected
0x0091=Error in Type name
0x0092=Error in Index range
0x0093=Missing ']'
0x0094=Missing '['
0x0095=Invalid name
0x0096=Missing '[' or '.'
0x0097=Syntax error
0x0098=No subtype
0x0099=Unknown kind
0x009A=Invalid type name
0x009B=Invalid use of alias
0x0165=No access to internal values in BufferType
0x0168=Alias OverFlow
// CheckConsistency
0x0109=Invalid basic type
0x0110=Name to long
0x0111=Unexpected type name
0x0112=Missing type name
0x0113=Invalid SubPtr
0x0114=SubPtr out of block
0x0115=SubPtr out of database
0x0116=Inconsistent element size and block size
0x0117=Inconsistent project block size and database size
0x0118=Inconsistent element size
0x0119=Unexpected SubPtr
0x0120=Inconsistent sub kind
0x0121=Invalid sub element offset
0x0122=No filler needed
0x0123=Hole in record type
0x0124=Missing SubPtr
0x0125=Name is not a type
// HUGOMIB
0x0150=No Default Project Found
0x0151=No Project Found
0x0152=No Project File Found
0x0153=No Valid Handle
0x0154=Project Not Open
0x0155=Netdescription Not Found
//MIBClipBoard
0x0163=ClipBoard Is Empty
0x0164=Memory copy failed
// convert
0x0200=Can not convert MIB file in View Mode
// Net
0xFFEE=No "IDC" Information in registration database
0xFFEF=No "NetType" Information in registration database
0xFFF0=No Specific NetTypes Key in registration database
0xFFF1=No "NetTypes" Key in registration database
0xFFF2=No "Projects" Information in registration database
0xFFF3=No "Default Portnumber" Information in registration database
0xFFF4=No "Current Workspace" Information in registration database
0xFFF5=No "Workspaces" Key in registration database
0xFFF6=License NetName used
0xFFF7=No route to net
0xFFF8=No fieldbus address
0xFFF9=Illegal combination of nettypes
0xFFFA=No address
0xFFFB=No nets on this PC
0xFFFC=Too many nets
0xFFFD=Error in registration database
0xFFFE=Unknown nettype
9 Appendix A
The following tables will prove to be useful to programmers designing application programs,
who wish to use the facilities, offered by VIGO.
Table 1 contains the Properties, which can be used in VIGO STANDARD (VIGO.STD).
Table 2,3 and 4 show the Properties and Methods, which can be used in VIGO
PROFESSIONAL (VIGO.PRO).
Table 5 and 6 contain a short description of the Kinds/elements that are used in the MIB
database.
Table 7 contains the data types that are defined for P-NET modules, which VIGO also
uses.
Table 8 contains the Object Types for all Standard P-NET Channels. In addition, the Object
Types for some company specific channel types, owned by PROCES-DATA A/S, are also
given.
Further information about the P-NET Standard Channels can be found in the "P-NET Stan-
dardized General Purpose Channel Types" manual, from the International P-NET User Or-
ganization.
Table 9 contains the values for Capabilities and ObjectType for a selection of PROCES-
DATA modules, which may be used in VIGO. In the MIB definitions, the Capabilities and
Objecttype for all NodeTypes must be set to the correct value, in order to list the appropri-
ate relevant tools from the right mouse menus in the MIBOCX.
In cases where a program developer is using VIGO Professional (VIGO.PRO) objects, and,
for some reason, wants to modify some of the properties, it is entirely the programmers’ re-
sponsibility to set ALL the other related properties to ensure that these are compatible.
Otherwise, errors may occur in transmission or data conversion.
PhysId String Identifies the physical object. This function fills out the specifica- Property
tion of the physical object obtained from the Manager Information
Base. Property
ErrorCode Integer This variable contains a unique error code, in case an error oc-
curs when accessing an object property or method. Property
ErrorString String This variable contains an error message in plain text. This could
be used in a Message Box.
Value Variant Used to operate on all data types. This Property must be used to Property
receive and send data directly to variables in VIGO PROFES-
SIONAL.
DoRead Void Used to start reading data into the Buffer. Data can be read us- Method
ing InValue
DoWrite Void Used for writing to the contents of the Buffer. Data can be send Method
to the buffer using InValue
SubPhysId String Identifying a simple element in a complex structured variable, Property
identified and obtained by PhysId, and located in a Virtual Ob-
ject.
InValue Variant Used to operate on all data types. This Property must be used to Property
receive and send data to the Buffer, when using the DoRead or
DoWrite Methods in VIGO PROFESSIONAL.
DataReady Boolean This property indicates if the command has finished and the data Property
are ready when the Buffer is used to Read / Write data.
Progress Float Indicates the progress of a certain command, e.g. how much (%) Property
of a file is downloaded.
StopSequence Void Used to stop a sequence running within the IDC, e.g. download Property
or upload.
EnableExceptions Boolean Used to enable exception handling procedures build into the vir- Property
tual object.
Table 2 Properties and Methods for VIGO PROFESSIONAL (VIGO.PRO)
* Vendor, ModelName and Revision can be obtained from the ServiceChannel. (Ref.
P-NET Standard).
Project Project The Project holds information about the whole Project description. The data are stored
in a MIB-file.
BasicType Type Boolean, Byte, Char, Word, Integer, LongInteger, Real, LongReal, OldReal, Timer,
RealDate and OdDate are all BasicTypes, from which all other types are constructed.
NodeType Type NodeTypes holds information about the entire data structure to use in a node. The
elements (channels and softwire numbers) inside are all set up as SubElements
ChannelType Type A ChannelType holds a description for a channel in a Node. The elements (Registers)
inside are set up as SubElements.
RecordType Type Complex structures for variables are set in a RecordType. The elements (Record-
Fields) inside are set up as SubElements.
Enumerated Type Enumerated holds identifier for logic names used in reeling off. The elements inside
(EnumeratedName) are set up as SubElements.
ArrayType Type In ArrayType an array of a specified type can be created.
BufferType Type In BufferType a buffer of a specified buffer element type can be created.
BitArrayType Type In BitArrayType a boolean array can be specified. Instead of occupying a byte to each
boolean value, the BitArrayType only uses one bit for a boolean.
SetType Type To give special values to a type, SetType is used.
StringType Type StringType is used to define a string, which consists of a length (in bytes) and an ar-
ray of char.
VirtualRecordType Type The VirtualRecordType is used to give a Virtual description of the physical plant. The
elements inside VirutalRecordType (Alias, Constant, VirutalRecordType and VirtualAr-
rayType) are set up as SubElements, and can be accessed using these subnames.
VirtualArrayType Type The VirutalArrayType is used to give a Virtual description of the physical plant. The
elements inside VirutalArrayType (Alias, Constant, VirtualRecordType and VirtualAr-
rayType) are set up as SubElements, and can be accessed by using index values.
BitMapType Type To define a Bitmap of a specific type, BitMapType is used.
PointerType Type A Pointer to another Type definition is created from PointerType
Procedure Type To reserve a name for a Procedure in an application the Kind: Procedure is used.
Function Type To reserve a name for a Function in an application the Kind: Function is used.
Table 5 Kinds of MIB elements used in a Project Description
Node Variable Nodes are used to gain contact to modules within the physical plant. Nodes are
only set up from the kind: NodeTypes.
Channel Variable Channels are used in the description of a NodeType. Channels are set up from the
kind: ChannelType.
Register Variable Registers are used to describe all variables inside a ChannelType. Registers can
be set from all Type Kinds, except ChannelType and NodeType.
SWNumber Variable If the SoftWire number is known, this can be given directly. SWNumbers are used
in NodeType.
RecordField Variable A RecordField holds all Type Kinds, except ChannelType and NodeType. Record-
Fields can only be used inside a RecordType.
Constant Constant To set a Constant in the Project description the Constant element can be used.
EnumeratedName Constant As SubElements to Enumerated, EnumeratedNames are used. The Names repre-
sent a specified value.
Alias Variable Aliases are used to set up pointers, which can act as short cut to elements within
the Project description.
VirtualName Variable In Virtual descriptions the VirtualName consist the VirtualRecordType or the Virtu-
alArrayType to use.
Table 6 Kinds (Variables) in the MIB
Number
P-NET Data Type Length in bytes
Hex Decimal
Empty 0x20 32 -
Integer 0x22 34 2
LongInteger 0x23 35 4
Real 0x24 36 4
LongReal 0x25 37 8
RealDate 0x27 39 8
String 0x28 40 -
Boolean 0x2B 43 1
OldDate 0x2E 46 8
Byte 0x31 49 1
Word 0x32 50 2
UserDefined 0x3D 61 -
Table 7 List of datatypes for P-NET modules.
The object types for P-NET Standard Channels and some company specific channels are
found in the following table.
Object Description
0 Object type is not used or the object type is a non-standard type
1 Service channel
2 Digital IO channel
6 PID-regulator channel
7 Calculator channel
9 Printer channel
10 Weight channel
11 Program channel
14 Communication channel
The following table shows the object type and the capabilities for a selection of standard
modules from PROCES-DATA A/S.
Module Hexadecimal
ObjectType Interpretation of capabilities Capabilities
number value
PD340 340 NoOffset,NobitAddress,OldType 7 7