User Manual
13
Step 1: Configure Datalogger
a.
Connect serial cable from PC COM port to datalogger RS-232 port.
b.
Open Campbell Scientific’s Device Configuration Utility. Select the device
type of the datalogger (CR1000 or CR3000), the appropriate serial port and
baud rate. Connect to the datalogger.
c.
Under the Net Services tab, verify that FTP Enabled is checked. Input the
FTP User Name and FTP Password.
d.
Press the Apply button to save the changes and then close the Device
Configuration Utility.
Using “anonymous” as the user name with no password allows FTP
access without inputting a user name or password.
Step 2: Access File System
a. The datalogger must be set up for Ethernet communications as explained in
Sections 4.1,
Physical Setup
, and 0,
Communicating via Ethernet
(Step 1
only).
b.
Open a Windows Explorer window. Enter
ftp://username:[email protected]
where nnn.nnn.nnn.nnn is the
IP address of the datalogger.
If the user name is “anonymous” with no password, enter
ftp://nnn.nnn.nnn.nnn
where nnn.nnn.nnn.nnn is the IP address of
the datalogger.
7.1.3.2
FTP Client
The datalogger can also act as an FTP Client to send a file to or get a file from an
FTP Server (for example, another datalogger or web camera). This is done using
the
FTPClient()
instruction. The following program is an example of using
FTPClient()
to send a file to another datalogger and get a file from that
datalogger. The first parameter in the instruction is the
FTP Server’s IP address
.
The second parameter is the
FTP username
. The third parameter is the
FTP
password
. The fourth parameter is the
local filename
. The fifth parameter is the
remote file name
. The final parameter is the
put/get option
: 0 for put and 1 for
get. The instruction returns –1 if the instruction was successful and 0 if it was not.
PROGRAM
' CR1000
' FTPClient.cr1
Public Result1, Result2
BeginProg
Scan (20,Sec,1,1)
Result1 = FTPClient("192.168.7.85","user","password","CRD:pic.jpg","CRD:pic.jpg",0)
Result2 = FTPClient("192.168.7.85","user","password","CRD:file.html","CRD:file.html",1)
NextScan
EndProg
NOTE
NOTE