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.

Programming for CR1000


fufu Aug 29, 2015 03:22 AM

Hi, I am currently using CR1000. I would like to record my data for every 1 second, however, the shortcut program only allows me to store my data for every 1 minute.

I am new to programming, and would like to ask what changes do I have to make to this current script to record my data for every second. Thank you.

CR1000
'Created by SCWIN (2.5)

'Declare Variables and Units
Public Batt_Volt
Public DiffVolt
Public PTemp_C
Public Temp_C
Public AirTC
Public RH
Public AirTC_2
Public RH_2

Units Batt_Volt=Volts
Units DiffVolt=mV
Units PTemp_C=Deg C
Units Temp_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,1,Min,10)
Sample(1,Batt_Volt,FP2)
Sample(1,DiffVolt,FP2)
Sample(1,PTemp_C,FP2)
Sample(1,Temp_C,FP2)
Sample(1,AirTC,FP2)
Sample(1,RH,FP2)
Sample(1,AirTC_2,FP2)
Sample(1,RH_2,FP2)
EndTable

'Main Program
BeginProg
Scan(1,Sec,1,0)
'Default Datalogger Battery Voltage measurement Batt_Volt:
Battery(Batt_Volt)
'Generic Differential Voltage measurements DiffVolt:
VoltDiff(DiffVolt,1,mV5000,1,True,0,_50Hz,0.2,0.0)
'Wiring Panel Temperature measurement PTemp_C:
PanelTemp(PTemp_C,_60Hz)
'Type E (chromel-constantan) Thermocouple measurements Temp_C:
TCDiff(Temp_C,1,mV7_5C,2,TypeE,PTemp_C,True,0,_60Hz,1,0)
'HMP45C (7-wire) Temperature & Relative Humidity Sensor measurements AirTC and RH:
PortSet(1,1)
Delay(0,150,mSec)
VoltSE(AirTC,1,mV2500,5,0,0,_60Hz,0.1,-40.0)
VoltSE(RH,1,mV2500,6,0,0,_60Hz,0.1,0)
PortSet(1,0)
If RH>100 And RH<108 Then RH=100
'HMP45C (7-wire) Temperature & Relative Humidity Sensor measurements AirTC_2 and RH_2:
PortSet(2,1)
Delay(0,150,mSec)
VoltSE(AirTC_2,1,mV2500,7,0,0,_60Hz,0.1,-40.0)
VoltSE(RH_2,1,mV2500,8,0,0,_60Hz,0.1,0)
PortSet(2,0)
If RH_2>100 And RH_2<108 Then RH_2=100
'Call Data Tables and Store Data
CallTable(Table1)
NextScan
EndProg


Uri Aug 30, 2015 09:12 PM

Right click the mouse on 'Min' in this row:
DataInterval(0,1,Min,10)

A drop down list of options will open > Choose 'Sec' > Compile and save.

Be aware that the CR1000 memory can hold only few hours/days in this data recording rate. If you are using LoggerNet you can check that after you send the program to the CR1000 by connecting > open 'Station Status' > check 'Table Fill Times' tab.


fufu Aug 31, 2015 04:07 AM

Thank you for your help :)

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