We run several CS125 Present Weather Sensors with attached CS215s T/RH Sensors for improved detection of precipitation states. The CS215s are connected to the CS125 and the CS125 then reports the data on visibility, precipitation, T and RH every minute to a CR1000X datalogger via the serial signal of the CS125.
I observed that when polling the CS125 via serial, that the serial information does not provide the sign of the CS215 temperature, so if the temperature is below zero, it will report an above zero temperature. E.g. instead of -6°C we will report 6°C.
As we would also like to record T and RH from the CS215 vis CS125 with the program below, I am wondering what we are doing wrong.
Is there any setting missing or program error / conversion causing this? Or is it the OS of the CS125?
Any feedback is well appreciated.
----------------------------------------------------
Program parts of relevance (I can also send full program if needed):
Const SYS_CS125_Poll = CHR(2)&"POLL:0:0:3A3B:"&CHR(3)&CHR(13) 'address 0
Public MET_CS215_AirTemperature_degC As Float
Public MET_CS215_RelHumidity_percent As Float
Units MET_CS215_AirTemperature_degC=degC
Units MET_CS215_RelHumidity_percent=%
Public SYS_CS125_lngCRCMsg As Long
'Define the aliases for the full serial message from CS 125
Alias SYS_CS125_SerialData(1)=SYS_CS125_Message_ID '0..2
Alias SYS_CS125_SerialData(2)=SYS_CS125_Sensor_ID '0..9
Alias SYS_CS125_SerialData(3)=SYS_CS125_System_status '0..3
Alias SYS_CS125_SerialData(4)=SYS_CS125_Interval_time '1..3600
Alias SYS_CS125_SerialData(5)=SYS_CS125_Visibilitystr '0..32000 metres
Alias SYS_CS125_SerialData(6)=SYS_CS125_VisibilityUnits 'M or F for Metres or Feet
Alias SYS_CS125_SerialData(7)=SYS_CS125_Averaging_duration '1 or 10 minutes
Alias SYS_CS125_SerialData(8)=SYS_CS125_User_alarm_1 '0..1 - Visibility compared
Alias SYS_CS125_SerialData(9)=SYS_CS125_User_alarm_2 '0..1 - Visibility compared
Alias SYS_CS125_SerialData(10)=SYS_CS125_Emitter_failure '0..2 - Emitter Failure
Alias SYS_CS125_SerialData(11)=SYS_CS125_Emitter_lens_dirty '0..3 - Emitter Lens
Alias SYS_CS125_SerialData(12)=SYS_CS125_Emitter_temp_error '0..3 - Emitter Temperature
Alias SYS_CS125_SerialData(13)=SYS_CS125_Detector_lens_dirty '0..3 - Detector Lens Dirty
Alias SYS_CS125_SerialData(14)=SYS_CS125_Detector_temp_error '0..3 - Detector Temperature
Alias SYS_CS125_SerialData(15)=SYS_CS125_Detector_saturated '0..1 - Detector DC Saturation Level
Alias SYS_CS125_SerialData(16)=SYS_CS125_Hood_temp_error '0..3 - Hood Temperature
Alias SYS_CS125_SerialData(17)=SYS_CS125_External_temp_error '0..3 - External Temperature
Alias SYS_CS125_SerialData(18)=SYS_CS125_Signature_error '0..1 - Signature Error
Alias SYS_CS125_SerialData(19)=SYS_CS125_Flash_read_error '0..1 - Flash Read Error
Alias SYS_CS125_SerialData(20)=SYS_CS125_Flash_write_error '0..1 - Flash Write Error
Alias SYS_CS125_SerialData(21)=SYS_CS125_Particle_limit_error '0 or 1 - Particle limit reached
Alias SYS_CS125_SerialData(22)=RAW_CS125_Particle_Count
Alias SYS_CS125_SerialData(23)=RAW_CS125_Intensity 'mm/h
Alias SYS_CS125_SerialData(24)=RAW_CS125_SYNOP_code
Alias SYS_CS125_SerialData(25)=RAW_CS215_AirTemperature 'deg C
Alias SYS_CS125_SerialData(26)=RAW_CS215_RelHumidity '%, 0..100
Alias SYS_CS125_SerialData(27)=SYS_CS125_Checksumrx 'CCITT Checksum
[...]
SerialOut(SYS_CS125_Comport,SYS_CS125_Poll,"",0,100)
SerialInRecord (SYS_CS125_Comport,SYS_CS125_InString,&h02,0,&h03,SYS_CS125_NBytesReturned,04)
MET_CS215_AirTemperature_degC = RAW_CS215_AirTemperature
MET_CS215_RelHumidity_percent = RAW_CS215_RelHumidity
[...]
-> Then both RAW_CS215_AirTemperature and MET_CS215_AirTemperature_degC are always a positive value, irrespective if actual temperatures are below or above 0°C