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.

Update with SC115


MaximeD Feb 5, 2013 03:54 PM

Dear all,

I wrote a program to collect my data from an USB and a computer but by this program I succeeded to collect by my USB SC1115 but I canno't collect my data by my computer.

I would like to collect my data with my computer and my USB in the same time. Is it possible ?

Moreover, I have an other question. A new file ".dat" is created for each data in my USB. Is it possible that each data is written in a same file ?


My programm :

'Declare Variables and Units
Public BattV
Public BP_mbar
Public Outstat, LastFileName As String *25
Public RTime(9)
'(1) year, (2) month, (3) day of month, (4) hour of day, (5) minutes,
'(6) seconds, (7) microseconds, (8) day of week (1-7; Sunday=1), (9) day of year.

Units BattV=Volts
Units BP_mbar=mbar

'Define Data Tables
DataTable(Table1,True,-1)
DataInterval(0,10,Min,10)
TableFile ("USB:Test",8,-2,0,1,Day,Outstat,LastFileName)
Average(1,BP_mbar,FP2,False)
Average(1,BattV,FP2,False)
Sample(1,BattV,FP2)
Sample(1,BP_mbar,FP2)
EndTable

DataTable(Table2,True,-1)
DataInterval(0,10,Min,10)
Minimum(1,BattV,FP2,False,False)
Average(1,BattV,FP2,False)
Average(1,BP_mbar,FP2,False)
Sample(1,BP_mbar,FP2)
Sample(1,BattV,FP2)
EndTable

'Main Program
BeginProg
PortSet (9,1)
'Main Scan
Scan(1,Sec,1,0)
'to turn SW12 off then on ten minutes later once a day at 07:00:
RealTime (RTime())
If TimeIntoInterval (1020,1440,Min) Then PortSet (9,0) 'turn SW12 off
If TimeIntoInterval (420,1440,Min) Then PortSet (9,1) 'turn SW12 on

'Default Datalogger Battery Voltage measurement BattV
Battery(BattV)
'CS100 Barometric Pressure Sensor measurement BP_mbar
PortSet(1,1)
VoltSe(BP_mbar,1,mV2500,1,1,0,_50Hz,0.2,600)
BP_mbar=BP_mbar*1
'Call Data Tables and Store Data
CallTable(Table1)
CallTable(Table2)
NextScan
EndProg

Thank you in advance,

Best regards,
Maxime


Sam Feb 18, 2013 06:49 AM

The SC115 can be used to collect data as a removable storage device (using TableFile to USB). It can also be used as a USB to CS I/O adapter for general communications with a datalogger's CS I/O port. It will not serve both purposes at the same time.

Only SC115 CS I/O Interface Powered by loggger ==> removable logger storage, i.e. datalogger USB: drive

Both SC115 CS I/O interface powered by logger AND USB interface powered by PC ==> acts as a USB to CS I/O adapter for PC to logger communications

Only SC115 USB interface powered by PC ===> acts as a USB mass storage device for loading / off loading files from SC115 internal flash memory.


TableFile does not support an append mode. Once the file is created, written to, and closed. It will never be opened and written to again by the logger.

Using CRBasic's File I/O functions, you could create your own file writing routine to create and append to files. But just keep in mind the potential risks appending a file might pose.


MaximeD Feb 18, 2013 07:08 AM

Thank you Sam for your answer.

I'll back to you if I have a problem, but now I think all is OK for me about the SC115.

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