................................................................................................................................... 134.1 Average velocity data and NMEA, Signature 55
................................................................................................................................... 154.2 Download telemetry file via FTP
................................................................................................................................... 174.3 Download telemetry file over serial port
................................................................................................................................... 194.5 Checking instrument state over Ethernet
Commands
................................................................................................................................... 215.1 List of Commands
Checksum Definition
Burst/Average Data Record Definition (DF3)
Bottom Track Data Record Definition (DF20)
................................................................................................................................... 676.2 String Data Record Definition
................................................................................................................................... 676.3 Data Limit Formats
................................................................................................................................... 827.5 ASCII Data Input Using Ethernet
The primary objective of this manual is to provide the information needed to control a Nortek
product that is based on the AD2CP hardware platform. This includes all instruments in the
Signature series. It is aimed at system integrators and engineers with interfacing experience, but
it also includes examples on how to configure and start the instrument for more unexperienced
integrators. The document's scope is limited to interfacing and does not address general
performance issues of the instrument. For a more thorough understanding of the principles, we
recommend the Principles of Operation and for information about how to operate the
instrument, we recommend the Operation Manual.
The document is complete in the sense that it describes all available commands and modes of
communication. For most users, it will make sense to let the supplied Nortek software do most of
the hardware configuration and then let the controller limit its task to starting/stopping data
collection.
As always, these types of documents are subject to change. We recommend that you check
http://www.nortek-as.com/en/support or contact Nortek to ensure you have the all the latest
information and versions of any software you plan to use.
Introduction5
If you have any comments or suggestions on the information given here, please let us know. Your
comments are always appreciated; our general e-mail address is inquiry@nortek.no.
The Nortek Signature Series products command interface are ASCII based and line oriented.
Before diving into the chapters covering interfaces and commands, the operational modes and
how to change between the modes are described. Understanding the use and constrains of the
modes is important as it is used frequently when communicating with the instrument.
2.1Modes
The current profiler operates in distinct modes. These modes will have several explicit commands
in order control the instrument. The majority of the commands are initiated from the Command
mode. The possible modes for the instrument are:
Command=Command and control
Data Retrieval=Data download from recorder
Measurement=Data collection mode
Confirmation=Confirmation mode
Initializing communication with the instrument is performed by sending a < BREAK >, which is
defined below. The <BREAK> will either set the instrument in Confirmation mode or restart
Command mode. The options for changing mode depends on the present mode of the instrument
(see diagram above for clarity). The timeout shown in the diagram occurs if no commands are
received in the various modes. A timer will then ensure that instrument operation continues. The
timeout value in Confirmation and Data Retrieval modes is 60 seconds. There is also a timeout in
K1W%!Q
K1W%!Q
@@@@@@
t1
t2
t3
Figure: Break timing
Symbol
Parameter
Min.
Typical
Max.
Unit
t1
Time from end of @-sequence to start of first K1W%!Q-
sequence.
100
150mst2
Time from end of @-sequence to start of second K1W%!
Q-sequence.
500
1000
2000
ms
t3
Time between first and second K1W%!Q-sequence.
300
400
ms
Figure: Power distribution relating to the two-processor design.
Command Mode when operating over the serial interface. If no commands are received for 5
minutes, a break or a sequence of @@@@@@ must be sent to wake up the processor.
2.2Break
<BREAK> over the serial RS232/RS422 interface is defined as:
@@@@@@ <delay 100 milliseconds> K1W%!Q <delay 300 milliseconds> K1W%!Q
The @@@@@@ are used to wake up the processor when it is in sleep mode since the instrument
will only be able to monitor activity on the serial line when it sleeps. The second sequence of the
actual break characters is there to ensure that a break is detected even when the instrument is
waking up due to some other cause (e.g. alarm from the real time clock). This ensures that the
processor will interpret the following command correctly.
The figure and the table below show the specified timing of the BREAK sequence:
Basic interface concept7
2.3Dual Processor
The AD2CP uses a two-processor (DSP) design; one dedicated to Doppler processing (BBP) and the
other to Interface (SEC). The primary interface is Ethernet, so the Interface processor is only powered
when external power is applied. Note that powering through the Ethernet cable will also power the rest of
In addition to the traditional serial port interface for real time data output there are several
options for communication over Ethernet. The Ethernet communication is handled by a dedicated
processor in the instrument. This network processor runs a Linux operating system, which makes
it possible to connect to the instrument via telnet, raw connections and FTP. The network
processor mainly provides Ethernet connectivity. The other processor in the instrument, called
the Doppler processor, is where the commands end up and where they are used to perform the
measurements as specified.
The concept of a telemetry file has also been introduced which can be utilized in several ways
depending on the chosen interface. Below are some details:
3.1Command interface
The command interface makes it possible to communicate with a Signature instrument using
terminal software, the serial port and a set of commands. The interface is also available over
Telnet. Some highlights:
ASCII based and line oriented. Commands are terminated with CR/LF
Optional capsulation of commands using NMEA style prefix and checksum to ensure data
integrity
NMEA style commands will return argument names in their response
Argument limits can be retrieved through commands
Comprehensive validation and error handling is implemented.
Invalid configurations return the erroneous argument with limits directly, so that each
subsequent error can be handled until a valid configuration is achieved
A single command can be used to retrieve the complete configuration of the instrument with
optional output to file
Commands to set default parameters
External controllers can use commands to store data in the raw data file (e.g. GPS position)
3.2Telemetry
Our use of the telemetry term implies a "subset transfer system", that is, storing a subset of data
for transfer over low-bandwidth links (for example over iridium links, acoustic modems, etc). The
telemetry file is typically used in cases where the integrator either does not have the processing
power or bandwidth (if only a low data rate serial port is available) to do the processing
themselves.
For online data transmission a versatile scheme for telemetry options is available. The telemetry
file can be read out over the serial interface either in chunks or as a complete file while checksum
or CRC on the downloaded data can be applied in a configurable manner. This enables external
controllers to configure separate handling of all, or a subset, of the measured data. That means
the file can be output directly as they are ready, or the data can be stored to a telemetry file for
later retrieval. The data format can be selected from a number of formats, including both binary
and ASCII data formats.
Since the instruments store individual ping data to file, the telemetry option can also be used to
average velocity data within the instrument. This averaged data can be immediately output via
serial line or stored for later retrieval in telemetry files. System integrators are able to
regularly offload subsets of data using FTP and telemetry files can be deleted after
download.
Since the telemetry file can be retrieved also in data retrieval mode, the instrument will continue
measuring after a timeout delay if the data transfer was interrupted. Erasing the telemetry file
after data retrieval will ensure that no data is lost if the transfer is interrupted.
The raw data, by design, is not supposed to be deleted from the disk. The raw data is collected
and saved continuously throughout the deployment and the configuration is supposed to be set
up in such a way that there is sufficient disk space to last for the whole deployment period (that is
one of the factors that the deployment software takes into account). The raw data is then taken
off the disk after the deployment and post-processed as required.
To FTP
The telemetry option implemented in the Doppler processor enables system integrators to
regularly offload subsets of the data by using FTP. When the network processor receives an
incoming FTP request, it will interrupt the Doppler processor by entering data retrieval mode and
mount the file system of the recorder. The data files on the recorder can then be accessed over
FTP. The telemetry file can be deleted after it has been downloaded, which is particularly
suitable for event driven data downloads. If the instrument was started with the DEPLOY
command, it will resynchronize to its measurement time base after the FTP session has ended.
For an example on how to configure the instrument to output a telemetry file and download the
file to FTP, check out this section.
3.3Ethernet Operation
The AD2CP uses TCP (transmission control protocol) for both command processing and data
transmission. The Internet Protocol uses a combination of the IP address and port to uniquely
identify a communications channel between two computers. For the AD2CP, different ports
represent different means of communicating with the instrument. TCP ports 9001, 2002, 9004 are
assigned for the following uses:
Port 9000 is a telnet-protocol ASCII interface (require username / password authentication)
port 9001 is a raw (binary) interface (requires username / password authentication)
port 9002 is a data only channel (no input accepted)
port 9004 is an ASCII data only channel (no input accepted).
The password entry is ignored if password authentication, as shown in the web page
configuration, is disabled (so any input, including an empty password, is accepted). The
command and data record formats for the interfaces are the same as for the serial port.
Commands available in measurement mode should be preceded by the command BBPWAKEUP.
This ensures that the BBP is ready to process the command when it is received (see Checking
instrument state over Ethernet). In measurement mode, another BBPWAKEUP must be sent when
more than 2 seconds has elapsed since the previous command.
If uncertain of the active mode it is good practice to send BBPWAKEUP before sending GETSTATE
or INQ.
3.3.1Telnet Connection
The telnet interface (TCP/IP port 9000) is used for user interaction with the instrument. This
dedicated port can be used for entering commands and getting human readable responses
(ASCII). The supported command set is available in the Commands section. The Windows telnet
client can be used to connect into the instrument using the command line telnet ip_address 9000.
You will get prompted for a username (nortek) and password (hit Enter if password protection
hasn’t been enabled via the Web interface).
The interface is very similar to the direct serial interface over RS232/RS422 but some additions are
made to simplify the interfacing. Most notable is the ability to send a <break> to the Doppler
processor just by using Ctrl-C (ASCII 0x03). The internal application takes care of waking up the
Doppler DSP and timing the delivery of the break string.
The telnet server is not configured to echo characters, so users wishing to see and/or edit
commands before sending them to the instrument should enable local echo and local line
editing. If those features are desired, a telnet client capable of supporting local echo and local
line editing must be used (e.g. PuTTY).
Port 9000 is dedicated for ASCII only communication whereas the ports described in the next
section provide the complete set of data, including binary output of the measurements. A telnet
client should
not
be used to access these ports. Read more about this in the next section.
To terminate the telnet connection, enter Ctrl-X (ASCII 0x18).
A port can be understood as a address point between two communicating parts. When first
connecting to a data listening port, the string "\r\nNortek
replaced by the instrument host name) is sent to identify the instrument that has responded to
the connection request. TCP ports 9001, 9002 and 9004 are assigned for the following uses:
Port 9001 is used for machine driven control. This port requires username/password. The serial
port data is translated directly into TCP/ IP over Ethernet. Binary data generated in
measurement mode is visible on this port. Standard streaming record delineation techniques
must be used in order to make sure that the received data is properly synchronized for
decoding. A break can be sent by sending the string K1W%!Q<CR><LF> to the instrument or a
Ctrl-C character (ASCII 0x03) (Ctrl-C has to be sent on its own and
command). The internal application takes care of the appropriate timing of the break sent over
the internal serial port. This port require username / password authentication. Refer to
previous section for example. The password entry is ignored if password authentication, as
shown in the web page configuration, is disabled (so any input, including an empty password, is
accepted). The command and data record formats for the interfaces are the same as for the
serial port.
na me
Data Interface\r\n" (
not
embedded in any
Interfaces11
na me
is
Port 9002 is a data only channel which will output all data that is configured for serial output.
This can, for example, be used by display only software while configuration is done by another
application.
Port 9004 outputs ASCII data (no binary) that is configured for serial output.
A telnet client should
protocol which is neither interpreted nor sent via the raw connection. Using a telnet client on
these ports will result in extraneous characters being sent and certain binary characters being
interpreted by the client.
3.3.3FTP
The internal data recorder is accessed over Ethernet using a standard FTP (File Transfer Protocol)
client. Together with the various telemetry options, the FTP data download serves as a simple
way to download measured data at regular intervals if true real time operation is not required.
Only the telemetry file can be deleted using FTP.
When an FTP connection is active, the internal state of the machine is changed so that commands
are no longer processed (and an error is returned when commands are entered). Terminating the
FTP connection or sending a BREAK followed by the CO command will switch the instrument back
to the mode it was in before the FTP session began. If a break command is sent while an FTP
transaction is in progress, the FTP connection will be forcibly terminated.
not
be used to access these ports. Telnet incorporates its own binary
If an FTP connection is done when the instrument is in measurement mode (see Figure 1), the FTP
connection is made through data retrieval mode. When the FTP connection is terminated, the
instrument will then return to measurement mode. If there is no data transferred or FTP
commands sent for 120 seconds, the FTP connection will terminate and the instrument will return
to measurement mode.
For an example on how to configure the instrument to output a telemetry file and download the
file to FTP, check out the next section.
3.3.4HTTP
HTTP (Hypertext transfer protocol) can also be used for data transmission. For organizations with
strong security / firewall restrictions, FTP access to the instrument may not be permitted. For that
reason, a web page allowing individual data files to be downloaded has been implemented in the
Ethernet processor. The web page can be accessed by clicking on the “Data Download (HTTP)” link
from the main web page.
3.3.5UDP
UDP (user datagram protocol) can also be used for data transmission. When using UDP, the data
collection software simply waits for data to be sent from the instrument without having to
establish a connection first. This may be useful for cases in which instrument power is
intermittently interrupted and re-connecting to the instrument is not desirable. One downside
to UDP communications is that transmission of the data is not guaranteed. On a noisy / errorprone connection, it is possible that the occasional datagram may be dropped. If every data
record must be received, then TCP is recommended.
In order to use UDP in a power-safe configuration, the IP address of the data collection software
and port must first be configured using the web interface. The IP address identifies the client to
which the data is to be sent and the port may be used to uniquely identify the instrument to the
application. The same port may be used for all instruments if the data collection software
examines the IP address of the received datagram to identify the instrument. Once this
information has been configured, the Ethernet processor will automatically send real-time data
records to the configured address / port. An instrument in measurement mode re-enters
measurement mode shortly after a power-cycle, so the data collection software will immediately
receive new data without having to re-establish a connection.
3.3.6PTP
Precision Time Protocol (IEEE-1588) is a standard used for distributing a high-resolution absolute
time throughout an Ethernet network. The Signature series instrument can be configured to act
as a slave to an existing PTP master clock (customer supplied) located in the same Ethernet LAN.
The instrument contains a high-resolution clock which is synchronized and conditioned using PTP
when enabled. The timestamps contained within the data records are then generated from this
clock. When synchronized, these timestamps are typically aligned to within ~10 microseconds.
The PTP master clock must use UDP (layer three) and be configured for two-step operation with
an end-to-end delay mode in order to be compatible with the Signature series PTP
implementation. Using PTP does not affect the choice of UDP or TCP for the transport of data.
Note that the Nortek Signature Series products command interface are ASCII based and line
oriented (commands terminated with CR/LF). All commands should be set explicitly. The .deploy
file created by the Deployment software is command-based and can be read directly into the
command interface. Entering the .deploy file into the command interface can be a good starting
point before modifying certain parameters using individual commands. Alternatively, use the
Deployment software's "Customize..." function to create a .deploy file and input commands in
the #CustomCommands section.
Comprehensive validation and error handling is implemented. The setup is verified when
sending the SAVE command. If there is anything wrong with the deployment plan, i.e. some of
the parameters are entered with values outside their specific range, an ERROR will be returned.
The GETERROR command will describe why. If SAVE is not used, the deployment plan will be
validated when sending the START or DEPLOY command. Note the difference between DEPLOY
and START, the latter will immediately start a measurement any time the instrument state returns
to Measurement mode such as by applying power or timeout from Data Retrieval Mode. If DEPLOY
is used, be aware that if the deployment time has passed when the battery is connected, the
instrument will resynchronize its data sampling according to the deployment time and the
instrument configuration. This means you may have to wait for one average measurement
interval or one burst measurement interval before the instrument starts to ping.
Interfaces13
Invalid configurations return the ERROR with limits directly, so that each subsequent error can be
handled until a valid configuration is achieved. Argument limits can be retrieved through
commands. For example, if entering SETPLAN,MIAVG=5000, you will receive an OK. But when
saving or deploying, you will receive an ERROR. When using GETERROR: 134,"Invalid setting: Plan
Profile Interval","GETPLANLIM,MIAVG=([1;3600])" OK. The measurement interval must be within
1:3600 seconds. The valid range for the various arguments can also be verified by using the
GETPLANLIM and GETAVGLIM commands.
Below you will find four examples illustrating the format and how to use the telemetry file.
4.1Average velocity data and NMEA, Signature 55
Either use the Deployment wizard to create a .deploy file which can be uploaded via the Terminal
Emulator, or set the configuration through commands (seen below). The .deploy file can also be
uploaded then customized via commands once in the Terminal Emulator.
In this example: Signature55, configured to alternate between fine and coarse current profiles
(3:1). In this case the user wanted to download the averaged fine profile upon request.
Configuration example:
%Recommended starting point for configuration file
"Invalid setting: Avg Average Interval too low for the configured
number of pings and profiling distance",LIM="GETAVG1LIM,AI=
([360;1800])"
OK
%Number of pings too high compared to desired averaging interval
with multiplex enabled.
SETAVG1,NPING=30
OK
SAVE,ALL
OK
Note that SETTMAVG,AVG must equal the AI set by SETAVG,AI. To set telemetry averaging for the
alternate plan use SETTMAVG1, note that these will be recorded to the same telemetryfile.bin
file.
Enter START or DEPLOY,TIME to begin the deployment.
In this example, a Signature1000 is set up to measure currents for 2 minutes every 10 minutes and
waves every hour (4096 samples at 4 Hz). The raw current data are processed and a subset is saved
as a telemetry file and made available on FTP.
Configuration example:
%Recommended starting point for configuration file
After downloading the telemetry file, erase it either via FTP or commands. Only the telemetry
file can be deleted using FTP.
%Erasing telemetry file
ERASETM,9999
OK
%Continuing the configured deployment plan
CO
OK
Note that the instrument does not process wave data internally (read more about this in the
Operation Manual, if interested) thus only current data will be output in the telemetry file.
For use with external controller it can be interesting to note the following: If the instrument is
started at e.g. 12:00, the first current profile is finished at 12:02 (120 seconds) and the next starts
about 12:10. That leaves us with 8 minutes to download the telemetry file to FTP before next
current profile starts. The clock drifts with about 1 sec/week. Since DEPLOY was used the
measurement intervals will resynchronize according to the deployment time and the instrument
configuration (see DEPLOY for more information), thus is should be easier to schedule automatic
data download as the window 12:02 to 12:10 remains.
In this example the user wishes to download the telemetry file in 4096 byte chunks.
Connect via Terminal Emulator while the instrument is measuring
Send Break
CONFIRM
OK
%Going into Data Retrieval Mode
RM
NORTEK AS.
Version 2176 (Sep 17 2015 18:58:53)
DATA RETRIEVAL MODE
OK
%Checking the size of the telemetry file. Return in bytes
TMSTAT
95558
OK
%Outputting the telemetry file over serial port in 4096 byte chunks
DOWNLOADTM,0,4096,CKS=1
OUTPUT...
OK
%Next 4096 byte chunk, etc
DOWNLOADTM,4097,4096,CKS=1
OUTPUT...
OK
%Erasing telemetry file
ERASETM,9999
OK
%Continuing the configured deployment plan
CO
OK
User Cases17
Copy the returned text and paste to file. Or check "Record to file", the file will appear by default
in: C:\Users\xxxx\Documents\Nortek\Deployment\Online
Parameters can be added to the DOWNLOADTM command to set start address, length of file, etc
(see section DOWNLOADTM)
In this example a user connects to and powers the Ethernet port, but is unsure of the current
operational state. If power is applied while in measurement mode, it will continue the
measurement but not wake the Ethernet processor (BBP). If power is applied while in
deployment state a re-synch will occur and resume sleep mode. Hence it is necessary to use
BBPWAKEUP in both cases.
A typical sequence starts by wanting to know the state of the instrument before proceeding with
either a new measurement or data retrieval.
%Waking up the BBP to make sure commands are received
BBPWAKEUP
OK
%Inquiring the state the of the instrument
GETSTATE
GETSTATE,MODE=0010,DEPTIME=27521,MEASTIME=27521,CURRTIME="2015-0928 11:21:16",WAKEUP=2
OK
This indicates the instrument has been configured to deploy and has started its scheduled
deployment for 27521 seconds. See GETSTATE for more information.
User Cases19
Depending on the desired action, send Break usually followed by; either MC to enter command
mode, RM for data retrieval or START/DEPLOY/CO to start/schedule/continue a deployment.
Valid Range: The valid range for the following commands are not listed because some of them
depend on the actual instrument in use. However, the minimum and maximum values can be
retrieved through the appropriate GETxxxxLIM command.
Example: send GETAVGLIM,CS to read the valid range of cell sizes.
Default values are not listed for all commands in this document as some of them depend on the
actual instrument in use. Default parameters can be retrieved be setting default configuration
(SETDEFAULT,ALL) and reading out the desired parameter through the appropriate GET command.
The same is the case for some of the minimum and maximum values that depend on the actual
instrument in use. The parameter range for the various arguments can be retrieved through the
appropriate GETxxxLIM command, e.g. GETAVGLIM,CS to read the valid range of cell sizes.
All command parameters should be set explicitly, e.g.
SETAVG,NC=10,BD=0.7
OK
A configuration of the instrument should always start with setting the default configuration, e.g.
Unused (Not yet implemented)
(Absolute max Vertical velocity (cm/s))
SA
Salinity (ppt)
BURST
Burst measurement disabled/enabled
MIBURST
Burst Interval (s)
DIBURST
Depth interval (m)
SV
Sound velocity (m/s)
FN
Filename of the raw data file where all the measured binary data will be stored
SO
Serial output
FREQ
Transmit frequency
NSTT
Number of Time Slots. Set to 0 giving the default number of slots.
The plan parameters specify directly (time) or indirectly (depth) which type(s) of measurement
that will be measured and at the interval between the various types of measurements.
Commands25
The valid range for the various arguments should be verified using the GETPLANLIM command,
also for the values listed here as they may change with firmware versions and instrument
frequencies.
Data Format
0 – AD2CP format 1.
1 –Legacy Aquapro format
2 - AD2CP format 2
3 - AD2CP format 3
NPING
Number of pings
NB
Number of beams
(Select number of beams, 0 select beams according the PLAN,VD setting)
CH
Beam selection
(Select beams, 0 select beams according the PLAN,VD setting. Example: 134
select the three beams 1, 3 and 4)
MUX
Multiplexor Selection
0 - 1,
0, ping all beams in parallel
1, ping beams in sequence
BW
Bandwidth selection. (“NARROW”, “BROAD”)
ALTI
Enable altimeter in AVG measurements
BT
Enable bottom track measurement in AVG sampling
ICE
Enabled ice velocity measurement in AVG sampling
ALTISTART
Altimeter start of measurement distance [m]
ALTIEND
Altimeter end of measurement distance [m]
RAWALTI
Storage of Raw Altimeter data
5.6SETAVG/GETAVG/GETAVGLIM
Set/get averaging mode settings and get the relevant limits.
The actual valid range for the various parameters for the firmware version is used can be found by
using the GETAVGLIM command. This command has the same arguments as the SETAVG/GETAVG
commands shown in the list above. The output format for limits is described in Data Limit Formats
Enable Storage of Raw Altimeter data. Raw data are store for first and last ping
in each ensemble.
ALTISTART
Altimeter start of measurement distance [m]
ALTIEND
Altimeter end of measurement distance [m]
HR
Enable HR on Slanted beams
HR5
Enable HR on Vertical Beam
Set/get burst profile settings and get the relevant limits
Commands27
The actual valid range for the various parameters for the firmware version is used can be found by
using the GETBURSTLIM command. This command has the same arguments as the SETBURST/GETBURST commands shown in the list above. The output format for limits is described in Data
Enable or disable the alternate configuration mode
PLAN
Primary configuration run time (s)
IDLE
Primary configuration idle time (s)
PLAN1
Alternate configuration run time (s)
IDLE1
Alternate configuration idle time (s)
Set/get bottom track settings and get the relevant limits
5.11SETALTERNATE/GETALTERNATE/GETALTERNATELIM
The SETALTERNATE/GETALTERNATE command allows two different configurations to be run
consecutively in time. The primary configuration (defined by SETPLAN, SETBURST, SETAVG,
SETTMAVG, SETBT) is run for “PLAN” seconds, after which the unit powers down for a given period
of time (“IDLE” seconds). The alternate configuration (defined by SETPLAN1, SETBURST1,
SETAVG1, SETTMAVG1, SETBT1) is then run for “PLAN1” seconds and the unit powers down for
“IDLE1” seconds. The configuration is then switched back to the primary and the process is
repeated.
Commands29
The valid range for the various arguments should be verified using the GETALTERNATELIM
command. The values listed here may change with firmware versions and instrument
frequencies.
The actual valid range for the various parameters for the firmware version is used can be found by using
the GETAVGLIM command. This command has the same arguments as the SETAVG/GETAVG
commands shown in the list above. The output format for limits is described in Data Limit Formats.
Returns the amount of memory that will be stored on the recorder for the burst and average data
as well as the combined plan value. Alternate mode values is also supported
5.13SETTRIG/GETTRIG/GETTRIGLIM
Sets / gets the parameters and limits for Trigger. The available trigger types will depend on the
harness/cable used with the instrument.
When triggered the instrument will perform a complete ping (Tx and Rx) before it goes back to
monitoring the trigger. Any triggers asserted during an ongoing ping will be ignored. There are no
specific requirements for pulse length. The unit triggers on the edge(s) of the trigger signal and
can be triggered on rising, falling or both edges.
Note: TRIGOUTPUT=1 enables master trig output, RS485EDGE trigger must be used with this
option. This enables several instruments to be synchronized together through RS485 with one of
the instruments acting as master. Only continuous measurement configurations are supported in
this mode.
5.13.1 TRIG
Command used for trigging measurement when Trigger is enabled and trigger type equals
“COMMAND”.
AD2CP offers four main types of triggers: Internal Sampling, TTL trigger, RS-485 trigger and trig on
command.
Internal Sampling (INTSR)
Internal triggers determined by the selected sampling rate.
TTL Trigger
The AD2CP can trig on either Rising Edge, Falling Edge or Both Edges of a TTL Signal. When triggered
the instrument will perform a complete ping (Tx and Rx) before it goes back to monitoring the trigger.
Any triggers asserted during an ongoing ping will be ignored. The requirements for the TTL input is Vlow
<0.7V and Vhigh>2.5V. The TTL input tolerate voltages between 0-5.5 V. The pulse length should be
minimum 1 ms.
Commands31
RS-485 Trigger
A RS-485 signal can be used to trig the AD2CP, either Rising Edge, Falling Edge or Both Edges of a
RS-485 Signal. The following figure shows the polarities of the differential RS-485 signal pair for the
trigger types. When triggered the instrument will perform a complete ping (Tx and Rx) before it goes
back to monitoring the trigger. Any triggers asserted during an ongoing ping will be ignored. The pulse
length should be minimum 1 ms.
Trig on Command
When the TRIG parameter of the SETTRIG command is set to “COMMAND” the AD2CP is trigged by
sending a “TRIG[CrLf]” command. The trigger time will be when the end of the [CrLf] is received.
Precision in the horizontal range in average mode [cm/s]
BURSTHORZ
Precision in the horizontal range in burst mode [cm/s]
BEAM5
Precision in the vertical range in burst mode [cm/s]
AVGBEAM
Precision along beam in average mode [cm/s]
BURSTBEAM
Precision along beam in average mode [cm/s]
Argument
Description
AVGHORZ
Precision in the horizontal range in average1 mode [cm/s]
BURSTHORZ
Precision in the horizontal range in burst1 mode [cm/s]
BEAM5
Precision in the vertical range in burst1 mode [cm/s]
AVGBEAM
Precision along beam in average1 mode [cm/s]
BURSTBEAM
Precision along beam in average1 mode [cm/s]
5.14GETPWR
Returns the power consumption in milliWatts for the various measurements enabled as well as
the overall value. The plan values include the sleep mode power consumption in addition to the
sum of average and burst mode values. The reported values are adjusted according to the input
voltage to the system when the command is executed.
5.15GETPRECISION
Returns the precision in the horizontal range and along the beam in cm/s for the various
measurement modes.
5.16GETPRECISION1
Returns the precision in the horizontal range and along the beam in cm/s for the various
measurement modes during alternate mode settings.
Deploy the instrument. Start the measurement at the time specified in the string argument. The
format must be exactly as shown. If no time value is passed, the deployment will start
immediately.
The number of seconds to the specified deployment time is returned.
Note the difference between DEPLOY and START, the latter will immediately start a measurement
any time the instrument state returns to Measurement mode such as by applying power or
timeout from Data Retrieval Mode. If DEPLOY is used, be aware that if the deployment time has
passed when the battery is connected, the instrument will resynchronize its data sampling
according to the deployment time and the instrument configuration. This means you may have to
wait for one average measurement interval or one burst measurement interval before the
instrument starts to ping.
Commands35
Example:
DEPLOY,TIME="2014-11-12 14:40:00"
592
OK
5.23FWRITE
Write tag/String to file.
Note: Fwrite STR and B64STR cannot be set together.
Start address (offset) of the first byte to be returned.
LEN
Number of bytes to be downloaded.
CRC
Use Cyclic redundancy check.
CRC=1 enables crc.
CKS
Use Checksum.
CKS=1 enables checksum.
This command enables reading a file at the instrument recorder.
If no other parameters than the file name are sent with the DOWNLOAD command the complete
file is directly returned, without the number of bytes to follow. The end of the file can then be
detected by parsing the OK<CR><LF>.
The parameters can be used to download the file in several pieces. The number of bytes to follow
will then be returned in ASCII format and terminated with <CR><LF> before the data is output.
The end of file stream is terminated with OK<CR><LF>. A cyclic redundancy check or a checksum
will then be added to be able to verify data integrity during download. The complete file can also
be downloaded in this way by specifying SA=0 and a large value for LEN. The actual file size is then
returned before the data follows.
The INQ command inquires the instrument state. Note that when operating over RS232 or RS422
serial lines, it should be preceded with @@@@@@ <delay 400 ms> and a flush of the input
buffer in case the instrument is in power down or in a low power mode taking measurements.
Consult this section a description of the Instrument modes.
GETERROR retrieves a full description of the last error condition to occur. The error number is
returned first followed by a string with the text description of the last error condition. A second
string is also returned which contains information on the valid range of the failing argument, see
example below.
Example:
SETAVG,CS=2.5
OK
SAVE,ALL
ERROR
GETERROR
40,"Invalid setting: Avg Cell Size","GETAVGLIM,CS=([0.20;2.00])"
OK
5.33GETALL
GETALL retrieves all relevant configuration information for the instrument. This information can
either be displayed on the command line or saved to a data file. For the SignatureWaves software
to read a valid .ad2cp file it must contain both the Header and Data Record. The Header
information can be obtained by using the command GETALL.
Set/get averaging mode telemetry settings and get the relevant argument limits.
Commands43
The actual valid range for the various parameters for the firmware version is used can be found by
using the GETTMAVGLIM command. This command has the same arguments as the SETTMAVG/GETTMAVG commands shown in the list above. The output format for limits is described in Data
Number of burst samples to save
0 – Save all burst samples
1 – BURST.NS
SO
Enable Serial Output
FO
Enable File Output
DF
Data Format
ENAVG
Enable averaging
CY
Coordinate system in data output
MAPBINS
Vertical bin mapping
Argument
Description
EN
Enable/disable altimeter telemetry
TS
Include time stamp
TQ
Include quality parameter
FO
File output
SO
Serial output
DF
Altimeter Telemetry format.
200 – NMEA (PNORA) format without Tags.
201 – NMEA (PNORA) format with Tags.
5.38SETTMBURST/GETTMBURST/GETTMBURSTLIM
The actual valid range for the various parameters for the firmware version is used can be found by
using the GETTMBURSTLIM command. This command has the same arguments as the
SETTMBURST/GETTMBURST commands shown in the list above. The output format for limits is
described in Data Limit Formats.
5.39SETTMALTI/GETTMALTI/GETTMALTILIM
Sets / gets the parameters and limits for altimeter.
Bottom track Telemetry format.
300 – NMEA without tags.
301 – NMEA with tags.
302 – NMEA without tags and Sensor Data.
303 – NMEA with tags and Sensor Data.
NPING
Number of Pings
FOMTH
Figure of Merit threshold.
CY
Coordinate system
Sets / gets the parameters and limits for bottom track telemetry.
Commands45
Example:
SETTMBT,1,1,1,301
GETTMBT
GETTMBTLIM
5.41TMSTAT
This command returns the length (# of bytes) of the telemetry file.
Start address (offset) of the first byte to be returned.
LEN
Number of bytes to be downloaded.
(Length of file)
CRC
Use Cyclic redundancy check.
CRC=1 enables CRC.
CRC cannot be enabled when CKS=1
CKS
Use Checksum.
CKS=1 enables checksum.
CKS cannot be enabled when CRC=1
Argument
Description
CODE
Code should be 9999
5.42DOWNLOADTM
This command enables reading the telemetry file which can be created during measurement by
using the appropriate SETTMxxx commands. The formats are described in the section detailing
Data Formats.
If no parameters are sent with the DOWNLOADTM command the complete file is directly
returned, without the number of bytes to follow. The end of the file can then be detected by
parsing the OK<CR><LF>.
The parameters can be used to download the telemetry file in several pieces. The number of
bytes to follow will then be returned in ASCII format and terminated with <CR><LF> before the
data is output. The end of telemetry stream is terminated with OK<CR><LF>. A cyclic redundancy
check or a checksum will then be added to be able to verify data integrity during download. The
complete file can also be downloaded in this way by specifying SA=0 and a large value for LEN.
The actual file size is then returned before the data follows. See also TMSTAT for retrieving file
information.
Example:
DOWNLOADTM,0,4096,CRC=1,CKS=0<CR><LF>
4096<CR><LF>
<binary or ASCII data>
23432<CR><LF> (checksum/crc value)
OK<CR><LF>
5.43STOREHEADERTM
This command stores the GETALL (complete configuration) to the telemetry file.
5.44ERASETM
Erase the telemetry file. The telemetry file can also be erased over FTP.
Write a Tag to output file and data output.
The TAG command adds a tag to the both the output file and the output data, if enabled. The output is a
String Record as defined in the FWRITE command. The ID of the String Record Data packet is 19
0x15 – Burst Data Record.
0x16 – Average Data Record.
0x17 – Bottom Track Data Record.
0x18 – Interleaved Burst Data Record (beam 5).
0x1A - Burst Altimeter Raw Record.
0x1B - DVL Bottom Track Record.
0x1C - Echo Sounder Record.
0x1D - DVL Water Track Record.
0x1E - Altimeter Record.
0x1F - Avg Altimeter Raw Record.
0xA0 - String Data Record, eg. GPS NMEA data, comment
from the FWRITE command.
Family
8 bits
Defines the Instrument Family.
0x10 – AD2CP Family
Data Size
16 bits
(unsigned)
Size (number of bytes) of the following Data Record.
Data Checksum
16 bits
Checksum of the following Data Record.
Header Checksum
16 bits
Checksum of all fields of the Header (excepts the Header
Checksum itself).
6Data formats
Note: All data of the AD2CP interface are stored/sent as Little Endian. Each output data packet
sent/stored by the AD2CP consists of a Header part and a Data Record part:
For the SignatureWaves software to read a valid .ad2cp file it must contain both the Header and Data
Record. The Header information can be obtained by using the command GETALL.
The following chapters describe the format of the Header and the different variants of the Data Record.
unsigned char family;
unsigned short dataSize;
unsigned short dataChecksum;
unsigned short hdrChecksum;
} CommandHeader_t;
6.1.1Checksum Definition
The Checksum is defined as a 16-bits unsigned sum of the data (16 bits). The sum shall be
initialized to the value of 0xB58C before the checksum is calculated.
C-code for Checksum calculations:
Data formats49
unsigned short calculateChecksum(unsigned short *pData, unsigned
short size)
{
unsigned short checksum = 0xB58C;
unsigned short nbshorts = (size >> 1);
int i;
for (i = 0; i < nbshorts; i++)
{
checksum += *pData;
size -= 2;
pData++;
}
if (size > 0)
{
checksum += ((unsigned short)(*pData)) << 8;
}
return checksum;
}
unsigned long pressure;
unsigned short heading;
short pitch;
short roll;
union {
unsigned short beams_cy_cells; ///< bit 15-12: Number of
beams,
///< bit 11-10: coordinate
system,
///< bit 9-0: Number of cells.
unsigned short echo_cells; ///< OR, Number of echo
sounder cells.
};
unsigned short cellSize;
unsigned short blanking;
unsigned char nominalCorrelation;
unsigned char pressTemp;
unsigned short battery;
short magnHxHyHz[3]; ///< Magnetometer Min data
short accl3D[3]; ///< Accelrometer Data
union {
unsigned short ambVelocity;
unsigned short echoFrequency;
};
t_DataSetDescription4Bit DataSetDescription4bit; /* unsigned
short */
unsigned short transmitEnergy;
char velocityScaling;
char powerlevel;
short magnTemperature;
short rtcTemperature;
unsigned short error;
t_status0 status0; /* Unsigned short */
t_status status; /* Unsigned long */
unsigned long ensembleCounter;
unsigned char data[SIZE_VAR_DATA];
///< actual size of the following =
unsigned short pressure : 1; // 0
unsigned short temp : 1; // 1
unsigned short compass : 1; // 2
unsigned short tilt : 1; // 3
unsigned short _empty : 1; // 4
unsigned short velIncluded : 1; // 5
unsigned short _unused1 : 1; // 6
unsigned short _unused2 : 1; // 7
unsigned short distIncluded : 1; // 8
unsigned short fomIncluded : 1; // 9
unsigned short _unused3 : 6;
} headconfig;
unsigned long serialNumber;
unsigned char year;
unsigned char month;
unsigned char day;
unsigned char hour;
unsigned char minute;
unsigned char seconds;
unsigned short microSeconds100;
unsigned short soundSpeed; ///< resolution: 0.1 m/s
short temperature; ///< resolution: 0.01 degre
Celsius
unsigned long pressure;
unsigned short heading;
short pitch;
short roll;
unsigned short beams_cy; ///< bit 15-12: Number of beams,
bit 11-10: coordinate system
unsigned short cellSize;
unsigned short blanking;
unsigned short velocityRange;
unsigned short battery;
short magnHxHyHz[3]; ///< Magnetometer Data
short accl3D[3]; ///< Accelerometer Data
unsigned int ambVelocity;
t_BottomTrackDataSetDescription4Bit DataSetDescription4bit; /*
unsigned short */
unsigned short transmitEnergy;
char velocityScaling;
char powerlevel;
short magnTemperature;
short rtcTemperature;
unsigned long error;
t_BottomTrackstatus status; /* Unsigned long */
The STR parameter of the FWRITE command. The string is
zero terminated.
The String Data Record is written to the SD memory card using the FWRITE command. The string data
record is also used to store the instrument configuration. The ID parameter is then set to 16 (0x10).
6.3Data Limit Formats
The limits for the various arguments are returned as a list of valid values, and/or ranges, enclosed
in parenthesis (). An empty list, (), is used for arguments that are unused/not yet implemented.
Square brackets [] signify a range of valid values that includes the listed values. String arguments
are encapsulated with “”, like for normal parameter handling. A semicolon, ;, is used as separator
between limits and values.
The argument format can also be inferred from the limits, integer values are shown without a
decimal point, floating point values are shown with a decimal point and strings are either shown
with the string specifier, “”, or as a range of characters using ‘’ for specifying a character.
Data formats67
Examples:
[1;128] – Integer value, valid from 1 to 128
([1300.00;1700.00];0.0) – Floating point value, valid values are 0.0 and the range from 1300.00 to
1700.00.
(['0';'9'];['a';'z'];['A';'Z'];'.') – String argument with valid characters being . and the character ranges
a-z, A-Z, 0-9 .
("BEAM") – String argument with BEAM being the only valid string.
(0;1) – Integer value with two valid values, 0 and 1.
Data with variants of -9 (-9.00, -999…) are invalid data.
Empty files are fields not used.
The checksum calculation is part of the NMEA standard. It is the representation of two hexadecimal
characters of an XOR if all characters in the sentence between – but not including – the $ and the *
character.
/* Sample code showing how to connect to and receive data from the Nortek Signature series
* of instruments using the ASCII only data port.
* Compiles on both Windows (requires ws2_32 library) and Linux.
*/
#ifdef __WIN32__
WSADATA version;
WORD mkword = MAKEWORD(2, 2);
int what = WSAStartup(mkword, &version);
if (what != 0) {
printf("Version not supported\n\n");
exit(-1);
}
/* Connect socket using name specified name / IP address. */
server.sin_family = AF_INET;
hp = gethostbyname(ip_address);if (hp == 0) {
printf("Invalid host name\n\n");
exit(-1);
}
memcpy(&server.sin_addr, hp->h_addr, hp->h_length);
server.sin_port = htons((unsignedshort) ASCII_DATA_PORT);
/* 30 second receive timeout. The actual timeout to use will depend
* upon the instrument configuration and other considerations.
*/
#ifdef __WIN32__
/* On windows, the timeout is number of ms. */
int ts = 30000;
#else
/* Other OSes use timeval structure. */
struct timeval ts;
ts.tv_sec = 30;
ts.tv_usec = 0;
#endif
if (setsockopt(socket_fd, SOL_SOCKET, SO_RCVTIMEO, (void *) &ts, sizeof(ts))
< 0) {
printf("Could not set receive timeout\n\n");
exit(-1);
}
/* Connect to the instrument... */
if (connect(socket_fd, (struct sockaddr *) &server, sizeof(server)) < 0) {printf("Could not connect to host %s\n\n", ip_address);
exit(-1);
}
int length = 0;
while (1) {
char c;
int r;
#ifdef __WIN32__
if ((r = recv(socket_fd, &c, 1, 0)) <= 0) {
if (r == 0) {
/* Instrument terminated socket for some reason. Re-connect required. */
printf("Instrument terminated socket.\n\n");
} else {
if (WSAGetLastError() == WSAETIMEDOUT) {
/* No data received within timeout period. Could either loop or
* re-open / check connection at this point.
*/
printf("Socket read timed out\n\n");
} else {
/* Local socket error. Re-connect required. */
wchar_t *s = NULL;
FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM
| FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, WSAGetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR) &s, 0, NULL);
printf("Socket read failed %S\n\n", s);
LocalFree(s);
}
}
break;
}
#else
if ((r = read(socket_fd, &c, 1)) <= 0) {
if (r == 0) {
/* Instrument terminated socket for some reason. Re-connect required. */
printf("Server terminated socket\n\n");
} else {if (errno == EAGAIN) {
/* No data received within timeout period. Could either loop or
* re-open / check connection at this point.
*/
printf("Socket read timed out\n\n");
} else {
/* Local socket error. Re-connect required. */
printf("Socket read failed (%d) %s\n\n", errno, strerror(errno));
}
}
break;
}
#endif
dataBuffer[length++] = c;
if (length >= sizeof(dataBuffer)) {
printf("Truncating data input...\n\n");
length = sizeof(dataBuffer) - 1;
}
/* Set last byte to 0 so that strings are zero terminated. */
dataBuffer[length] = 0;
if ('\n' == c) {
/* '\n' indicates end-of-line for ASCII data. */