Aquadopp intergation with a Campbell CR1000 logger
Hi,
I'm trying to integrate an Aquadopp with a Campbell CR1000 logger.
I have set the Aquadopp's Average Interval to 120s and measurement interval to 124s
and at the moment have a 5 min cycle, during which I switch the instrument ON, send a break, '@@@@@@@@' followed 100 msec later by 'K1W%!Q'
and then 'MC' to confirm. I then send an 'AS' AsciiStart command, I can see a response from the Aquadopp to these strings in a variable I have set -up.
I'm constantly scanning at a rate of 500 msec and can see an output from the Aquadopp approx. 2 min later through the logger's terminal emulator.
However, I'm unable to place this string from the logger's buffer in to the string variable I've set-up. I know that the result string output ends with a hex od0a,
from Nortek's own software's terminal emulator. What ever combination of settings I use inCampbell's InString or SerialInRecord commands, I can't get the ASCII string to be picked up.
3 min into the 5 min interval i switch the power off to the Aquadopp.
Has anyone had experience of integrating an Aquadopp to a Campbell CR1000 that can help please?
Have I set up the Aquadopp correctly ?
Thanks
Stuart
Hi Stuart,
Since you initiate the data collection from the CR 1000 it will simplify things if you use the MA command instead. You can use the same setup as you describe, the MA command will then measure one sample of data, output the result in ASCII and the Aquadopp will automatically go into sleep mode. When you send a break you will then come directly into command mode, hence no need for the MC confirmation string. This will also save power since the Aquadopp will now only operate in the 120s average interval, once every time you send the MA command.
I have no experience with the CR 1000, but the only problem I can think of here is that the acknowledge that the Aquadopp outputs, in response to the AS (now MA) command, is messing things up. So if you can make sure that you flush the input buffer on the CR 1000 after receiving acknowledge from the Aquadopp you should be able to read the data into the CR 1000. The easiest way to do this might be to just flush the buffer 2 sec after sending MA.
Best regards,
Sven Nylund
Hi again Stuart,
I noticed I missed a point here, if you control the power to the Aquadopp from the CR 1000 there is an even simpler way. With the Aquadopp software configure the Aquadopp with 120 sec average interval and 600 sec measurement interval. Start the Aquadopp with the AS command in the terminal emulator, wait for acknowledge and power off the Aquadopp. Then you connect the Aquadopp to the CR 1000 and control the measurement with the following sequence:
- Every 5 minutes apply power to the Aquadopp
- Capture the ASCII data with the CR 1000 after the average interval has expired (approximately 120 sec)
- Power off the Aquadopp
Now you will only have to control power to and parse data from the Aquadopp. And the potential problem I mentioned in my previous post will no longer be an issue since the Aquadopp will now only send out the ASCII data.
Best regards,
Sven
Hi Stuart and Sven,
There is a more simple alternative if you just let the AquaDopp run on its own clock and just wait for the ASCII data to come in as the number of ports to switch power (SW12V) is limited to just one.
Acquiring the ASCII data with the CR1000 is quite simple.
SerialIn ( AQDtLine,SerialPortVCT,100,CHR(10),30) will give you the whole line at once.
using SplitStr you can split the line in parts.
Best regards,
Sicco
Previously Sven Nylund wrote:
Hi again Stuart,
I noticed I missed a point here, if you control the power to the Aquadopp from the CR 1000 there is an even simpler way. With the Aquadopp software configure the Aquadopp with 120 sec average interval and 600 sec measurement interval. Start the Aquadopp with the AS command in the terminal emulator, wait for acknowledge and power off the Aquadopp. Then you connect the Aquadopp to the CR 1000 and control the measurement with the following sequence:
- Every 5 minutes apply power to the Aquadopp
- Capture the ASCII data with the CR 1000 after the average interval has expired (approximately 120 sec)
- Power off the Aquadopp
Now you will only have to control power to and parse data from the Aquadopp. And the potential problem I mentioned in my previous post will no longer be an issue since the Aquadopp will now only send out the ASCII data.
Best regards,
Sven
Re: Aquadopp intergation with a Campbell CR1000 logger
Hi, Stuart, did you finally managed to successfully use the ascii format?
I have a similar problem for an Aquadopp Profiler and the ascii output commands (SA, MA, RA) do not send what the System Integrators Guide said they should send
Thanks
Fran
Re: Aquadopp intergation with a Campbell CR1000 logger
Hi all,
I've reached to get data srtings using
SerialIn ( AQDtLine,SerialPortVCT,100,CHR(10),30)
but I can't succeed to split it using SplitStr. Which separator should I use? I've tried CHR(32), CHR(10) and CHR(4).
Thanks,
Jordi
Re: Aquadopp intergation with a Campbell CR1000 logger
Hi Jordi,
I just used a space " " and that works fine.
SplitStr ( Results_AQD_CP(IndexCell),AQDLine2, " ",3,0)
Best regards,
Sicco
Thanks all of you who posted here, it was really helpful to me.
My data's coming in nicely. Thought I would share what worked for me. It's not elegant, but it worked. I had more success with the SerialInRecord command.
For simplicity, I configured the aquadopp to only have two cells in the profile. Then configured it to profile every 20 sec to match logger. I used the aquapro terminal to send the aquadopp the AS command .
Then, I hooked it up to the CS1000 with only this little bit as a main program:
Scan(20,Sec,10,0)
SerialOpen (Com2,9600,0,0,10000)
SerialInRecord(Com2,AQDLine,0,0,0,NbytesReturned,01)
SplitStr(Results_AQD(1),AQDLine," ",23,0) ' 23 is the number of strings (see below),
'0 makes it only take numerical data (this worked better than using the space to separate)
CallTable(Table1) ' table 1 is just the AQDLine string and the number of bytes returned
CallTable(Table2) 'table 2 is the split string. because I used only 2 profile cells, my table is 23 wide. add 3 columns for each added cell.
NextScan
Hi
I am using a similar setup with a Aquadopp current meter and Campbell CR1000 datalogger. The problem I am having is that I am receiving 2 strings back for every one MA command that I send, with the 2 strings being 20 seconds apart. The data is requested every 10 minutes and then the return data is read into a string. Here is the data I receive.
"2011-10-28 11:31:20"," 1 1 2000 2 53 53 0 44 -0.387 0.206 0.153 26 28 26 14.9 1483.4 128.0 161.5 -163.6 0.751 21.37 0 0 "
"2011-10-28 11:31:40","26 28 26 14.9 1483.4 128.3 161.5 -163.5 0.629 21.37 0 0 "
"2011-10-28 11:41:20"," 1 1 2000 3 2 47 0 44 -0.261 0.180 -0.050 26 28 25 15.0 1483.4 128.6 165.0 -163.5 1.026 21.37 0 0 "
"2011-10-28 11:41:40","6 28 26 14.9 1483.4 127.8 161.5 -163.6 0.892 21.37 0 0 "
"2011-10-28 11:51:20"," 1 1 2000 3 12 47 0 44 -0.298 0.062 0.035 26 28 25 15.0 1483.4 128.8 165.0 -163.5 1.029 21.38 0 0 "
"2011-10-28 11:51:40"," 26 28 26 14.9 1483.4 127.3 161.5 -163.6 0.674 21.37 0 0 "
The first date/time is a timestamp from the datalogger.
The 2nd string is only part of a complete Aquadopp data record. Why am I receiving this 2nd string?
The following is part of the program in the datalogger to request the data.
Sub GetAquadoppData()
SerialOut(Com3,"@@@","",0,100) 'command to wake up instrument and enter command mode
Delay(0,2,sec)
SerialFlush(Com3)
SerialOut(Com3,"MA","",0,100)
Delay(0,2,sec)
SerialFlush(Com3) 'flush acknowledgement of MA command
EndSub
If (SerialInChk(Com3) > 10) Then
Delay(1,10,mSec)
SerialIn(c3str,Com3,500,CHR(10),2000)
SerialFlush(Com3)
CallTable(Nortek_Data)
EndIf
The subroutine "GetAquadoppData()" is called every 10 minutes and then the data is read into the "c3str" string variable which is then saved in the "Nortek_data" table in the datalogger.
Another thing that happens is when I send the instrument a "MA" command in the Aquadopp software "Terminal Emulator", I receive 21 strings of data in return. Is this normal?
The firmware version is v1.21 and I think the current meter is a 2004 model.
Any help would be appreciated. Thanks.
Dear Lloyd, I will let the guys with Campbell experience answer the logger issue. I have just tested an Aquadopp with fw 1.21 at my desk and I get 25 values with the format as below. Best regards Jonas Røstad 1 Month
2 Day
3 Year
4 Hour
5 Minute
6 Second
7 Error code
8 Status code
9 Velocity B1/X/E
10 Velocity B2/Y/N
11 Velocity B3/Z/U
12 Amplitude beam 1
13 Amplitude beam 2
14 Amplitude beam 3
15 Battery level
16 Sound speed
17 Heading
18 Pitch
19 Roll
20 Pressure
21 Temperature
22 Analog input 1
23 Analog input 2
24 Speed
25 Direction
Hi Jonas
I am receiving data back from the current meter, not 25 values, only 23 ( I do not get the speed and direction, values 24,25). The problem is that I receive 2 sets of values, sometimes with the second set missing some of the data.
Are there settings somewhere that need to be altered to specify how often data is collected? To my understanding, data is only collected when I issue the "MA" command and so why do I get multiple sets of data?
Regards
Lloyd
Dear Lloyd,
The MA command should give only one set of values.
I would have tested this by connecting the instrument directly to a computer and check what response the instrument is giving then.
Best regards
Jonas Røstad
Hi Jonas
As mentioned above, when I connect the instrument directly to the computer and send a "MA" command, I receive 21 sets of 23 values. This does not seem to be correct either.
Is there possibly a setting somewhere that needs to be changed. All settings are set to default at the moment.
Regards
Lloyd

