Good day friend, I hope your help.
I have a wind speed sensor with output signal 2 pulses per revolution (reed switch).
Can you indicate the correct command CR Basic for connect sensor to CR310 or CR350 or CR1000X datalogger?
Thanks,
César.
Good day! For connecting your wind speed sensor (with a reed switch that outputs 2 pulses per revolution) to a CR310, CR350, or CR1000X datalogger, you can use the PulseCount instruction in CRBasic.
Here's a basic CRBasic snippet for configuring the sensor:
'Declare Variables
Public WindSpeed As Float
Public Pcount As Long
'Set up the datalogger for the pulse input on Pulse port 1 (P1)
'Set the multiplier based on your sensor specifications
'The multiplier should convert pulses to wind speed (e.g., m/s)
DataTable(Table1, True, -1)
DataInterval(0, 10, Min, 10) 'Collect data every 10 minutes
Average(1, WindSpeed, IEEE4, 10)
EndTable
BeginProg
Scan(1, Sec, 0, 0)
'Count pulses over the scan interval (1 second in this case)
PulseCount(Pcount, P1, 2, 1, 0, 1.0, 0)
'Convert the pulse count to wind speed (adjust the multiplier accordingly)
WindSpeed = Pcount * 0.1 'Example multiplier (adjust based on sensor specs)
'Call the data table to store the results
CallTable(Table1)
NextScan
EndProg
______
Key points:
Make sure to verify the sensor's pulse-to-wind-speed conversion factor (multiplier) in the sensor documentation.