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.

I want connect wind speed sensor to CR310 o CR350 o CR1000X datalogger.


Csar ZC Aug 23, 2023 08:55 PM

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.


beliefmoneybag Sep 25, 2024 09:38 AM

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:

  • PulseCount: Counts pulses from your sensor.
  • P1: Specifies the pulse input channel (adjust if needed).
  • 2: The second argument in the PulseCount instruction, indicating the pulse type (for reed switch, type 2 is used).
  • Multiplier: Adjust based on the sensor's calibration to convert pulses to wind speed.

Make sure to verify the sensor's pulse-to-wind-speed conversion factor (multiplier) in the sensor documentation.

(among us online)

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