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.

CS215 sensor programming error with Shortcut 3.2


wfguy May 10, 2017 02:13 AM

 Hi all

 Probably someone can help me find the errors.

 I’d like connect two CS215 temperature and relative humidity sensors to CR1000 and use Shortcut to yield program. I know that CS215 is SDI-12 sensor and give different address, i.e. 0 and 1. The program is as following:

 'CR1000

'Created by Short Cut (3.2)

'Declare Variables and Units

Public BattV

Public PTemp_C

Public TRHData(2)

Public TRHData_2(2)

 

Alias TRHData(1)=AirTC

Alias TRHData(2)=RH

Alias TRHData_2(1)=AirTC_2

Alias TRHData_2(2)=RH_2

 

Units BattV=Volts

Units PTemp_C=Deg C

Units AirTC=Deg C

Units RH=%

Units AirTC_2=Deg C

Units RH_2=%

 

'Define Data Tables

DataTable(Table1,True,-1)

       DataInterval(0,10,Min,10)

       Average(1,AirTC,FP2)

       Sample(1,RH,FP2)

       Average(1,AirTC_2,FP2)

       Sample(1,RH_2,FP2)

EndTable

 

'Main Program

BeginProg

       'Main Scan

       Scan(2,Min,1,0)

              'Default CR1000 Datalogger Battery Voltage measurement 'BattV'

              Battery(BattV)

              'Default CR1000 Datalogger Wiring Panel Temperature measurement 'PTemp_C'

              PanelTemp(PTemp_C,_50Hz)

              'CS215 Temperature & Relative Humidity Sensor measurements 'AirTC' and 'RH'

              SDI12Recorder(TRHData(),7,"0","M!",1,0,-1)

              'CS215 Temperature & Relative Humidity Sensor measurements 'AirTC_2' and 'RH_2'

              SDI12Recorder(TRHData_2(),7,"1","M!",1,0,-1)

              'Call Data Tables and Store Data

              CallTable Table1

       NextScan

EndProg

 

But unfortunately, the program didn’t work correctly and displayed no temperature and humidity data. So I pluged the first sensor into C5 terminal and change the corresponding program line to SDI12Recorder(TRHData(),5,"0","M!",1,0,-1) and SDI12Recorder(TRHData(),7,"0","M!",1,0,-1). And the program worked.

I know the SDI-12 sensors can use the same channel as long as with different addresses. But why didn’t the yielded program which use C7 channel and 0/1 addresses work? Can you help me find where the mistake existed?

 

Thanks.

 


aps May 10, 2017 03:48 PM

This should work if the addresses are set correctly.

If as you report you got "no temperature and humidity data" and this means from both sensors when wired together, this could indicate either the total cable length is too long and loading the control port or there could be a fault with one sensor that is loading the port stopping both working in parallel.

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