NL115 Ethernet and CompactFlash® Module Revision: 12/11 C o p y r i g h t © 2 0 0 6 - 2 0 1 1 C a m p b e l l S c i e n t i f i c , I n c .
Warranty “PRODUCTS MANUFACTURED BY CAMPBELL SCIENTIFIC, INC. are warranted by Campbell Scientific, Inc. (“Campbell”) to be free from defects in materials and workmanship under normal use and service for twelve (12) months from date of shipment unless otherwise specified in the corresponding Campbell pricelist or product manual. Products not manufactured, but that are re-sold by Campbell, are warranted only to the limits extended by the original manufacturer.
Assistance Products may not be returned without prior authorization. The following contact information is for US and international customers residing in countries served by Campbell Scientific, Inc. directly. Affiliate companies handle repairs for customers within their territories. Please visit www.campbellsci.com to determine which Campbell Scientific company serves your country. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 227-2342.
NL115 Table of Contents PDF viewers: These page numbers refer to the printed version of this document. Use the PDF reader bookmarks tab for links to specific sections. 1. NL115 Ethernet/Compact Flash Module Overview ...1 1.1 Specifications........................................................................................ 1-1 1.2 Physical Description ............................................................................. 1-2 1.3 Power ..............................................................
NL115 Table of Contents 4. Programming............................................................ 4-1 4.1 The CardOut Instruction ....................................................................... 4-1 4.2 Program Examples ................................................................................ 4-1 4.2.1 Ring Mode................................................................................... 4-1 4.2.2 Fill and Stop Mode......................................................................
Section 1. NL115 Ethernet/CompactFlash® Module Overview Campbell Scientific's NL115 Ethernet/CompactFlash® Module provides two independent capabilities: (1) enables 10baseT Ethernet communications and (2) stores data on a removable CompactFlash card. It allows the datalogger to communicate over a local network or a dedicated Internet connection via TCP/IP. It also expands on-site data storage and provides the user with a convenient method of transporting data from the field back to the office.
Section 1. NL115 Ethernet/CompactFlash® Module Overview Software Requirements: LoggerNet 3.2 or later PC400 1.3 or later Dimensions: 4.0" x 3.5" x 2.5" (10.2 x 8.9 x 6.4 cm) Weight: 5.4 oz (154 g) FIGURE 1-1. NL115 Ethernet/CompactFlash Module 1.2 Physical Description The NL115 connects to a datalogger peripheral port and has a 10 Base T Ethernet port. It also has a slot for a Type I or Type II CompactFlash (CF) card (3.3V, 75 mA).
Section 1. NL115 Ethernet/CompactFlash® Module Overview 1.3 Power 1.3.1 Primary Power The Ethernet/CompactFlash Module is powered by 12 VDC received from the datalogger through the peripheral port. 1.3.2 Backup Power and Data Retention The module accepts CompactFlash (CF) cards which do not require power to retain data. Typically, a CF card can be erased and rewritten a minimum of 100,000 times. Industrial CF cards, graded for 2,000,000 write cycles, are recommended for most applications. 1.
Section 1. NL115 Ethernet/CompactFlash® Module Overview 1.5.2 Communicating via Ethernet Step 1 – Configure Datalogger 1-4 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 TCP/IP tab, input the IP Address, Subnet Mask and IP gateway.
Section 1. NL115 Ethernet/CompactFlash® Module Overview Step 2 – LoggerNet Set-up The next step is to run LoggerNet and configure it to connect to the datalogger via the Ethernet port. a. In LoggerNet’s Setup Screen press Add Root and choose IPPort. Input the datalogger’s IP address and port number. The IP address and port number are input on the same line separated by a colon. (The datalogger’s default port number is 6785.
Section 1. NL115 Ethernet/CompactFlash® Module Overview Step 3 – Connect You are now ready to Connect to your datalogger using the LoggerNet Connect screen. Datalogger program transfer, table data display, and data collection are now possible. 1.5.3 Programming the Datalogger to Send Data to the NL115 The CardOut instruction is used in the datalogger program to send data to the CF card. The CardOut instruction must be entered within each DataTable declaration that is to store data to the CF card.
Section 1. NL115 Ethernet/CompactFlash® Module Overview 1.5.4 Data Retrieval Data stored on cards can be retrieved through a communication link to the datalogger or by removing the card and carrying it to a computer with a CF adapter. With large files, transferring the CF card to a computer may be faster than collecting the data over a communication link. Data retrieval is discussed in detail in Section 5. CAUTION Removing a card while it is active can cause garbled data and can actually damage the card.
Section 1.
Section 2. TCP/IP Functionality This section describes the main TCP/IP functionality of a datalogger with an NL115 attached. Additional functionality may be added in the future. For more information, refer to the Information Services section of the datalogger manual and CRBasic Editor Help. 2.1 Communicating over TCP/IP Once the datalogger, the NL115, and LoggerNet have been setup as described in Sections 1.5.1 and 1.5.2, communications are possible over TCP/IP.
Section 2. TCP/IP Functionality BeginProg Scan (5,Sec,6,0) PanelTemp (PanelTemperature,250) Battery (BatteryVoltage) If not Route(4094) then Socket = TCPOpen ("192.168.7.231",6785,0) SendVariables (Result1,Socket,-1,4094,0000,100,"Public","Callback",dummy1,1) CallTable CLBK1 NextScan EndProg 2.1.2 Datalogger-to-Datalogger Communication Communications between dataloggers is possible over TCP/IP. In order to do this, a socket must be opened between the two dataloggers.
Section 2. TCP/IP Functionality BeginProg Scan(2,Sec,0,0) Socket = TCPOpen(“192.168.7.125”,6785,0) BatteryVoltage(BattVolt) PanelTemp(PTemp,250) GetVariables (Result1,Socket,-1,2,0000,50,"Public","BattVolt",BattVolt_Remote,1) SendVariables (Result2,Socket,-1,2,0000,50,"Public","PTemp",PTemp_Base,1) CallTable(Test) NextScan EndProg 2.2 HTTP Web Server Typing the datalogger’s IP address into a web browser will bring up its home page as shown in Figure 2-1.
Section 2. TCP/IP Functionality FIGURE 2-1. Datalogger Home Page If there is a default.html file on the datalogger, this will automatically become the user-configurable home page. The WebPageBegin/WebPageEnd declarations and the HTTPOut instruction can be used in a datalogger program to create HTML or XML files that can be viewed by the browser. For more information on using these instructions, see the datalogger manual or CRBasic Editor Help.
Section 2. TCP/IP Functionality FIGURE 2-2. FTP Root Directory FIGURE 2-3.
Section 2. TCP/IP Functionality In order to use FTP, the datalogger’s FTP User Name and FTP Password must be set. This is done using Device Configuration Utility. Step 1 – Configure Datalogger NOTE 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.
Section 2. TCP/IP Functionality 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 2.4 Telnet Telnetting to the datalogger’s IP address allows access to the same commands as the Terminal Emulator in LoggerNet Connect screen’s Datalogger menu. 2.
Section 2. TCP/IP Functionality returned by the TCPOpen instruction. The third parameter is the timeout. The fourth parameter is the termination character. The last parameter is the maximum number of characters to expect per input. For more information on this instruction see the CRBasic Editor Help. SerialIn (Received,socket,0,13,100) 2.6.2 Serial Output The TCPOpen instruction must be used first to open up a TCP socket. An example of this instruction is shown below.
Section 2. TCP/IP Functionality 2.9 DNS The datalogger provides a DNS client that can query a DNS server to resolve a fully qualified domain name. When a DNS server is available, domain names can be used in place of the IP address in the datalogger instructions.
Section 2.
Section 3. File Formats This section covers the different types of files stored on the CF card. 3.1 Data Files The datalogger stores data on the CF card in TOB3 Format. TOB3 is a binary format that incorporates features to improve reliability of the CF cards. TOB3 allows the accurate determination of each record’s time without the space required for individual time stamps. TOB3 format is different than the data file formats created when data are collected via a communications link.
Section 3. File Formats CAUTION Test the power-up functions in the office before going into the field to ensure the power-up file is configured correctly. The key to the CF power-up function is the powerup.ini file, which contains a list of one or more command lines. At power-up, the powerup.ini command line is executed prior to compiling the program. Powerup.ini performs three operations: 1) Copies the specified program file to a specified memory drive.
Section 3. File Formats TABLE 3.3.1-1. Powerup.ini Commands Command Description 1 Run always, preserve CF data files 2 Run on power-up 5 Format 6 Run now, preserve CF data files 9 Load OS (File = .obj) 13 Run always, erase CF data files now 14 Run now, erase CF data files now By using PreserveVariables() instruction in the datalogger CRBASIC program, with options 1 & 6, data and variables can be preserved. EXAMPLE 3.3.1-1. Powerup.ini code.
Section 3. File Formats 3.3.3 Program Execution After File is processed, the following rules determine what datalogger program to run: 1) If the Run Now program is changed then it will be the program that runs. 2) If no change is made to Run Now program, but Run on Power-up program is changed, the new Run on Power-up program runs. 3) If neither Run on Power-up nor Run Now programs are changed, the previous Run on Power-up program runs. 3.3.4 Example Power-up.ini Files Example 3.3.4-1 through Example 3.3.
Section 3. File Formats 3.4 Camera Files JPEG images taken by a digital camera connected to the datalogger can be stored to the CF card rather than CPU memory. This is done by configuring the PakBus setting “Files Manager” for the datalogger. This can be done using the Device Configuration Utility or PakBus Graph.
Section 3. File Formats This is a blank page.
Section 4. Programming 4.1 The CardOut Instruction The CardOut Instruction is used to send data to a CF card. The CardOut Instruction must be entered within each DataTable declaration that is to store data to the CF card. Data is stored to the card when a call is made to the data table. CardOut (StopRing, Size) Parameter & Data Type StopRing Constant Size Constant Enter A code to specify if the Data Table on the CF card is fill and stop or ring (newest data overwrites oldest).
Section 4. Programming BeginProg Scan(1,SEC,3,0) PanelTemp(temp,250) CallTable Table1 NextScan EndProg 4.2.2 Fill and Stop Mode The following program outputs a sample of the panel temperature to the card once a second. The first parameter of the CardOut instruction is 1, which sets the table on the card to fill and stop mode. The second parameter (1000) is the number of records which will be written before the table is full and data storage stops.
Section 4. Programming these tables, once space for the fixed-size tables has been allocated. The datalogger will attempt to size the tables so that both of them will be full at the same time.
Section 4. Programming 4.3 Table Size and Mode The size of each data table in CPU memory is set as part of the DataTable instruction and the size of each data table on the CF card is set with the CardOut instruction. Because they are set independently, they can be different. It is important to note that if the CPU memory is set to fill and stop mode, once a table is full, all data storage to the table will stop. No more records will be stored to the CPU memory or the card.
Section 5. Data Retrieval Data stored on CF cards can be retrieved through a communication link to the datalogger or by removing the card and carrying it to a computer. 5.1 Via a Communication Link Data can be transferred to a computer via a communications link using one of Campbell Scientific’s datalogger support software packages (e.g., PC200, PC400, LoggerNet). There is no need to distinguish whether the data is to be collected from the CPU memory or a CF card.
Section 5. Data Retrieval 5.2 Transporting CF Card to Computer With large files, transferring the CF card to a computer may be faster than collecting the data over a link. CAUTION Removing a card while it is active can cause garbled data and can actually damage the card. Do not switch off the datalogger power if a card is present and active. To remove a card, press the control button on the NL115. The datalogger will transfer any buffered data to the card and then power off.
Section 5. Data Retrieval 5.2.2 Reinserting the Card If the same card is inserted again into the NL115, the datalogger will store all data to the card that has been generated since the card was removed that is still in the CPU memory. If the data tables have been left on the card, new data will be appended to the end of the old files. If the data tables have been deleted, new ones will be generated. NOTE Check the status of the card before leaving the datalogger.
Section 5. Data Retrieval 3. When ready to retrieve data, press NL115 button to remove card. LED will show red while the most current data is stored to the card and then go green. Eject card while LED is green. 4. Put in clean card (“CF-B”). 5. Use CardConvert to copy data from CF-A to PC and convert. The default CardConvert filename will be TOA5_stationname_tablename.dat. Once the data is copied, use Windows Explorer to delete all data files from the card.
Appendix A. Formatting CF Card The CF card can be formatted using 1) Windows Explorer, 2) the CR1000KD or 3) LoggerNet File Control. A.1 Windows Explorer To format card using Windows Explorer: 1) Insert CF card into CF adapter or CF reader. 2) Windows Explorer should identify a drive as a removable disk (F:\). 3) Select that drive and right click. 4) Choose Format.
Appendix A. Formatting CF Card 5) Choose FAT32 under file system, give the card a label, then Start. (The datalogger will work with either FAT or FAT 32.) A.2 CR1000KD To format card using the CR1000KD: 1) Insert CF card into NL115. 2) From Main Menu of CR1000KD choose PCCard. 3) Choose Format Card. 4) Choose Yes to proceed. A.3 LoggerNet File Control To format card using LoggerNet File Control: 1) Insert CF card into NL115. 2) Use LoggerNet to connect to datalogger.
Appendix A. Formatting CF Card 3) Choose FileControl under the Tools menu of the Connect screen. 4) Highlight CRD. 5) Press Format. 6) Press Yes to confirm.
Appendix A. Formatting CF Card This is a blank page.
Appendix B. PC/CF Card Information PC or CompactFlash (CF) cards provide a relatively inexpensive, off-the-shelf means of retrieving data from many of our CRBasic dataloggers or expanding the on-board datalogger memory. The datalogger’s memory can be expanded up to 2 Gbytes with the use of these cards. Some dataloggers can use either a PC or CF card, and others can only use a CF card with the appropriate expansion module. Table B-1 lists the compatibility between dataloggers and cards. TABLE B-1.
Appendix B. PC/CF Card Information found that SLC outperformed MLC, offering greater durability, running 300% faster in write mode, and 43% faster in read mode. While MLC Flash increases the overall density of data storage, which therefore decreases cost; it does so at the expense of data reliability, performance and memory management.
Appendix B. PC/CF Card Information References 1. “Implementing MLC NAND Flash for Cost-Effective, High-Capacity Memory”, written by Raz Dan and Rochelle Singer, September 2003, Rev 1.1, www.data-io.com/pdf/NAND/MSystems/Implementing_MLC_NAND_Flash.pdf. 2. “Advantages of SLC NAND Flash Memory”, www.mymemory.com.my/SLC%20VS%20MLC.html.
Appendix B.
Campbell Scientific Companies Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES www.campbellsci.com • info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA www.csafrica.co.za • cleroux@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA) PO Box 444 Thuringowa Central QLD 4812 AUSTRALIA www.campbellsci.com.au • info@campbellsci.com.au Campbell Scientific do Brazil Ltda.