Define Events

Define events with the IO Driver Editor

On this page:

Creating an Event Xml file

Open the I/O Driver Editor from the QINSy Console.
If the icon is not currently visible, add it by right clicking in the lower panel, selecting the Add/Remove QPS Programs option and checking the appropriate box.
Alternatively make the addition via the View menu.

Info

The I/O Editor program has two functions:

  1. Making custom designed sensor data input drivers (INI files). Search for 'IniFileEditor' in QINSy Help pages, and Chapter 14 of the QINSy Training Manual.
  2. Creating Eventing configuration files (XML). - The subject of this How-to document.

The drivers and eventing files are then available for selection in Database Setup when defining systems/sensors.

In older versions Eventing files were stored as INI files, which can still be used. They are converted to an *.xml.


Click on the icon to start the I/O Driver Editor.
Under 'Type:' select 'Event Output'. Unless an eventing driver has already been made the main panel will initially be blank.
If the window initially shows 'Type=Generic Input' a list of previously defined Generic Input drivers (INI files) is shown.

Press the 'New' button to create a new XML file (or press the 'Open' button to edit an existing XML file).

Every 'Event' and every 'Class' of events can be represented with an icon.
If no Eventing drivers have been created previously, pressing the New button causes a pop-up message asking for the location of the folder in which icon files are stored.

Click on OK and use the Windows browser to find the appropriate folder or create a new one.
Icons should all be placed in a single folder. The Icon/Cad Block Folder can be stored anywhere on the hard drive.
Icon Files have the extension ‘ico’ and must measure (in pixels) 512x512, 256x256, 128x128, 64x64, or 32x32.

Info

QPS does not provide any icons with the distribution of QINSy.


Back in the empty Event Setup dialog enter a name for the 'Driver description as displayed in DB Setup'.
This name is shown in the rest of QINSy when using the XML file for eventing.

Add / Change Event Classes

An individual Event is assigned to a Class.
An Event Class can be seen as a group of related event definitions. An Event definition is always a member of a class.
For example when performing a pipeline survey with an ROV an Event labelled 'Anode' might be assigned, along with a number of other pipeline features, to a Class labelled 'Pipeline Features' (see 'Purpose' paragraph on main page).
Dividing Event definitions into Classes makes it easier to manage large numbers of events.

Press Add to start. A pop-up message asks for a Class to be defined.

Alternatively press the Classes button.
In either case a ‘Define Event Classes’ dialog is displayed.
Enter a description in the Name text box, choose a Code and an Icon.

Select the ‘Sequential events’ option if you want the events to be handled in a fixed, user-defined sequence.
For example in a dredging operation a sequence of events might be: Sailing Empty, Begin Dredging, End Dredging, Sailing Full, Dumping followed by Sailing Empty again.
In the Generic Event Driver window online only the first of the sequential events is displayed initially. When that one is fired, the next event in sequence is displayed, and so on.

Do not forget to press the Add button in order to save the new class.

Note

It is possible at all times to change the Class properties. The Events that are members of the Class will automatically inherit the new Class properties.
In order to change a Class select the Class entry in the list on the left side, change properties, e.g. name etc. and press the Change button to apply the changes.
New Class properties are not saved unless the Change button is pressed.

Use the Delete button as needed.


Press OK to save the class definitions that have just been added.

Adding Events

Info

The following descriptions will use a specific example event 'Pipeline Crossing' often encountered during a site survey or pipeline inspection survey.


Back in the Event Setup window, press the Add button on the right side to define an Event.
The resulting Event Properties dialog has 4 tabs:

Event Properties - General tab

Under the General tab:

PropertyDescription
ID
The program automatically assigns an identification number to the Event for internal use that cannot be changed here.

Initially IDs are based on the order in which Events are defined. If the order is changed, event IDs also change. This is fully acceptable in the set up phase BUT......
The IDs should not be changed nor swapped/shuffled once a survey job is in progress.

That is because events stored in the database have only their IDs saved. This ID contains the link to the event definitions that are stored in the ‘Xml' file.
When a database with events is processed in the Event Editor and the IDs have been changed then incorrect event descriptions will be shown there.

Use of IDs

ID numbers can be used to trigger events. For example if an input from an external system sends a number matching an event ID number, that event can be made to fire, and to perform an action.
Please refer to Add Miscellaneous Driver For Event Firing for further details.


Class

Assign the Event to the appropriate Class. In the example this is 'Pipeline Features'. If not already defined, press  to create the Class.

Event DescriptionProvide an alphanumeric description easily recognized while online.
The text entered here is displayed online in a column of the Generic Eventing Driver window, and offline in the Event Editor used for event editing/exporting.
AbbreviationEnter an alphanumeric abbreviated identifier/name easily recognized while online.
The text entered here is also displayed online in a column of the Generic Eventing Driver window and offline in the Event Editor during event editing/exporting.
Event CodeEnter an alphanumeric identifier easily recognized while online.
The text entered here is also displayed online in a column of the Generic Eventing Driver window and offline in the Event Editor during event editing/exporting.

Info

In the Online Generic Eventing Driver interactive dialog box Events can be displayed using their Description, Abbreviation and/or Code.
Therefore enter appropriate values that support quick identification during data acquisition.


Event Properties - Type tab

Under the Type tab, define the properties associated with the Event.

  • These are the properties of the event for which values may be input by the user when QINSy is online and an event is fired.
  • All properties defined here are listed in the Select Event window that pops up when an event is fired.
  • Each event can have multiple properties of the same type and/or different types.
  • All properties except Start Event and End Event allow the user to add text fields in the online eventing driver.

Click the Add button to start defining properties.
By default the Add Event Property window looks like this:

PropertyDescription
Type

<Custom Float> - allows input of a floating-point number, i.e. a number that has a decimal place. Floats are used when more precision is needed. Definition of multiple Custom Float properties is allowed.

<Custom Integer> - allows input of an integer, i.e. a number without a decimal point. Definition of multiple Custom Integer properties is allowed.

<Custom Text> - allows input of an alphanumeric text string. This field is tabulated under 'Custom Property' (see picture below). Definition of multiple Custom Text properties is allowed.

Example use of custom properties

'Custom' properties support entry of additional information about an event.
For example, in a site survey an event description such as "Pipeline" used on its own reports only that a pipeline was found at time 't' at a particular location (E/N/H).
It might be useful to add additional information about the pipeline found - maybe its condition, size, type, owner and so on.

<Custom Text> could be used to describe Condition (e.g. poor, fair, good, excellent); Owner (e.g. ABC Oil Company, XYZ Gas Corporation etc.).
<Custom Integer> could be used to describe Size (e.g. 6", 12", 18", 24" etc.).
<Custom Float> could be used to describe Depth of Burial (e.g. 1.2m, 3.7m, etc.).

For each additional 'custom' property defined an extra data column is inserted in the online Generic Eventing Driver window, and in the offline Event Editor window.

This table is shown in a the lower panel of the online Generic Eventing Driver window where firing of events is controlled:


Comment - allows input of an alphanumeric text string. This field is tabulated under 'Comment' (see picture above). Only one definition of this property is allowed.

Target Height - used if the event item has dimensions to be entered. The value is shown in the column headed 'Height' (see picture above).

Target Length - used if the event item has dimensions to be entered. The value is shown in the column headed 'Length' (see picture above).

Target Location Name - provides an opportunity to add a remark.  The value is shown in the column headed 'Location' (see picture above).

Target Width - used if the event item has dimensions to be entered. The value is shown in the column headed 'Width' (see picture above).

DescriptionThis field is used to describe each Event Property that is entered. The value is shown online in the Select Event window, Generic Eventing Driver window and offline in the Event Editor (see Example: Pipeline Crossing).
Validate InputThis option becomes live for all Event Properties except the Comment property.
The intent is to authenticate the property value input by the user when online by setting a Minimum and Maximum value that the property can have.
When the value is outside the specified range a pop-up advisory message is triggered.
Use items

Enter each item value on a separate line.
This field supports the definition of multiple predefined values that a property can have.
For example, if an event property is:

  • 'Condition', the items added might be 'Poor', 'Fair', 'Good' and 'Excellent'.
  • 'Size' the items added might be 12.5cm, 25cm, 37.5cm, 50cm, 75cm, 100cm etc.

When an event is fired online, the property 'Condition' or 'Size' will have an associated drop down list showing these four condition rating, any one of which may be selected.

Allow Custom InputOnly available when 'Use Items' is enabled.
Checking this box means that, when the event is fired online, you can enter an Item value other than the predefined values.
In the example above you can select one of the four predefined condition ratings ('Poor', 'Fair', 'Good' and 'Excellent'), or type in another rating value, e.g. 'Destroyed'.
Example - Add Event Properties defined for Event 'Pipeline Crossing'

Property #1

Click on the Add button.

Use Type = 'Comment' and
Description = 'General comment'
With no further event property defined this allows the user free entry online of any information deemed pertinent.

Click OK


Property #2

Click on the Add button.

Use Type = 'Custom Text' and
Description = 'Type'

Check 'Use items' and enter 'Oil' and 'Gas'
- when this event is fired online, the user selects either option.

Click OK


Property #3

Click on the Add button.

Use Type = 'Custom Integer' and
Description = 'Size (inches)'

Check 'Validate Input:' and enter Minimum = 1, Maximum = 100
When the event is fired online any data entry <1 or >100 is disallowed.

Check 'Use items' and enter 6, 12, 18, 24, 36, 24, 60.
Check 'Allow Custom Input'
When the event is fired online, the user selects one of the predefined pipe sizes, or enters another size not covered by the list.

Click OK.


Property #4

Click on the Add button.

Use Type = 'Custom Text' and
Description = 'Condition'

Check 'Use items' and enter 'Poor', 'Average', 'Good', 'Excellent'.
Check 'Allow Custom Input'
When the event is fired online, the user selects one of the predefined condition descriptions, or enters another description not covered by the list.

Click OK.


Property #5

Click on the Add button.

Use Type = 'Custom Text' and
Description = 'Mattressed'

Check 'Use items' and enter 'Yes', 'No'.
Check 'Allow Custom Input'
When the event is fired online, the user selects whether mattresses have been used to protect the crossed pipes Yes/No, or can add a comment to describe, for example, the type and extent of mattresses.

Click OK.

The final Type tab should look like this:

Use the available buttons to modify properties:

ButtonsDescription
AddFunction as described above.
EditClick on any property and press Edit to make changes.
RemoveClick on any property and press Remove to delete it.
CloneClick on any property and press Clone to make a copy of the property.
This is useful when another added event has very similar properties that just need minor edits.
The copy is added to the end of the list ready for editing if necessary.
Move Up/DownChanges the order in which the event properties are displayed and stored.


Event Dependencies using Linkage

Some Events have inter-dependencies and can be linked:

  • Start Event and End Event property are used to link two or more items that are related.
    In general, always define Start Event(s) first, afterwards define the End Event(s).
    As the name already suggests, the Start Event option may be selected if the event defines the start of a period or a phenomenon.
  • When the End Event option is enabled then a list with available Start Events is shown.
  • A link between this End Event and one or more Start Events is established by selecting the box before the Start Event.

Example:
1st Event = Start of Freespan, linked to 2nd Event = End of Freespan in a pipeline inspection survey, or
1st Event = Start of Dredging, linked to 2nd Event = End of Dredging, or
1st Event = Start of Tow, linked to 2nd Event = End of Tow

For the starting event check Start Event.


For the ending event check End Event and select which starting event to link it to.
Note that if multiple Start Events have been defined prior to defining an End Event, all the Start Events are listed and the appropriate one has to be selected.


Event Properties - Action tab

Under the Action tab Events can be linked to a QINSy Controller action, and/or cause a state change in the ASCII Logging feature:

  • When an event is fired the event can at the same time execute a QINSy user action.
    This helps the user to operate QINSy in a simple way.
  • For example an event can invoke start/stop recording or selection of a new mainline.

The following actions can be initiated by a defined Event:

ActionDescription
Not UsedNo Action is used when an Event is fired.
Select mainline and start recordingUser can select a line from the line planning and start recording with this line.
(Note : Line must have been selected in the Session of the Controller, right pane of Session Setup.)
Start recordingQINSy Controller will start/continue recording.
Pause recordingQINSy Controller will pause recording.
End recordingQINSy Controller will stop recording. (Note: All pending events will be stored.)
Split database manuallyClose current Database, and open new database.
Fix manuallyIncrement Fix number
Man over boardActivates QINSy M.O.B. functionality.

Actions may or may not be allowed when online; this depends on the current state of the Controller.
For example if the Controller is already recording to a database the event with the action ‘Start recording' cannot be executed.

ASCII Logging Activation
Do not change ASCII LoggingEvent firing has no effect on ASCII Logging.
Start ASCII Logging when this Event is firedEvent firing initiates ASCII Logging to file.
End ASCII Logging when this Event is firedEvent firing stops ASCII Logging to file.


Event Properties - View tab

Under the View tab select which properties of an event should be visible online in the Navigation Display when the event is fired.

ParameterDescription
General IconChoose an icon to associate withe an event.
The drop down list contains all the icon files contained in the Icon/Cad Block Folder chosen in the Event Setup window.
Symbol TypeChoose between 'Icon' and 'Pro File CAD Block'. The latter is a Block made in Terramodel.
Alignment

Select Center, Bottom Left, Bottom Right, Top Left or Top Right.
The icon is placed on the event reference location, with the corner of the icon relative to the selected anchor point (alignment). 
The alignment selection therefore affects the drawing of the icon itself.

Show (items)

Check one or more boxes to select what property values are shown attached to the event icon in the Navigation Display.
The relationship between icon and text is fixed.


Completed Event Setup Window

After defining the various Classes and Events needed for the survey, the Event Setup window might look something like this for a pipeline inspection:

The various columns show the properties of the event definitions.

Event Setup
ID

The Identifications (ID) of the event: these are automatically assigned by the program based on the order of the list.
Using the Move Up/Down buttons changes event order, thereby renumbering them with new IDs.
The IDs should not be changed nor swapped/shuffled once a survey job is in progress.

The events that are stored in the database have only their IDs stored. This ID contains the link to the event definitions that are stored in the ‘Xml File’.
When a database with events is processed in the Event Editor and the IDs have changed then incorrect event descriptions will be shown there.

Use of IDs

IDs can be used to automatically fire an event if a Miscellaneous System is added to the Template database. See Add Miscellaneous Driver For Event Firing.


SeqShows the order in which the events will be fired; this is only relevant if the Class is defined as sequential.
Link

This column indicates whether a linkage exists and shows the ID of the other linked event.
If the linkage is not yet properly set then question marks (‘??’) will appear in this column.
If linkage is not relevant (event is not of start or stop type) then a dash (‘-“) is shown here.

Code / Abbreviation / Description / icon / Type / Action

All other columns show the properties as have been entered in the ‘Edit Event’ dialog.
Type codes: UF=Custom Float, UI=Custom integer, US=Custom Comment, C=Comment, H=Target Height, L=Target Length, W=Target Width, LC=Target Location

<Move Up / Move Down>An event can be moved up or down in the list. This will change its ID and Sequence Number.
If the event is linked then the link to other event(s) will be kept although the IDs in the Link column may change.
<Edit / Remove>An Event definition can be changed or deleted.
<Save Xml>Store the ‘Xml file’ to disk.

By default, the Xml file is stored in <common documents>\QPS\QINSy\Eventing (typically C:\Users\Public\Documents\QPS\QINSy\Eventing).
Don't forget to back up the Xml File together with the recorded QINSy Databases. The files are needed if you wish to process the events further with the Event Editor.

<Cancel>This button will close the application without saving!

Return to: How-to Eventing