Adam 5510 Tcp

Embed Size (px)

Citation preview

  • 8/11/2019 Adam 5510 Tcp

    1/60

    ADAM-5510E TCP

    2005 H2 AE Training

    IAG/AE : Andersen Kao

  • 8/11/2019 Adam 5510 Tcp

    2/60

    Agenda

    Introduction to Hardware

    SpecificationsIntroduction to Internal File Structure

    Introduction to Utility Functions

    Introduction to Software Function

    Demonstration of Software Function

    Integrated ApplicationsPractice

    Q & A

  • 8/11/2019 Adam 5510 Tcp

    3/60

    Introduction to Hardware

    SpecificationsCPU: 80188 microprocessor

    Memory:1.5MB flash memory:

    - 256KB system Disk (Drive C: Read Only)

    - 256KB flash memory (Accessed by Function LIB)

    - 1024KB fi le system, 960KB for user applications (Drive D:Read/Write)

    640KB SRAM

    - up to 384KB with battery backup (Accessed by Function LIB)

    Operating System: ROM-DOS (MS-DOS 6.22 Compatible)Real-time Clock: yes

    Watchdog Timer: yes

  • 8/11/2019 Adam 5510 Tcp

    4/60

    Introduction to Hardware

    Specifications

    Memory Comm. Interface

    1.5MB Flash Disk

    256KB System Flash

    256KB Flash Memory1M File System

    640KB SRAM

    Up to 384KB Battery

    Backup RAM

    1 x 10/100 base-T Port

    1 x RS-232 Programming Port

    1 x RS-232 Port1 x RS-485 Port

    1 x RS-232/485 Port

  • 8/11/2019 Adam 5510 Tcp

    5/60

    Introduction To Hardware

    Specifications

    Real-time Clock forRecording Event History

    Real-time Clock forRecording Event History

    RS-485 Port for Modbus

    Devices

    RS-485 Port for Modbus

    Devices

    640KB SRAM with 384KB

    Battery Backup

    640KB SRAM with 384KB

    Battery Backup

    RS-232/485 Port forModbus Devices

    RS-232/485 Port forModbus Devices

    Versatile AI/AO/DI/DO

    /Counter Modules

    Versatile AI/AO/DI/DO

    /Counter Modules

    DIP Switch for Setting

    ID & Configuration Tool

    DIP Switch for Setting

    ID & Configuration Tool

    Ethernet Port for Connecting e-WorldEthernet Port for Connecting e-World

    RS-232/485 Port forRemote I/O Modules

    RS-232/485 Port forRemote I/O Modules

    Power Supply Module

    No Limitation for AO

    Power Supply Module

    No Limitation for AO

    Extensive Flash MemoryIncludes 1MB Disk Drive with

    File System for Data Logging

    File I/O

    Extensive Flash MemoryIncludes 1MB Disk Drive with

    File System for Data Logging

    File I/O

    4 or 8 Slots Backplane4 or 8 Slots Backplane

    Prog. Port for Downloading

    Programs

    Prog. Port for Downloading

    Programs

    Support Panel Mounting

    or Rack Mounting

    Support Panel Mounting

    or Rack Mounting

  • 8/11/2019 Adam 5510 Tcp

    6/60

  • 8/11/2019 Adam 5510 Tcp

    7/60

    Internal File Structure-The File Structure of Drive C

    AUTOEXEC BAT 57 04-03-2003 11:12a

    COMMAND COM 35,181 07-18-2000 6:22a

    TRANSFER EXE 11,944 02-11-1999 6:55pVDISK SYS 8,032 03-20-2003 7:10a

    CHKID EXE 6,520 04-26-2002 10:41a

    CONFIG SYS 72 07-13-2000 4:18p

    DLFFS EXE 14,936 01-14-2003 4:43pDLFMT EXE 15,059 09-26-1996 3:01a

    INIMODE EXE 6,636 04-03-2003 9:28a

    MEM EXE 7,726 03-20-2003 7:10a

    10 file (s) 106,163 bytes

    0 bytes free

  • 8/11/2019 Adam 5510 Tcp

    8/60

    Internal File Structure-The File Structure of Drive D

    CONF 09-11-2004 2:49p

    WEBROOT 09-11-2004 2:49pAUTORUN BAT 128 09-11-2004 2:49p

    AX8796 COM 13,312 09-11-2004 2:49p

    CFGIO EXE 35,328 09-11-2004 2:50p

    SOCKETP EXE 48,896 09-11-2004 2:50p

    6 fi le (s) 97,664 bytes816,128 bytes free

    SOCKET UPW (The Configuration File for IP Setting of ADAM-5510TCP)

    SOCKET CFG (The Configuration File for Access Right of ADAM-5510TCP)

    HTTPD EXE (The Folder to Put HTTP/FTP Process)

    FTPD EXE

  • 8/11/2019 Adam 5510 Tcp

    9/60

    Introduction to Utility

    Function

    Host PC File Area ADAM-5510 TCP File Area

    ADAM-5510 TCP Consol Mode

  • 8/11/2019 Adam 5510 Tcp

    10/60

    Basic Utility Operation-

    Transferfile

    Step 1: Select COM port

  • 8/11/2019 Adam 5510 Tcp

    11/60

    Basic Utility Operation

    -Transfer file

    Step 2: Press Refresh button to display the files in driver D of ADAM-5510 TCP

    Basic Utility Operation

  • 8/11/2019 Adam 5510 Tcp

    12/60

    Basic Utility Operation-Transfer file

    Step 3: Press Copy file to ADAM to transfer files from host to the controller

    B i Utilit O ti

  • 8/11/2019 Adam 5510 Tcp

    13/60

    Basic Utility Operation

    - Configure IO

    Press ADAM Configuration button to setup the IO modules of the controller

    Basic Utilit Operation

  • 8/11/2019 Adam 5510 Tcp

    14/60

    Basic Utility Operation

    - Configure ADAM-5510/TCP

    Press ADAM-5510/TCP Configuration to setup the IP address of the controller

  • 8/11/2019 Adam 5510 Tcp

    15/60

    Th C fi ti P f

  • 8/11/2019 Adam 5510 Tcp

    16/60

    The Configuration Process of

    Utility - Configure ADAM-

    5510/TCP

    System Initialization funct ion is used for formatting disk D. After format is completed,

    it will transfer default system files to disk D. You can also transfer different server utili tyto disk D after formatting

    If you want to transfer server utility to disk D after formatting,

    you should select the items here. The files will be transfer intoa folder

    The Configuration Process

  • 8/11/2019 Adam 5510 Tcp

    17/60

    The Configuration Processof Utility - System backup

    To prevent user from losing their source file, we provide a backup function to backup files from disk D to

    host PC

    Th C fi ti P f

  • 8/11/2019 Adam 5510 Tcp

    18/60

    The Configuration Process of

    Utility - System backup

    The backup process will generate an image file which allows image restores back to

    ADAM-5510 TCP

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    19/60

    Introduce to the Software

    Function

    With the original functions of ADAM-5510, ADAM-5510/TCP add 7new Communication Protocols. It increases the integrating abilitiesof the controller. The new functions are listed as below:

    FTP (Client/Server)

    HTTP (Client/Server)

    MODBUS RTU (Client/Server)

    ADAM-5090 with MODBUS RTU ClientMODBUS TCP (Client/Server)

    E-MAIL

    UDP (Client/Server)

    TCP (Client/Server)

    We provide the related Library Function or Util ity for each individualcommunication protocol. Each protocol will be introduced in further

    detail in the following slides

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    20/60

    Introduce to the SoftwareFunction

    Library FunctionsLibrary Functions

    System Functions

    Communication Functions

    Low Speed I/O Module Access Functions

    High Speed I/O Module Access Functions

    Counter/Frequency Module Access Functions

    MODBUS/TCP Server/Client LIB Functions

    MODBUS/RTU Master/Slave LIB Functions

    Sockets LIB Functions (Winsock Compatible)

    HTTP Function LIB for Showing Local Info

    UtilitiesUtilitiesHTTP & FTP Server

    FTP Client

    Send Mail

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    21/60

    Introduce to the SoftwareFunction - FTP serverFTP server

    FTP is the protocol for f ile transfer. You can only keep the continual FTPD.

    exe process by using the System Installation.

    Step 1: Execute ADAM-5510/TCP Configuration utili ty and set up system IP

    Address

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    22/60

    Introduce to the SoftwareFunction - FTP serverFTP server

    Step 2: Configure the User ID , Password and Access Right forFTP/HTTP protocol

    Note: FTP and HTTP accounts should be set up at the same time

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    23/60

    Introduce to the SoftwareFunction - FTP serverFTP server

    Step 3: Restart ADAM-5510 TCP after the configuration is done. You cancheck your IP setting by monitoring the console windows of Utility.

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    24/60

    Introduce to the Software

    Function - FTP serverFTP server

    Step 4: Transfer the FTPD.exe from Host PC to the location

    D:\WEBROOT\ of ADAM-5510/TCP

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    25/60

    Introduce to the Software

    Function - FTP serverFTP server

    Step 5: Execute FTPD /r under D:\WEBROOT\ in console mode. Then,the FTP server will be in going resident mode

    Go into the resident mode

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    26/60

    Introduce to the Software

    Function - FTP serverFTP server

    Step 6: Connect the FTP Server with IE Browser or some FTP client

    softwares by using the id and password set previously. You can

    also find the files under D:\WEBROOT\ from ADAM-5510 TCP

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    27/60

    Introduce to the Software

    Function - FTP serverFTP server

    Step 7: You can also upload the file to ADAM-5510/TCP thru FTP

    protocol

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    28/60

    Introduce to the Software

    Function - FTP clientFTP client

    Step 1: In order to use FTP client, you should transfer the FTP.exe to

    ADAM-5510 TCP

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    29/60

    Introduce to the Software

    Function - FTP clientFTP client

    Step 2: You can test the FTP client in console mode by logging in with

    the correct ID/Password

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    30/60

    Function - Http Server

    The application of HTTP Server is that user can monitor or control ADAM-

    5510/TCP thru web browser. The processes are as follow:

    (1)Registers a web page (user defined name.htm) from Server

    (2) Browse the page thru browser

    (3)Exchange the status between hardware and web page thru CGI interface.

    HTML CGI5510

    LIB

    Ethernet

    User/IE browser

    HTTP Server

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    31/60

    Function - Http Server

    Step 1: Upload the HTTPD. exe to ADAM-5510/TCP thru utili ty

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    32/60

    Function - Http Server

    Step 2: Execute HTTPD.EXE to keep the files running from the HTTP

    Server to system

    Step 3: Upload User program to ADAM-5510TCP and execute it

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    33/60

    Function - Http Server

    Step 4: Connect to ADAM-5510TCP thru IE browser with correct

    ID/Password

    Introduce to the Software

  • 8/11/2019 Adam 5510 Tcp

    34/60

    t oduce to t e So t a e

    Function - Http Server

    Step 5: Monitoring ADAM-5510/TCP I/O Status thru IE browser

  • 8/11/2019 Adam 5510 Tcp

    35/60

    Introduce to the SoftwareF ti

  • 8/11/2019 Adam 5510 Tcp

    36/60

    Function - Modbus RTU

    We provide 8 function codes for Modbus Client as follows:

    01: Read coil status (0X)

    02: Read Input status (1X)

    03: Read Holding register (4X)

    04: Read Input register (3X)

    05: Force Single coil (0X)06: Preset Single register (4X)

    0F: Force Multiple coils (0X)

    10: Preset Multiple registers (4X)

    We also provide the related demo program for testing, and willintroduce details for each of them in the following slides

  • 8/11/2019 Adam 5510 Tcp

    37/60

    Introduce to the SoftwareF ti

  • 8/11/2019 Adam 5510 Tcp

    38/60

    Function - Modbus RTU

    03:

    boolADAMRTU_ReadHoldingRegs(

    int iPort,

    int i_iAddr,int i_iStartIndex,

    int i_iTotalPoint,

    int *o_iTotalByte,

    unsigned char o_szData[]

    );04:

    boolADAMRTU_ReadInputRegs(

    int iPort,

    int i_iAddr,

    int i_iStartIndex,int i_iTotalPoint,

    int *o_iTotalByte,

    unsigned char o_szData[]

    );

  • 8/11/2019 Adam 5510 Tcp

    39/60

    Introduce to the SoftwareFunction M db RTU

  • 8/11/2019 Adam 5510 Tcp

    40/60

    Function - Modbus RTU

    0F:

    boolADAMRTU_ForceMultiCoi ls(

    int iPort,

    int Slave_Addr,int CoilIndex,

    int TotalPoint,

    int TotalByte,

    unsigned char szData[]

    );

    10:

    boolADAMRTU_PresetMultiRegs(

    int iPort,

    int i_iAddr,

    int i_iStartReg,

    int i_iTotalReg,

    int i_iTotalByte,

    unsigned char i_szData[]

    );

  • 8/11/2019 Adam 5510 Tcp

    41/60

    Introduce to the SoftwareFunction M db RTU

  • 8/11/2019 Adam 5510 Tcp

    42/60

    Function - Modbus RTU

    For Modbus Server, only one process should be executed in order

    to provide accesses to the data for the Client.

    Modbus Server:

    voidADAMRTU_ModServer_Create(

    int slave_addr,

    unsigned char * ptr_mem,

    unsigned int size_of_mem

    );

    Introduce to the SoftwareFunction Modbus RTU

  • 8/11/2019 Adam 5510 Tcp

    43/60

    Function - Modbus RTU

    Aside from default settings, COM port can get data from ModbusServer. We can also get Modbus Server data thru ADAM-5090 toincrease system integration ability

    The limitation for ADAM-5090 is that ADAM-5090 can only be aModbus client and can't be a Modbus Server

    RS-232

    RS-485ADAM-5090

    ADAM-4520 ADAM-4055

    Introduce to the SoftwareFunction Modbus RTU

  • 8/11/2019 Adam 5510 Tcp

    44/60

    Function - Modbus RTU

    01:

    boolA5090_RTU_ReadCoilStatus(

    int iPort,

    int i_iAddr,int i_iStartIndex,

    int i_iTotalPoint,

    int *o_iTotalByte,

    unsigned char o_szData[]

    );

    02:

    boolA5090_RTU_ReadInputStatus(

    int iPort,

    int i_iAddr,

    int i_iStartIndex,

    int i_iTotalPoint,

    int *o_iTotalByte,

    unsigned char o_szData[]

    );

    Introduce to the SoftwareFunction Modbus RTU

  • 8/11/2019 Adam 5510 Tcp

    45/60

    Function - Modbus RTU

    03:

    boolA5090_RTU_ReadHoldingRegs(

    int iPort,

    int i_iAddr,int i_iStartIndex,

    int i_iTotalPoint,

    int *o_iTotalByte,

    unsigned char o_szData[]

    );

    04:

    boolA5090_RTU_ReadInputRegs(

    int iPort,

    int i_iAddr,int i_iStartIndex,

    int i_iTotalPoint,

    int *o_iTotalByte,

    unsigned char o_szData[]

    );

    Introduce to the SoftwareFunction - Modbus RTU

  • 8/11/2019 Adam 5510 Tcp

    46/60

    Function - Modbus RTU

    05:

    boolA5090_RTU_ForceSingleCoil(

    int iPort,int i_iAddr,

    int i_iCoilIndex,

    int i_iData

    );

    06:

    boolA5090_RTU_PresetSingleReg(

    int iPort,

    int i_iAddr,

    int i_iRegIndex,

    int i_iData

    );

    Introduce to the Software

    F ti M db RTU

  • 8/11/2019 Adam 5510 Tcp

    47/60

    Function - Modbus RTU

    0F:

    boolA5090_RTU_ForceMultiCoils(

    int iPort,

    int Slave_Addr,int CoilIndex,

    int TotalPoint,

    int TotalByte,

    unsigned char szData[]

    );

    10:

    boolA5090_RTU_PresetMultiRegs(

    int iPort,

    int i_iAddr,int i_iStartReg,

    int i_iTotalReg,

    int i_iTotalByte,

    unsigned char i_szData[]

    );

    Introduce to the SoftwareFunction - Modbus RTU

  • 8/11/2019 Adam 5510 Tcp

    48/60

    Function Modbus RTU

    Initial Modbus Port:

    int Modbus_5090_Init(

    int Port,

    unsigned long iBaud,int iParity,

    int iFormat,

    int iStopBits

    );

    Release Modbus Port :

    void Modbus_5090_Release(int Port);

    Error Check:

    int Error_Code(void);

    Introduce to the SoftwareFunction - Modbus TCP

  • 8/11/2019 Adam 5510 Tcp

    49/60

    Function Modbus TCP

    Aside from MODBUS TCP, ADAM-5510 TCP also provide the

    related library function for both Client and Server.

    ADAM-5510 TCP/Modbus Client/Server

    SCADA/Modbus Client

    HUB ADAM-6000

    Modbus Server

    Introduce to the Software

    F ti M db TCP

  • 8/11/2019 Adam 5510 Tcp

    50/60

    Function - Modbus TCPMODBUS TCP CLIENT:

    01:

    intADAMTCP_ReadCoi lStatus( SOCKET * SO,

    int WaitMilliSec,

    int Slave_Addr,int StartIndex,

    int TotalPoint,

    int * ByteCount,

    char * wData

    );02:

    intADAMTCP_ReadInputStatus( SOCKET * SO,

    int WaitMilliSec,

    int Slave_Addr,

    int StartIndex,int TotalPoint,

    int * ByteCount,

    char * wData

    );

    Introduce to the SoftwareFunction - Modbus TCP

  • 8/11/2019 Adam 5510 Tcp

    51/60

    Function Modbus TCP

    03:

    intADAMTCP_ReadHoldingRegs( SOCKET * SO,

    int WaitMilliSec,

    int Slave_Addr,int StartIndex,

    int TotalPoint,

    int * ByteCount,

    char * wData

    );04:

    intADAMTCP_ReadInputRegs( SOCKET * SO,

    int WaitMilliSec,

    int Slave_Addr,

    int StartIndex,int TotalPoint,

    int * ByteCount,

    char * wData

    );

    Introduce to the SoftwareFunction - Modbus TCP

  • 8/11/2019 Adam 5510 Tcp

    52/60

    Function Modbus TCP

    05:

    intADAMTCP_ForceSingleCoil(

    SOCKET * SO,

    int WaitMilliSec,int Slave_Addr,

    int CoilIndex,

    int Data

    );

    06:

    intADAMTCP_PresetSingleReg(

    SOCKET * SO,

    int WaitMilliSec,

    int Slave_Addr,int RegIndex,

    int Data

    );

    Introduce to the Software

    Function Modbus TCP

  • 8/11/2019 Adam 5510 Tcp

    53/60

    Function - Modbus TCP

    0F: intADAMTCP_ForceMultiCoils( SOCKET * SO,

    int WaitMilliSec,

    int Slave_Addr,

    int CoilIndex,int TotalPoint,

    int TotalByte,

    unsigned char szData[]

    );

    10: intADAMTCP_PresetMultiRegs( SOCKET * SO,

    int WaitMilliSec,

    int Slave_Addr,

    int StartReg,

    int TotalReg,

    int TotalByte,

    unsigned char Data[]

    );

    Introduce to the Software

    Function M db TCP

  • 8/11/2019 Adam 5510 Tcp

    54/60

    Function - Modbus TCP

    MODBUS TCP Client connect:

    intADAMTCP_Connect(

    SOCKET * SO,

    char * Target_IP,

    int Target_Port

    );

    TCP/IP Disconnect:

    boolADAMTCP_Disconnect(SOCKET * SO);

    Error Check:

    int ReturnErr_code(void);

  • 8/11/2019 Adam 5510 Tcp

    55/60

  • 8/11/2019 Adam 5510 Tcp

    56/60

    Introduce to the SoftwareFunction - eMail

  • 8/11/2019 Adam 5510 Tcp

    57/60

    Away from the communication protocol above, ADAM-5510/TCP has a new function for

    Email. It is a useful function which sends mail automatically when the system are in

    warning or abnormal states. It can also avoid some kind of mistake which may cause a

    severe damage

    The Email function of ADAM-5510/TCP is made by two programs. One for "MakeMail.exe"and the other for " SendMail.exe" .

    User can only create a text file by using editor and save it into a " .DAT" f ile thru

    "MakeMail.exe". Then send the mail message by using "SendMail.exe"

    Note: There is a key point should be check. The function for sending a mail is thru the"SMTP Server . You should check if the IP of SMTP Mail Server is delivering the mail with

    the IP sett ing of ADAM-5510/TCP. We dont provide the Authorized SMTP Server

    Alarm!!

    Introduce to the SoftwareFunction - Socket

  • 8/11/2019 Adam 5510 Tcp

    58/60

    We also provide the Socket Library by providing therelated example program and library function for TCPor UDP

    TCP Client UDP Client UDP ServerTCP Server

    Introduce to the Software

    Function - Socket

  • 8/11/2019 Adam 5510 Tcp

    59/60

    Function Socket

    TCP Server TCP Client

  • 8/11/2019 Adam 5510 Tcp

    60/60

    Thank You!!