Support Forums
Sampling WindMaster - serial port at 10 Hz

Hello,

I am using a DT80 to sample an ultrasonic anemometer (Gill Instruments WindMasterPro) at 10 Hz, testing using DeLogger v5. I've also tested the serial connection using DeTransfer, after reading this forum - seems to be working fine.

I'm finding that I get a few seconds of measurements received at full rate (10 Hz). Then I get an error signal: 'serial sensor scan error at control string position 20' Following this error the sampling rate drops back to about once every 1 to 2 seconds.

The same thing happens whether I sample at (100T), or trigger off the signal from the anemometer (1SERIAL"^BQ"). My current code (I've tried a few things...) is:

RS100T 
PS=RS422,57600,N,8,1,NOFC 
RA("B:",ALARMS:OV:100KB,DATA:OV:100KB)100T GA LOGONA 
1SERIAL("^BQ,%f[1CV],%f[2CV],%f[3CV]^C") 
'...store values for turbulence calculations (not shown) 
RB("B:",ALARMS:OV:100KB,DATA:OV:15D)1S LOGONB GB 
1CV("U1~m/s") 'positive when blowing from South 
2CV("V1~m/s") 'positive when blowing from East 
3CV("W1~m/s") 'positive when blowing up

I'm not storing much data at the 10 Hz rate - I am going to log U,V,W once per second. But I want to use 10 Hz for turbulence measurements. I can supply full code if it helps although it is a bit of a mess right now from trying different possible fixes.

Unfortunately I don't have DT80 in front of me to check, but I think the firmware is an older version, possibly v7.02. Any ideas?

Thanks,
Stephen

Hello, I am using a DT80 to sample an ultrasonic anemometer (Gill Instruments WindMasterPro) at 10 Hz, testing using DeLogger v5. I've also tested the serial connection using DeTransfer, after reading this forum - seems to be working fine. I'm finding that I get a few seconds of measurements received at full rate (10 Hz). Then I get an error signal: 'serial sensor scan error at control string position 20' Following this error the sampling rate drops back to about once every 1 to 2 seconds. The same thing happens whether I sample at (100T), or trigger off the signal from the anemometer **(1SERIAL"^BQ")**. My current code (I've tried a few things...) is: ```` RS100T PS=RS422,57600,N,8,1,NOFC RA("B:",ALARMS:OV:100KB,DATA:OV:100KB)100T GA LOGONA 1SERIAL("^BQ,%f[1CV],%f[2CV],%f[3CV]^C") '...store values for turbulence calculations (not shown) RB("B:",ALARMS:OV:100KB,DATA:OV:15D)1S LOGONB GB 1CV("U1~m/s") 'positive when blowing from South 2CV("V1~m/s") 'positive when blowing from East 3CV("W1~m/s") 'positive when blowing up ```` I'm not storing much data at the 10 Hz rate - I am going to log U,V,W once per second. But I want to use 10 Hz for turbulence measurements. I can supply full code if it helps although it is a bit of a mess right now from trying different possible fixes. Unfortunately I don't have DT80 in front of me to check, but I think the firmware is an older version, possibly v7.02. Any ideas? Thanks, Stephen

Good evening Stephen,

Can you please post a copy of the string you are trying to parse? Also are you polling for data or trying to read an unsolicited input string?

Cheers,
Roger

Good evening Stephen, Can you please post a copy of the string you are trying to parse? Also are you polling for data or trying to read an unsolicited input string? Cheers, Roger

Hi Roger,

According to the WindMaster manual, the string should be of the form:

{STX}Q, +001.59, -002.74, +000.27, 341.29, 21.01, M, 00, {ETX} 2D

I have replaced angle brackets with curly brackets to post here.

{STX} = ^B, {ETX} = ^C

I am only interested in the first 3 floats - U,V,W values. After that is speed of sound, sonic temperature, units [M = m/s], and a status code.

Regards,
Stephen

Hi Roger, According to the WindMaster manual, the string should be of the form: ```` {STX}Q, +001.59, -002.74, +000.27, 341.29, 21.01, M, 00, {ETX} 2D ```` I have replaced angle brackets with curly brackets to post here. ```` {STX} = ^B, {ETX} = ^C ```` I am only interested in the first 3 floats - U,V,W values. After that is speed of sound, sonic temperature, units [M = m/s], and a status code. Regards, Stephen

Good afternoon Stephen,

Ok, you only want the first three items from the input stream so you will need to clear the buffer once you have read in the items you need. Try

1SERIAL("^BQ,%f[1CV],%f[2CV],%f[3CV]\\e")

The \e is DeTransfer for clear the input buffer.

Cheers,
Roger

Good afternoon Stephen, Ok, you only want the first three items from the input stream so you will need to clear the buffer once you have read in the items you need. Try ```` 1SERIAL("^BQ,%f[1CV],%f[2CV],%f[3CV]\\e") ```` The \\e is DeTransfer for clear the input buffer. Cheers, Roger

Hi Roger,

Adding the '\e' (DeTransfer \e) did the trick in getting rid of the scan error.

I also reran the anemometer configuration tool to make sure it is transmitting at 10 Hz. The default is 40 Hz sampling but just 1 Hz signalling. I'm not sure if it got reset or if I just overlooked this in my original setup... very annoying.

Is it better practice to trigger the schedule based on time (100T), or on receiving comms (1SERIAL"^BQ")?

Regards,
Stephen

Hi Roger, Adding the '\e' (DeTransfer \\e) did the trick in getting rid of the scan error. I also reran the anemometer configuration tool to make sure it is transmitting at 10 Hz. The default is 40 Hz sampling but just 1 Hz signalling. I'm not sure if it got reset or if I just overlooked this in my original setup... very annoying. Is it better practice to trigger the schedule based on time (100T), or on receiving comms (1SERIAL"^BQ")? Regards, Stephen

Good afternoon Stephen,

Glad to hear it is running. The thing to remember is you need to account all the data, not just the bit you need. As for how to trigger the schedule will depend on what data you want.

For example if the sensor is putting out data at 10 Hz but you only want data once a second then trigger the schedule based on time and use the match data function to locate the start of the next available data string. Then just read in the items you want.

If on the other hand you want the data at 10 Hz the triggering on the header of the data will simplify problems that can occur when you have two different clocks going out of sync as their time drifts.

Cheers,
Roger

Good afternoon Stephen, Glad to hear it is running. The thing to remember is you need to account all the data, not just the bit you need. As for how to trigger the schedule will depend on what data you want. For example if the sensor is putting out data at 10 Hz but you only want data once a second then trigger the schedule based on time and use the match data function to locate the start of the next available data string. Then just read in the items you want. If on the other hand you want the data at 10 Hz the triggering on the header of the data will simplify problems that can occur when you have two different clocks going out of sync as their time drifts. Cheers, Roger
51
5
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft