Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Programming CR1000 for anemometers and wind vanes


DavidJP Jul 19, 2012 09:23 AM

We're trying to connect six anemometers and two wind vanes to the CR1000 and we're having a few problems.

We have the two wind vanes (NRG 200) connected to the H1 and H2 inputs, a windsonic anemometer to the COM 1 connection and five NRG 40 anemometers connected to COM 2,3 and 4 and P1 and P2.

This is the program we're using at the moment. Unfortunately it only seems to detect the Windsonic on COM1, the anemometer on COM2, the two pulse inputs and the first wind vane on H1.

Finally, we have a wiring problem as well. The two NRG 40 anemometers on the pulse inputs are NRG 40(S) models and seem to be wired differently in that they just have a + and a - connections. Any idea on how they should be wired?

Thanks for any help.

'CR1000
'Created by Short Cut (2.8)

'Declare Variables and Units
Public BattV

Public WS_ms_1
Public WS_ms_2
Public WS_ms_3
Public WS_ms_4
Public WS_ms_5

Public WindDir_1
Public WindDir_2

Dim WSStr As String * 21
Dim ByteRet
Dim ChkSumF As Boolean
Public WSData(3)
Public N(9)

Alias WSData(1)=WD_deg
Alias WSData(2)=WS_ms
Alias WSData(3)=WSDiag
Alias N(1)=SmplsF
Alias N(2)=Diag1F
Alias N(3)=Diag2F
Alias N(4)=Diag4F
Alias N(5)=Diag8F
Alias N(6)=Diag9F
Alias N(7)=Diag10F
Alias N(8)=NNDF
Alias N(9)=CSEF

Units BattV=Volts

Units WS_ms_1=meters/second
Units WS_ms_2=meters/second
Units WS_ms_3=meters/second
Units WS_ms_4=meters/second
Units WS_ms_5=meters/second

Units WindDir_1=degrees
Units WindDir_2=degrees

Units WD_deg=Degrees
Units WS_ms=meters/second
Units WSDiag=unitless

'Define Data Tables
DataTable(Battery,True,-1)
DataInterval(0,1440,Min,10)
Minimum(1,BattV,FP2,False,False)
EndTable

DataTable(WindSpeed,True,-1)
DataInterval(0,1,Min,10)
Sample (1,WS_ms_1,FP2)
Sample (1,WS_ms_2,FP2)
Sample (1,WS_ms_3,FP2)
Sample (1,WS_ms_4,FP2)
Sample (1,WS_ms_5,FP2)
EndTable

DataTable(WindDirection,True,-1)
DataInterval(0,1,Min,10)
Sample (1,WindDir_1,FP2)
Sample (1,WindDir_2,FP2)
EndTable

DataTable(WindSonic,True,-1)
DataInterval(0,1,Min,10)
Sample (1,WD_deg,FP2)
Sample (1,WS_ms,FP2)
Sample (1,WSDiag,FP2)
Sample (1,SmplsF,UINT2)
Sample (1,Diag1F,UINT2)
Sample (1,Diag2F,UINT2)
Sample (1,Diag4F,UINT2)
Sample (1,Diag8F,UINT2)
Sample (1,Diag9F,UINT2)
Sample (1,Diag10F,UINT2)
Sample (1,NNDF,UINT2)
Sample (1,CSEF,UINT2)
EndTable


'Main Program
BeginProg
SerialOpen(Com1,9600,3,0,145)
Scan(5,Sec,1,0)
'Default Datalogger Battery Voltage measurement BattV
'#Battery(BattV)

'NRG #40 Wind Speed Sensor measurements WS_ms_1
PulseCount(WS_ms_1,1,1,0,1,0.765,0.35)
If WS_ms_1<0.36 Then WS_ms_1=0
'NRG #40 Wind Speed Sensor measurements WS_ms_2
PulseCount(WS_ms_2,1,2,0,1,0.765,0.35)
If WS_ms_2<0.36 Then WS_ms_2=0
'NRG #40 Wind Speed Sensor measurements WS_ms_3
PulseCount(WS_ms_3,1,13,0,1,0.765,0.35)
If WS_ms_3<0.36 Then WS_ms_3=0
'NRG #40 Wind Speed Sensor measurements WS_ms_4
PulseCount(WS_ms_4,1,14,0,1,0.765,0.35)
If WS_ms_4<0.36 Then WS_ms_4=0
'NRG #40 Wind Speed Sensor measurements WS_ms_5
PulseCount(WS_ms_5,1,15,0,1,0.765,0.35)
If WS_ms_5<0.36 Then WS_ms_5=0

'NRG #200P Wind Direction Sensor measurements WindDir_1
BrHalf(WindDir_1,1,mV2500,1,1,1,2500,True,0,_60Hz,360,0)
If WindDir_1>=360 Then WindDir_1=0
'NRG #200P Wind Direction Sensor measurements WindDir_2
BrHalf(WindDir_2,1,mV2500,2,1,1,2500,True,0,_60Hz,360,0)
If WindDir_2>=360 Then WindDir_2=0

'WindSonic1 Two Dimensional Sonic Wind Speed & Direction Sensor measurements WD_deg, WS_ms, and WSDiag
'Get data from WindSonic1
SerialInRecord(Com1,WSStr,&h02,0,&h0D0A,ByteRet,00)
WD_deg=Mid(WSStr,3,3)
WS_ms=Mid(WSStr,7,6)
WSDiag=Mid(WSStr,16,2)
ChkSumF = HextoDec(Mid(WSStr,20,2)) Eqv CheckSum(WSStr,9,18)
'Set diagnostic variables as needed
If ByteRet=0 Then WSDiag=NAN
Move(SmplsF,9,0,1)
Select Case WSDiag
Case=0
SmplsF=1
Case=1
Diag1F=1
Case=2
Diag2F=1
Case=4
Diag4F=1
Case=8
Diag8F=1
Case=9
Diag9F=1
Case=10
Diag10F=1
Else
NNDF=1
EndSelect
If Not (ByteRet<>0 Imp ChkSumF) Then CSEF=1
'End of WindSonic

CallTable(Battery)
CallTable(WindSpeed)
CallTable(WindDirection)
CallTable(WindSonic)

NextScan
EndProg


aps Jul 19, 2012 09:44 AM

Most NRG#40 sensors have an AC output which can only be measured on the pulse count channels in the low level AC mode. To read them on a control port you need an extra interface (LLAC4 from CS or an interface from NRG).

To work out the windvance issue we'd need to see the wiring used.


DavidJP Jul 19, 2012 10:26 AM

With the NRG#40 on the COM ports does that apply just to COM3 and COM4? As at the moment the anemometer on COM2 is working.

The wind vanes are connected as follows

Signal to H
Ground to Ground
Power to VX1


aps Jul 19, 2012 10:56 AM

I am not sure how you are connecting the anemometers to the control ports. You program is using controls ports C3, C4 and c5 - ignore the labelling for COM ports which is only relevant to serial sensors. For a logic level output sensor you would connect the sensor between G and the control port input.

If you have standard NRG sensors they may appear to work on control ports (or pulse ports set in high level mode) if you spin them up fast but at low speeds you will get no reading as they do not produce large enough signals for logic level inputs at low speeds.

The windvanes should work with the wiring and program you show, except if pointed into the deadband, where "the signal is undefined".


DavidJP Jul 19, 2012 11:52 AM

the NRG#40 anemometers are wired up as follows to the COM ports.

Power - 5V
Signal - Rx
Ground - Ground

And we were told to put a 330 ohm resistor between the Excitation Voltage and the Output Signal.

All the anemometers are arranged down the length of the roof of our building and it seems odd that only the same one always displays a windspeed while the others always display nothing. The nature of the windflow along the roof means they all do roughly the same amount of rotation even if not at all the same time.


aps Jul 19, 2012 01:59 PM

OK it seems some of your anemometers are the NRG#40H sensor, at least from the wiring instructions you have been given. They should work on the control ports BUT you have the wiring wrong.

As I said above ignore the COM labels and connect the signal outputs of the sensors to the terminals labelled C3, C4 and C5 on the wiring panel.


DavidJP Jul 20, 2012 09:25 AM

Thanks for your help. We've managed to get working the two wind vanes and all the anemometers on the COM ports.

This just leaves the two NRG#40(s) on the Pulse Inputs P1 and P2. Previously with this program we've had other anemometers working on those inputs so I suspect this is just a wiring issue.

The two NRG#40(s) have just two connections, one + and one - and no ground. Do you have any ideas on that one?


aps Jul 20, 2012 10:59 AM

If they are the standard NRG40s the have a simple AC output, connect the two wires between the pulse input and ground (no other connections). Then change the measurement instruction so the PConfig parameter is 1 not 0 (changing it to low level AC signals).


DavidJP Jul 20, 2012 11:42 AM

That's it. It's all working now.

Thanks!

Log in or register to post/reply in the forum.