DBS00294-16 VDR Explorer
DBS00294-16 VDR Explorer
DBS00294-16 VDR Explorer
Revision record
Version Date Description
1.0 June 2006 Original issue of this document.
1.1 December 2006 Documentation for VDR explorer Version 1.1. Support for
extraction to database discontinued. Alarm display added.
Other minor changes.
1.2 April 2007 Minor revision. Description of Remote Backup has been
removed from this manual.
1.3 March 2008 Documentation for VDR Explorer 1.31. (Vista support and
improved ModBus support).
1.4 August 2008 References to DM200 and DM400 included.
1.5 September 2008 Documentation for VDR explorer 1.4 (improved tool for
data export).
1.6 September 2010 Description of IMO (IEC61996-1/2) mode for data export
tool.
Description of Azimuth Thruster object included.
Contents
5 CONFIGURATION..................................................................................................15
5.1 Creating a new configuration ..................................................................................15
5.2 Adding new tab pages.............................................................................................15
5.2.1 Tab page organizer..........................................................................................16
5.3 Creating and moving graphical objects ...................................................................17
5.3.1 Creating and moving panels ............................................................................17
5.4 Configuration of graphical objects ...........................................................................17
5.4.1 Copy/past of graphical object configuration .....................................................18
5.5 Configuration of Gauges .........................................................................................19
5.5.1 Dial meter.........................................................................................................19
5.5.2 Vertical bar.......................................................................................................21
5.5.3 Horizontal bar...................................................................................................22
5.5.4 Compass dial ...................................................................................................23
5.5.5 Horizontal ruler.................................................................................................24
5.5.6 Doppler log.......................................................................................................25
5.5.7 Rudder indicator...............................................................................................26
5.5.8 Graph...............................................................................................................27
5.5.9 Roll and pitch indicator.....................................................................................28
5.5.10 Azimuth Thruster..............................................................................................29
5.6 Numeric data display...............................................................................................31
5.6.1 General ............................................................................................................31
5.6.2 Colors ..............................................................................................................31
5.6.3 Concatenation..................................................................................................31
5.7 Paper strip...............................................................................................................32
9 EXTRACTOR..........................................................................................................49
9.1.1 Track information .............................................................................................49
1.1 References
2 System overview
The VDR Explorer is an application designed for W2000, XP or Vista. The VDR Explorer is able to
replay data recorded by a DM300 S-VDR and DM500 VDR. The VDR Explorer can read data from
the following sources:
Note 2) if the original cable is attached to the capsule, then use a straight CAT5 cable and a RJ45 coupler.
Mains
12VDC adaptor 110-240VAC
P/N 1001163
Firewire
cable Crossed CAT5
Portable
4pin - 6pin RJ45 RJ45
PC
FW repeater Note 2
CAT5
P/N 1001162
Note 2) if the original cable is attached to the capsule, then use a straight CAT5 cable and a RJ45 coupler.
Stationary Firewire
PC cable
6pin - 6pin Backup disc
Note) if the PC is unable to power the disc then use a repeater with a mains adaptor, see below.
Mains
12VDC adaptor 110-240VAC
P/N 1001163
Firewire
cable Firewire
Portable cable
4pin - 6pin
PC 6pin - 6pin
FW repeater Backup disc
CAT5
P/N 1001162
3 GUI description
Tab pages
The window title bar complies with the general standard for Microsoft GUI. The window title bar
will display the name (if defined) of the current GUI configuration.
File->Save: Saves the current VDR Explorer configuration using the same name
File->Save as: Saves the current VDR Explorer configuration using a new name
File->Recent files: Short cuts to the 4 most recent configurations, which have been opened or
saved on the disc. The configuration, which has been temporary downloaded e.g. from a VDR while
playing live will not be included on the list.
Tools->Log: Displays the log for the VDR Explorer program. This is only used for troubleshooting.
Tools->Connect: Opens the connect dialog box. The connect dialog box is used to select a data
source for the VDR Explorer see section 7.
Tools->VDR config management: The VDR Explorer is able to use information from a VDR
configuration object labels see section 6.1.
Tools->VDR Explorer config management: The VDR Explorer is able to store its configuration
together with source data and later retrieve this information see section 6.2
Tools->Export Data: Opens the Export Data dialog box, see section 10.
Tools->Setup Serial Output: Opens a dialog box for selecting data to be outputted to other
applications, see section 14. (This is only selectable when VDR Explorer in configuration mode.)
Tools->Setup AIS Data Input: Opens a dialog box for selection the common data source for the
AIS display objects, see section 15.2. (This is only selectable when VDR Explorer in configuration
mode.)
Options->Color Definitions: Opens the definitions dialog box, see section 5.9.
Options->Preferences: Opens the dialog box for setting the program preferences.
Mode->Configuration mode off: Exits the VDR Explorer from configuration mode.
To select a data source press Connect, consult section 7 for more details.
It is highly recommended that a VDR explorer configuration that matches the VDR data is uploaded
to the VDR when the VDR is installed, since this will enable any PC with the VDR Explorer
installed to replay data without any configuration work. If this dialog box appears then answer,
Yes.
A tool tip with helpful information will appear if the cursor hovers over a bottom for short period.
Note) The tool tip is not available for disabled functions (buttons with symbols).
4.1.2 Tracks
A track is defined as an uninterrupted recording session. The VDR will create a new track if it is
restarted. VDR data retrieved from a normally operating VDR will only contain one track.
5 Configuration
The VDR Explorer must be in confirmation mode Mode->Configuration Mode -
On before any change of configuration can be made.
File->Open
Is used to open an existing configuration e.g. a template. Use File-Save as to store the new
configuration under another name.
The Tab page organizer is a tool for creating, deleting, hiding, naming and sorting the tab pages.
Type in the title for the new tab page, select a template from the list box and click on OK.
A proper tab page must be created before any graphical object can be created. Templates with one
to four panels and one example have been made. (Right click on any tab for a tab page and then
select Tab properties opens the Tab Page Organizer see section 5.2.
A new graphical object is created on a panel by right clicking on a panel and then Insert Object.
More objects within a panel will form a column.
The position of an object within a panel may be changed i.e. the object may be moved up and down.
Right click on the object and then click on Object-> Move up or Object->Move down
A graphical object cannot be moved to another panel i.e. to the left or to the right. However there is
a way around this limitation.
1. Create a new instance of the object that has to be moved on the desired location.
2. Copy the configuration from the original object and paste it onto the new object (see section
5.4.1).
3. Delete the original object.
The following graphical objects have been defined (consult section 15 regarding objects related to
AIS data display):
Dial meter
Dual dial meter
Four Vertical bars
Two Horizontal bars
Compass dial
Horizontal ruler
Doppler log indicator
Dual Rudder indicator
Graph
Roll and Pitch indicator
Azimuth thruster
Numeric data display
Small numeric data display
Paper strip
Right clicking on the object while the VDR Explorer is set into configuration mode opens the
property dialog box for a graphical object.
Copy configuration:
Right click on the object with the desired configuration, and then click on Copy Config.
Paste Configuration:
Right click on the object that needs a new configuration, and then click on Paste Configuration
The receiving graphical object must be identical to the original.
5.5.1.2 Scale
This section contain the parameters for controlling
the geometry and resolution of the dial
Start value: The start value corresponds to the
most counterclockwise point on the dial.
End value: The end value corresponds to the most
clockwise point on the dial.
Format:
Format is used to define the format of the figures
on the dial, see section 5.10.
Angle:
Defines the extent of the dial.
Rotation:
The dial will per default be oriented like a typical
speedometer in a car i.e. the axis of symmetry is
vertical. The orientation may be changed by
entering a value other than 0 in this field.
Resolution:
This parameters control the graduation of the dial.
5.5.1.3 Sources
Primary: Input to the pointer for the dial meter.
Secondary: Input to the secondary indicator for the dial meter. The secondary indicator is shown
as a small triangle. The secondary indicator is typical used for displaying the commanded value
while the main indicator shows the actual value.
The setup button will open a dial box where the source data can be defined, see section 5.8
5.5.1.4 Colors
Parameters in this section control the appearance of the dial meter. The set default may be used to
reset all the colors to the default settings (see section 5.9)
5.5.2.2 Scale
Start Value:
The start value corresponds to the bottom of the
bar.
End Value:
The end value corresponds to the top of the bar.
Mirror Horizontally:
Two adjacent bars are (default) two symmetrical
instances i.e. bar 1, 2 and 3, 4 form a pair. This
may be changed by checking Mirror
Horizontally for bars with e.g. odd number.
Format:
Format is used to define the format of the figures
for the bar, see section 5.8.3.2.
5.5.2.3 Sources
Primary:
Input to the main indicator for the bar.
Secondary:
Input to the secondary indicator for the object. The
secondary indicator is shown as a small triangle. The secondary indicator is typically used for
displaying the commanded value while the bar shows the actual value
5.5.2.4 Colors
Parameters in this section control the appearance of the bar object. The set default may be used to
reset all the colors to the default settings (see section 5.9)
5.5.4.2 Sources
Primary:
The primary data source controls the rotation of
the compass dial, the typical input is Heading.
Secondary:
The secondary (optional) data source controls a
small triangle circling the compass dial. The
typical secondary input is Commanded Heading.
5.5.4.3 Colors
The parameters in this section control the
appearance of the compass dial. The set default
button can be used to reset all the colors to the
fault settings (see section 5.9)
5.5.5.2 Scale
Star value:
The start value corresponds to the far left point of
the ruler.
End value:
The end value corresponds to the far right point of
the ruler.
Format:
Format is used to define the format of the figures
on the ruler, see section 5.8.3.2.
5.5.5.3 Sources
Primary:
Input to the primary indicator for the ruler. The
main indicator is shown as a triangle above the
ruler.
Secondary:
Input to the secondary indicator for the ruler. The secondary indicator is shown as a triangle below
the ruler. The secondary indicator is typically used for displaying the commanded value while the
primary indicator shows the actual value
5.5.5.4 Colors
Parameters in this section control the appearance of the ruler. The set default can be used to reset
all the colors to the default settings (see section 5.9)
Format:
Format is used to define the format of the numeric
outputs, see section 5.8.3.2.
5.5.6.2 Sources
4 inputs may be applied to the Doppler log object.
Longitudinal Speed:
Is shown as numeric data in the center of the
object
5.5.6.3 Colors
Parameters in this section control the appearance
of the object. The set default can be used to reset
all the colors to the default settings (see section
5.9)
5.5.7.2 Scale
Rudder Max Angle:
This parameter controls the extent of the dial for
the rudder indicator. It is recommended that a
value equal to the maximum rudder angle for the
vessel is used.
5.5.7.3 Sources
Primary:
The primary data source controls the pointer; the
typical input is data from the rudder angle sensor.
Secondary:
The secondary (optional) data source controls a
small triangle circling the dial. The typical
secondary input is Commanded rudder angle.
5.5.7.4 Colors
Parameters in this section control the appearance of the rudder indicator. The set default can be
used to reset all the colors to the default settings (see section 5.9)
5.5.8 Graph
5.5.8.1 Graph type
This section is used for defining the input to the X-
coordinate for the graph object.
Time/Y graphs:
The primary and secondary will be used as Y-
coordinate for two independent graphs. The time
will be used as X-coordinate for both graphs.
5.5.8.2 Resolution
This section is used for defining the resolution of
the graph(s). Small values for Time Span and
Sample Interval derive a graph with high
resolution while high values derive a graph that
covers a large time span.
5.5.8.3 Labels
Label:
Labels for the numeric outputs.
Unit:
Text displayed after numeric output and Y-axis,
X-axis if X/Y graph is selected.
5.5.8.4 Scale
This section is used for defining resolution and
format of figures for the Y-axis and the X-axis if
X/Y graph is selected.
5.5.8.5 Colors
Parameters in this section control the colors of the
graph. The set default can be used to reset all the
colors to the default settings (see section 5.9)
Type:
Used to select the gauge type (roll or pitch). Roll is
default for gauge 1 and pitch is default for gauge 2
5.5.9.2 Scale
Format:
Format is used to define the format of the numeric
outputs, see section 5.8.3.2.
5.5.9.3 Source
The data source controls the rotation of the ship
shaped indicator in the middle of the gauge; the
typical input is data from the roll and pith sensor
respectively.
5.5.9.4 Colors
Parameters in this section control the appearance
of the object. The Set to Default can be used to
reset all the colors to the default settings (see
section 5.9)
5.5.10.2 Thruster
Title: Text located over the dial and the alpha
numeric field located right top.
Unit:
Unit for the alpha numeric field located right top.
Rotation:
The orientation of the dial is controlled by this
parameter.
Scale:
Scale may be set to either 0-360 or -180 to 180.
Scale resolution:
This parameter controls the graduation of the dial.
Format:
Format is used to define the format of the figures
in the alpha numeric field located right top, see
section 5.8.3.2.
5.5.10.3 RPM
This section contains the parameters for the alpha numeric field located left center.
5.5.10.4 Order
This section contains the parameters for the alpha numeric field located left bottom.
5.5.10.5 Sources
This section is used for defining the input(s) to the thruster symbol and the two alpha numeric fields
RPM and Command.
5.5.10.6 Colors
Parameters in this section control the appearance of the thruster symbol and the two alpha numeric
fields RPM and Command. The Set to Default can be used to reset all the colors to the
default settings (see section 5.9)
5.6.2 Colors
The color of the label text for a Numeric data
display is determined by the default color
definition (Text/Outline Color) see section 5.9.
The Primary indicator color is used as color for
the displayed data.
5.6.3 Concatenation
A number of Numeric Data Displays may be
concatenated by removing adjacent lines (see
section 5.4).
5.8.1 Source
The source section is used to select the proper source for the gauge. A gauge/data field may be
disabled by selecting No Source i.e. no other parameters will be forgotten if already configured.
Save in library:
Will save the decoder script in the library if it has been changed. Se section 5.8.6
Library:
Will open the decoder script library from where the most commonly used decoder scripts can be
selected see section 8.
Use checksum:
NMEA strings not containing correct checksum information will be ignored if this box is checked.
Use timeout:
The appearance of gauge/data field will be affected when no new data is received within a specified
time, if this box is checked
- For gauges
The indicator will disappear.
5.8.6 Relation between decoders stored in the library and the configuration
The global colors define the over all color-scheme used for the graphical data display(s).
The background color is the color of the window used for a graphical data display. The
background color will be visible because there is a small space between objects (unless they
are merged).
The Object Frame Color indicates the border of an object.
Object background Color is background color used for objects.
Text/outline color is color for static text (e.g. labels) and for outline of most gauges.
Changes to Global color take affect immediately after OK or Apply is selected even when the
VDR Explorer is not in configuration mode.
The default colors are the colors of dynamic elements in a graphical data display e.g. the indicator
for a dial meter. Changes to default colors will only take affect for new objects. The colors for an
existing object may be set to new default colors by right clicking on the object (in configurations
mode) and select Object->Set to Default Colors.
The formatter syntax is identical to the syntax defined for formatting output from a NMEA decoder.
E.g.: The figures 7.5 and 10 will be displayed like this depending on the formatter.
Formatter 7.5 10
0 7 10
0.0 7.5 10.0
000 007 010
1) VDR (live playing): The current VDR Explorer configuration is stored in the capsule and on the
backup disc via the VDR. The VDR Explorer must be connected as Master.
2) Capsule/backup disc: The VDR Explorer is not able to write to a capsule/backup disc and is
consequently not able to save the VDR Explorer configuration at the source if data source is a
capsule/backup disc
3) Extracted data: It is possible to store a user defined configuration together with the extracted
data. The original VDR Explorer configuration (if present) will not be overwritten.
The connect dialog box is used for connecting the VDR Explorer to a data source. Five types of
data sources are supported:
A capsule
A backup disc
VDR extraction
Live from a VDR
The connect dialog box will change according to the selected type of data source.
7.1 Capsule
Capsules online window:
The Capsules online window displays a small symbol for each capsule, physically connected to
the VDR Explorer PC via the Firewire interface. A capsule is selected by left clicking on its
symbol. (Note: It is unusual to connect more the one capsule, but up to three capsules may be
connected simultaneous if needed)
Refresh button:
Forces the VDR Explorer to scan the Firewire for capsules and update the window.
Connect button:
Establishes a connection from the VDR Explorer software to the selected capsule. This may take a
few seconds.
Cancel
Closes the window.
7.2 Backup
Two kinds of backup discs are recognized:
- A disc that has been removed from a VDR
- Disc with data made by the VDR Remote backup utility (large backup)
The dialog for connecting a Backup Disc corresponds to the dialog for connecting a capsule,
described in section 7.1.
Connect button:
Connects the VDR Explorer to the selected database.
Cancel button:
Closes the Connect dialog window.
7.4 Live
Connect to IP field:
The IP address of the VDR must be entered here.
Connect button:
Connects the VDR Explorer to a VDR with the IP address displayed in the Connect to IP field.
Cancel button:
Closes the Connect dialog window.
8 Decoder library
The NMEA decoder library is used to organize the NMEA decoders. A NMEA decoder is a small
script, which describes how information shall be decoded and retrieved from a specific NMEA
sentence. The syntax for the script language is described in section 17. A short description is
available under Help->Help Topics in the decoder editor.
Sentence formatter:
A NMEA decoder is only able to retrieve information from one specific NMEA sentence.
A typical NMEA decoder is only able to retrieve information from one field in a NMEA sentence.
Most NMEA sentences contain many fields; hence a number of decoders may be needed for
retrieving all the information from one sentence.
Decoder group:
A NMEA decoder belongs to a group; all decoders in the same group are stored in the same folder.
Groups have been defined corresponding to the data items to be recorded (IEC 61996 section 4.6)
e.g. speed (4.6.3) or heading (4.6.4). The user may establish new groups.
Decoder name:
A decoder must be assigned a name. The name must be unique within the decoder group.
Decoder output:
The output from a decoder may behave like analog data, digital data or a text string. This
information may be described for a decoder. However this information is only informative and will
not be used by the VDR Explorer.
File->export:
Exports decoders to an external file.
File->Save in library:
Saves decoder in library.
File->Close:
Closes the window. Corresponds to cancel.
Edit->New decoder:
Adds a new decoder to the library.
Edit->New folder:
Adds a new folder to the library.
Edit->Copy:
Makes a copy of the selected decoder.
Edit->Edit:
Opens the decoder edit window.
Edit->Rename:
Renames the selected decoder or folder.
Edit->Delete:
Deletes the selected decoder or folder.
File->Save as:
Closes the editor window and opens the NMEA decoder library window where the new name and
folder (group) may be defined. This item is only present if the editor is called from the NMEA
decoder library.
File->Close:
Closes the editor window. The user will be prompted for unsaved changes.
Edit->Undo
Edit->Redo
Edit->Cut
Edit->Copy
Edit->Paste
Edit->Delete
Commands for the Editor
Tools->Insert symbol
A menu with symbols normally not found on a keyboard will be displayed.
Help->Help topics:
A description of the decoder script language will be displayed.
OK button:
Changes made will be stored; the editor window is hereafter closed. The previous version of the
decoder is overwritten. It is not possible to overwrite the decoders that are supplied with the VDR
Explorer.
Cancel button:
Closes the editor window, any changes made will be ignored and lost.
Save As button:
The editor window will close. Changes may be saved using a new name/folder while maintaining
the previous version of the decoder.
The Save As button is only enabled if the editor window is opened from the library (i.e. disabled
when opened from the GUI configurator).
Decoder name:
See section 8.1
Decoder output:
See section 8.1
Decoder description:
A description of the decoder may be included (recommended).
Help->Help topics shows a short description of the script language. Section 17 contains an
extensive description of the script language.
9 Extractor
The Extractor is used to retrieve data from a data source to a database. The VDR Explorer must be
connected to a date source (not live from a VDR) before the Extractor tool can be opened.
One or more tracks must be selected before the extraction process can start. A track is selected by
right clicking anywhere on the text line for that track (except on the checkbox). The sliders on the
blue bar may be used to reduce the amount of data used from the selected track.
The check boxes are used for indicating whether a track shall be included or excluded from the
extraction. Only check marked tracks will be included.
Extraction target:
Displays the currently selected (if any) target file for the extraction.
Extract button:
Starts the extraction process.
Close button:
Closes the window.
Extracting all data from a capsule will take approximately 20 minutes and require 6G byte of disc
space.
A data source must be selected before opening the export tool (see section 7).
Click on Tools -> Export data and data export tool dialog box will open.
Select the data to be exported (checkmark all boxes if all data shall be exported).
Select whether the export format should be IEC61996-1/2 (IMO mode checked) or an alternative
open industry (IMO mode not checked). For IMO mode is it possible to split the audio files, data
file and the system log into smaller more handy files each covering a user definable time span.
Click on Export.
The compression effect is useful when listening to recordings with a high dynamic range.
12 Data Log
The data log function is able to log data from selected objects into a CSV file. The data log function
is associated to a special tab page. The data log tab page is created like any other tab page.
Change the title if needed. Right click on the title, select Column Title and enter a new
title.
Right clicking on the title for column will open a menu with miscellaneous commands.
In general the width and order of the column can be changed in the same manner as for many other
Windows programs e.g. using click, drag and drop on the column title can be used to rearrange
columns.
The library path for the log files is defined by the preferences for the VDR Explorer see section
12.3
12.3 Preferences
12.3.1 Directory path for log files
The library path for the log files are defined by the preferences for the VDR Explorer (VDR
Explorer main window, Options->Preferences->Directory settings).
On: Data logging must be started manually even is a VDR Explorer configuration with
data logger enable is loaded.
Off: Data logging will start automatically if a VDR Explorer configuration with data
logger enable is loaded.
Prompt: (Default) the user will be prompted for accept of data logging.
13 Alarm panel
Selecting Tools->Alarm Panel or clicking on the icon on the Player window tool bar will
activate the alarm window.
Acknowledge audio:
This function will mute the audio until a new alarm is generated.
Options->Disable sound:
This option will mute the audio related to the alarms panel completely.
Options->Disable popup:
This option will prevent the alarm window from popping up when a new alarm is generated.
The parameters for generating alarms are located together with the other parameter related to a data
source see section 5.8.
23
The example above shows how an alarm will be generated if the wind speed is above 23knt.
Active:
The object will only generate alarms if this box is checked.
Alarm text:
The text that will be written in the alarm window.
Level Alarm:
An alarm will be generated if the output is above or alternatively under a specific level.
For serial communication, please note that the trend output from a NMEA decoder is used for the
alarm system.
The number of data sources and the output port may be selected.
AIS display
AIS display (small)
AIS own ship info
AIS target info
AIS target list (.5x1)
AIS target list (.5x2)
AIS target list (1x1)
AIS target list (1x2)
The figures following an AIS target list refer to the size of the object where 1x1 is the typical size
of a graphical object.
Notice that AIS data display object may be mixed with other objects on a tab page.
Tools->Setup AIS Data Input will open the AIS data settings tool.
The most important feature of the AIS data display is the ability to assign a label to and get
information about a target of interest. This is simply done by clicking either directly on the target on
the AIS display or on the label field for the target in the AIS target list. An AIS target info object
will be assigned to the target when this is done.
E.g.: On the AIS display tab shown above targets A and B have been selected.
A target may be deselected by clicking on the target again. The number of AIS target objects on
an AIS display tab determines the number of targets that can be selected simultaneously. First in
first out applies if the number of selected targets exceeds the number of AIS target objects.
Base station:
Aids to navigation:
Aircraft:
16 Special features
16.1 Floating windows
Note: This new feature has been designed for experienced users. Using floating windows in
configuration mode may be confusing.
A tab page may be detached from the VDR Explorers main window. This is either done by click,
drag and drop or double clicking on the tab for a tab page.
Right clicking on the top bar for a floating window will open a menu with items for manipulating
the window e.g. making it full screen.
Double clicking on the top bar for floating window will revert the window to a tab page. A floating
window will also revert to a tab page if the corner of the window is aligned with the corner first tab
in the VDR Explorers main window.
The purpose of this language is to easily match a given NMEA sentence and format it to human
readable text. This implies that both pattern matching ability and string formatting ability must be a
part of the language. The resulting human readable text will have a value associated with it. This
value is used for the trend indicator and is most likely taken from the NMEA sentence.
Matching and formatting a NMEA sentence consists of applying a small compiled program to a
NMEA sentence. The output from this program will be the formatted string and an optional value.
In this context a program is a compiled set of statements in the NMEA sentence formatting
language. The source for a program in this language consists of a sequence of statements. Each
statement will be executed in the order they are written; hence the language is a straight-line
language. If a statement fails, the program will exit.
The syntax and semantics of the language is best shown by use of an example. For an exact
description of the language see the Grammar chapter 3.
into the following result: N 5536.123 and the associated trend value 5536.1234 . Running the
following program does this:
The first line is a comment and has no effect on the program, but can be a useful aid when
developing decoders in the formatting language. The second line Search for GLL identifies
which NMEA id this program is valid for. The third line uses an if construct to test if field 7
contains the text A. If this is the case, the text GPS failed is printed and the program stops. If
not, the program continues onto line three. The next few lines consists of print statements on
field identifiers and strings. The hash mark # indicates a field identifier:
Where field indicates the field number, range the range of characters to use and format
how the number should be formatted.
Continuous print operations can be concatenated into one print sentence resulting in a more
compact program:
The last line identifies the field which will be used as the trend value.
if bit(#2,2) = 1
print "bit 2"
stop
endif
if bit(#2,1) = 1
print "bit 1"
endif
The output of this program applied to the above NMEA sentence is: bit 1 since bit 2 is not set. Bit
number is counted from the right hand side and begins at position 1. Hence bit 24-28 is the B.
The range is optional and identifies the range of characters to use. The syntax is x:y where x
is the first character to use (unless y is negative) and y is the number of characters. If x is out
of range then the program is terminated and an error is printed. If y is out of range then the
program will print to the end of the field.
If y is negative then the characters are selected from left. First to be printed is x-y+1 and last
character to be printer is x
Example:
print #2 3:-2
If x is negative then the first character to print is selected from the right. Example:
print #2 -4:3
print #2 -3:-99
The format field is optional and similar to the one used in Visual Basic. The maximum length of
a formatter will be limited to 10 characters, including the decimal point.
E.g.:
By replacing the F with an A the result will be formatted into an absolute value. The following
syntax is not allowed: F0. and F.0
The ModBus data will be encapsulated as NMEA strings before they are stored by the VDR.
The sentence formatter is: PMTM<PDU main group><Master flag>
PMTM: Common prefix for all NMEA string related to ModBus encapsulation
PDU group: ModBus defines a number of different commands for read/write of bits and registers.
These have been compiled into four groups:
RDB: Read bit
WRB: Write bit
RDR: Read Register
WRR Write Register
Master flag: Sentence formatter is terminated by M if the string contains data sent to the master
i.e. the NMEA string contains a ModBus response
Purpose: Used for testing the value for a bit in a write multiple/single coils command PDU.
Returns 1 if the bit is 1
Returns 0 if the bit is 0
Returns -1 if the bit is not present.
IF MBIT(#2,0x0021) < 0
// No bit so break without result
BREAK
ENDIF
IF MBIT(#2, 0x0021) = 0
PRINT off
TREND 0
ENDIF
IF MBIT(#2, 0x0021) = 1
PRINT on
TREND 1
ENDIF
Description:
The specified field must contain a complete ModBus command coded as ASCII characters.
- The function code must be equal to 0F, 05, 01, 02 (character 3:2).
Purpose: Used for reading one bit in a register from a write multiple/single register command PDU.
Returns the value of the bit in the register if present in the PDU
Returns 1 if the register value is not present
Generates a compile-time error if bit no. is not within 0..15
Purpose: Used for reading a register from a read/write multiple/single register command PDU.
IF MREG(#2,0x9c42) < 0
// No register so break without result
BREAK
ENDIF
Gives the result Register : 4369 and trend 4369. ( 4369 = 0x1111).
Description:
The specified field must contain a complete ModBus command coded as ASCII HEX.
- The function code must be equal to 06, 10, 17, 03 or 04 (character 3:2).
Purpose: Used for reading a register from a write multiple/single register command PDU. The
MSREG function returns a signed value (twos compliment) while MREG return the binary value.
Returns the value from the register if present in the PDU
Returns 0 if the register value is not present or if the value is 0, use MREG to test for register
existence.
IF MREG(#2,0x9c42) < 0
// No register so break without result
BREAK
ENDIF
if last(#2,3) = F01
print last(#2,3)
trend last(#2,1)
stop
endif