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.

visibility sensor


fdeclercq Sep 15, 2020 08:49 AM

Dear all, we have bought a cs120A but we have problem to obtain data with a cr1000/cr3000 or cr1000x

i just want a basic program to obtain the visibility with this device

in addition we have the convertor SDM-SI01A but we can't find a solution to connect on the datalogger.

all help will be great !

regards


JDavis Sep 15, 2020 02:54 PM

The CS120A is supported in the ShortCut program generator. If you do not see it as an option, download a newer version of ShortCut for Windows from the website.


fdeclercq Sep 15, 2020 03:06 PM

Dear JDavis

thanks for your answer.

i agree it's on shortcut but we can't found a solution to use the visibility sensor with the SDM-SI01A.

MAybe you have an idea to make, or modify the specific program?

regards


JDavis Sep 15, 2020 07:49 PM

The only change needed if using the SDM-SIO1A is the comport name. The number for the comport depends on the SDM address set on the SDM-SIO1A. The manual for the SDM-SIO1A has a table of comports numbers.

Basically any instruction in the program that starts with "Serial" will need the comport number changed in it.


fdeclercq Sep 16, 2020 06:36 AM

Dear Jdavis, could you look at the following code ? because i have only Nan answers :

I'm sorry, i'm not really expert with this sensor..

Public Visibility
Public InString As String * 60
Public SerialIndest(20) As String, NBytesReturned
Public ChecksumOK As Boolean

Alias SerialIndest(1)=Message_ID '0..2
Alias SerialIndest(2)=Sensor_ID '0..9
Alias SerialIndest(3)=System_status '0..3
Alias SerialIndest(4)=Interval_time '1..3600
Alias SerialIndest(5)=Visibilitystr '0..32000 meters
Alias SerialIndest(6)= VisibilityUnits 'M or F for Meters or Feet
Alias SerialIndest(7)=Averaging_duration '1 or 10 minutes
Alias SerialIndest(8)=User_alarm_1 '0..1 - Visibility compared to Threshold One
Alias SerialIndest(9)=User_alarm_2 '0..1 - Visibility compared to Threshold Two
Alias SerialIndest(10)=Emitter_failure '0..2 - Emitter Failure
Alias SerialIndest(11)=Emitter_lens_dirty '0..3 - Emitter Lens Dirty
Alias SerialIndest(12)=Emitter_temp_error '0..3 - Emitter Temperature
Alias SerialIndest(13)=Detector_lens_dirty '0..3 - Detector Lens Dirty
Alias SerialIndest(14)=Detector_temp_error '0..3 - Detector Temperature
Alias SerialIndest(15)=Detector_saturated '0..1 - Detector DC Saturation Level
Alias SerialIndest(16)=Hood_temp_error '0..3 - Hood Temperature
Alias SerialIndest(17)=Signature_error '0..1 - Signature Error
Alias SerialIndest(18)=Flash_read_error '0..1 - Flash Read Error
Alias SerialIndest(19)=Flash_write_error '0..1 - Flash Write Error
Alias SerialIndest(20)= checksumrx

Const CS120_Comport=33

Units Visibility = metres
DataTable (Visibilite, True,-1)
Sample (1,Visibility, IEEE4)
Sample (1,Detector_lens_dirty,FP2)
Sample (1,Detector_saturated,FP2)
Sample (1,Detector_temp_error,FP2)
Sample (1,Emitter_failure,FP2)
Sample (1,Emitter_lens_dirty,FP2)
Sample (1,Emitter_temp_error,FP2)
Sample (1,Flash_read_error,FP2)
Sample (1,Flash_write_error,FP2)
EndTable

Dim blnHsMsgBeenRecdInMinute As Boolean

BeginProg

SerialOpen (CS120_Comport,38400,48,0,1000)
Scan(10,Sec,1,0)
If IfTime (0,60,Sec) Then
blnHsMsgBeenRecdInMinute = false
EndIf

SerialInRecord(CS120_Comport,InString,02,0,03, NBytesReturned,01)
If NBytesReturned > 0 Then
SplitStr( SerialIndest(),InString, " " ,20,5)
blnHsMsgBeenRecdInMinute = true
ChecksumOK =(HexToDec(checksumrx)=CheckSum(InString,2,InStr(1,InString,CHR(0),0)))
If ChecksumOK Then Visibility= Visibilitystr Else Visibility= NaN
CallTable Visibilite
EndIf

If IfTime (50,60,Sec) Then
If blnHsMsgBeenRecdInMinute = false Then
InString =" "
SplitStr (SerialIndest(),InString,"",20,5)
Visibility= NaN

EndIf
EndIf

NextScan
EndProg

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