Telnet; Ping; Serial Server; Serial Input - Campbell NL116 Instruction Manual

Ethernet and compactflash module
Table of Contents

Advertisement

NL116 Ethernet and CompactFlash
' 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

7.1.4 Telnet

7.1.5 Ping

7.1.6 Serial Server

7.1.6.1 Serial Input

7.1.6.2 Serial Output

18
®
Module
PROGRAM
Telnetting to the datalogger's IP address allows access to the same commands
as the Terminal Emulator in the LoggerNet Connect screen Datalogger menu.
Pinging the datalogger's IP address may be used to verify communications.
With an NL116 attached, the datalogger can be programmed to act as a serial
server over the Ethernet port. (A serial server is a device that allows serial
communication over a TCP/IP port.) This function may be useful when
communicating with a serial sensor over an Ethernet.
The TCPOpen() instruction must be used first to open a TCP socket. An
example of this instruction is shown below. For more information on this
instruction, see the CRBasic Editor help.
socket = TCPOpen("",6784,100)
Once a socket has been opened with the TCPOpen() instruction, serial data
may be received with a SerialIn() instruction. An example of this instruction
is shown below. For more information on this instruction, see the CRBasic
Editor help.
SerialIn(Received,socket,0,13,100)
The TCPOpen() instruction must be used first to open a TCP socket. An
example of this instruction is shown below. For more information on this
instruction, see the CRBasic Editor help.
socket = TCPOpen("192.168.7.85",6784,100)

Advertisement

Table of Contents
loading

Table of Contents