Macar,
We have customers do this regularly. They generally take one of the following approaches. Any particular reason you're deciding not use LoggerNet? LoggerNet does support "callback" from loggers and would be very easy to implement in the logger coding wise.
1) Write data using TableFile instruction, then FTP the file to their server
3) Write data using TableFile instruction, then Email the file to their server. Very similar process as (1)
5) Use GetRecord, TCPOpen, and SerialOut to extract data table records and push them out an IP socket.
-----------------------------------------------------
An example of (1) can be found in this thread
http://www.campbellsci.com/forum/messages.cfm?threadid=5FF6008B-013F-673B-CF27BDC1BBC4FFB0
-----------------------------------------------------
Following is an example of (3)
' Operational Notes:
' * Record sending is based on record number and not timestamps
PreserveVariables
Public PTemp, batt_volt
'Network Settings and Variables
Public DataServ As String * 15 = "192.168.13.10" 'address of server listening for data
Public DataServPort As Long = 6000 'port on server listening for data
Public DataServSock 'will hold socket assignment on logger
Public DataHold As Boolean = FALSE 'flag for pausing data sending
Dim DataRecover As Boolean 'flag for data recovery mode
Public Rec As Long 'last record number in data table
Public LRecSent As Long = -1 'last record we tried to send
Public RecBack As Long 'number of records still need to send
Const GRDataMaxLen = 127 'max length of GRData string
Public GRData As String * GRDataMaxLen 'string for holding record data
Public NTPServ As String * 31 = "192.168.13.10" 'address of NTP server
Public GMTOffset = -6 'hours
Public NTPErr 'milliseconds
Public SyncTime As Boolean = FALSE 'flag for forcing network time syncing
DataTable (Min15,1,-1)
DataInterval (0,15,Min,10)
Sample (1,batt_volt,FP2)
Sample (1,PTemp,FP2)
EndTable
DataTable (ComsLog,1,100)
Sample (1,DataServSock,FP2)
Sample (1,Rec,FP2)
Sample (1,LRecSent,FP2)
Sample (1,RecBack,FP2)
Sample (1,GRData,String)
EndTable
BeginProg
Scan (15,Min,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
CallTable Min15
NextScan
SlowSequence
Do While TRUE 'inifinite loop
'Get number of last record in table
'Determine how far back need to go to catch up
'Rec = Min15.Record 'get number of last record in table
If Rec < LRecSent Then LRecSent = -1 'What if LRecSent is preserved but datatable has been reset? Reset LRecSent.
RecBack = Rec - LRecSent 'determine how much need to catch up
If NOT DataHold Then 'not holding sending of data
If RecBack > 0 Then 'If recback is greater than zero then we have records to send
If DataServSock >= 100 Then 'successfully opened socket to server
LRecSent = Rec - RecBack + 1 'calc new last record number sent
GetRecord (GRData,Min15,RecBack) 'extract data from data table
'Form string for sending: "YYYY-MM-DD HH:MM:SS", RECNUM, DATA, DATA, DATA
' "2010-05-24 17:09:30",70,13.33,23.64
GRData = Left (GRData,InStr (2,GRData,"""",2)) & "," & LRecSent & Mid (GRData,InStr (2,GRData,"""",2) + 1,1000) & CHR(13)
SerialOut (DataServSock,GRData,"",0,0) 'send data out over socket
CallTable (ComsLog)
EndIf 'socket
EndIf 'recback
DataServSock = TCPOpen (DataServ,DataServPort, GRDataMaxLen * 100) 'attempt to create link with data server
EndIf 'datahold
Loop
EndSequence
SlowSequence
Scan (5,Sec,3,0)
If TimeIntoInterval (0,24,Hr) OR SyncTime Then
SyncTime = FALSE
'Network Time Sync'ing
NTPErr = NetworkTimeProtocol (NTPServ,GMTOffset * 3600,1000)
EndIf
NextScan
EndSequence
EndProg
Sam Utley
Communication Products Manager
[Report Inappropriate or Erroneous Content]