Sie sind auf Seite 1von 60

ADAM-5510E TCP

2005 H2 AE Training

IAG/AE : Andersen Kao


Agenda

Introduction to Hardware
Specifications
Introduction to Internal File Structure
Introduction to Utility Functions
Introduction to Software Function
Demonstration of Software Function
Integrated Applications
Practice
Q&A
Introduction to Hardware
Specifications
CPU: 80188 microprocessor
Memory:
1.5MB flash memory:
- 256KB system Disk (Drive C: Read Only)
- 256KB flash memory (Accessed by Function LIB)
- 1024KB file 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
Introduction to Hardware
Specifications

Memory Comm. Interface


1.5MB Flash Disk 1 x 10/100 base-T Port
256KB System Flash 1 x RS-232 Programming Port
256KB Flash Memory 1 x RS-232 Port
1M File System 1 x RS-485 Port
640KB SRAM 1 x RS-232/485 Port
Up to 384KB Battery
Backup RAM
Introduction To Hardware
Specifications
Power
PowerSupply
SupplyModule
Module
No
NoLimitation
Limitationfor
forAO
AO

RS-232/485 Extensive Flash Memory


RS-232/485Port
Portfor
for Extensive Flash Memory RS-232/485
RS-232/485Port
Portfor
for
Modbus Includes 1MB Disk Drive with
ModbusDevices
Devices Includes 1MB Disk Drive with Remote I/O Modules
Remote I/O Modules
File System for Data Logging
File System for Data Logging
File I/O
640KB File I/O
640KBSRAM
SRAMwith
with384KB
384KB
Battery DIP
DIPSwitch
Switchfor
forSetting
BatteryBackup
Backup Setting
IDID&& Configuration
ConfigurationTool
Tool
Real-time
Real-timeClock
Clockfor
for
Recording Event History
Recording Event History
Support
SupportPanel
PanelMounting
Mounting
ororRack
RackMounting
Mounting
Prog.
Prog.Port
Portfor
forDownloading
Downloading
Programs
Programs 44oror88Slots
SlotsBackplane
Backplane

RS-485
RS-485Port
Portfor
forModbus
Modbus
Devices Versatile
Devices VersatileAI/AO/DI/DO
AI/AO/DI/DO
/Counter
Ethernet Port for Connecting e-World
Ethernet Port for Connecting e-World /CounterModules
Modules
Introduction To Hardware
Specifications
- Supported Module List
5051 Digital Input Module
Digital Input 5051D Digital Input Module
5052 Isolated DI Module

5056 Digital Output Module


5056D Digital Output Module
Digital Module Digital Output 5060 Relay Output Module
5068 Relay Output Module

Counter 5080 Counter/Frequency Module

Mixed I/O 5050 Digital I/O Module


5017 Analog Input Module
5017H Analog Input Module
Analog Input 5013 RTD Input Module
5018 T/C Input Module
Analog Module
Analog Output 5024 Analog Output Module

Communication Module 5090 Communication Module


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:55p
VDISK 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:43p
DLFMT 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
Internal File Structure
-The File Structure of Drive D

CONF <DIR> 09-11-2004 2:49p


WEBROOT <DIR> 09-11-2004 2:49p
AUTORUN 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 file (s) 97,664 bytes


816,128 bytes free

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


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

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


FTPD EXE
Introduction to Utility
Function

Host PC File Area ADAM-5510 TCP File Area

ADAM-5510 TCP Consol Mode


Basic Utility Operation-
Transferfile
Step 1: Select COM port
Basic Utility Operation
-Transfer file
Step 2: Press “Refresh” button to display the files in driver D of ADAM-5510 TCP
Basic Utility Operation
-Transfer file
Step 3: Press “Copy file to ADAM” to transfer files from host to the controller
Basic Utility Operation
- Configure IO
Press “ADAM Configuration” button to setup the IO modules of the controller
Basic Utility Operation
- Configure ADAM-5510/TCP
Press “ADAM-5510/TCP Configuration” to setup the IP address of the controller
Basic Utility Operation
- Configure ADAM-5510/TCP
This part includes three different parameter settings and one system initial function

Setting System IP.

Setting FTP Access Setting HTTP Access


Right. Right.

System Initialization.
The Configuration Process of
Utility - Configure ADAM-
5510/TCP
System Initialization function 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 utility
to 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 into
a folder <WEBROOT>
The Configuration Process
of 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
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
Function
With the original functions of ADAM-5510, ADAM-5510/TCP add 7
new Communication Protocols. It increases the integrating abilities
of the controller. The new functions are listed as below:
FTP (Client/Server)
HTTP (Client/Server)
MODBUS RTU (Client/Server)
ADAM-5090 with MODBUS RTU Client
MODBUS TCP (Client/Server)
E-MAIL
UDP (Client/Server)
TCP (Client/Server)

We provide the related Library Function or Utility for each individual


communication protocol. Each protocol will be introduced in further
detail in the following slides
Introduce to the Software
Function

Library 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

Utilities
HTTP & FTP Server
FTP Client
Send Mail
Introduce to the Software
Function - FTP server
FTP is the protocol for file transfer. You can only keep the continual ”FTPD.
exe” process by using the System Installation.
Step 1: Execute ”ADAM-5510/TCP Configuration” utility and set up system IP
Address
Introduce to the Software
Function - FTP server
Step 2: Configure the User ID , Password and Access Right for
FTP/HTTP protocol
Note: FTP and HTTP accounts should be set up at the same time
Introduce to the Software
Function - FTP server
Step 3: Restart ADAM-5510 TCP after the configuration is done. You can
check your IP setting by monitoring the console windows of Utility.
Introduce to the Software
Function - FTP server
Step 4: Transfer the FTPD.exe from Host PC to the location
“D:\WEBROOT\” of ADAM-5510/TCP
Introduce to the Software
Function - FTP 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
Function - FTP 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
Function - FTP server
Step 7: You can also upload the file to ADAM-5510/TCP thru FTP
protocol
Introduce to the Software
Function - FTP client
Step 1: In order to use FTP client, you should transfer the FTP.exe to
ADAM-5510 TCP
Introduce to the Software
Function - FTP client
Step 2: You can test the FTP client in console mode by logging in with
the correct ID/Password
Introduce to the Software
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.

Ethernet
5510
HTML CGI
LIB

User/IE browser

HTTP Server
Introduce to the Software
Function - Http Server
Step 1: Upload the HTTPD. exe to ADAM-5510/TCP thru utility
Introduce to the Software
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
Function - Http Server
Step 4: Connect to ADAM-5510TCP thru IE browser with correct
ID/Password
Introduce to the Software
Function - Http Server
Step 5: Monitoring ADAM-5510/TCP I/O Status thru IE browser
Introduce to the Software
Function - Modbus RTU
The structure of Modbus can be divided into Client and Server.
Server
Server is a data provider such as our ADAM-4000 Modbus series modules. They
belong to the Modbus Server.
The other one is called Modbus Client which requests data from Modbus Server.
Most of the SCADA software play as the role of a Client.
ADAM-5510/TCP provides related library functions for both Client and Server.
ADAM-4000
Modbus Client
RS-485 Modbus Server

SCADA
Modbus Server Modbus Client

RS-485
Introduce to the Software
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 will
introduce details for each of them in the following slides
Introduce to the Software
Function - Modbus RTU
01:

bool ADAMRTU_ReadCoilStatus(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);
02:

bool ADAMRTU_ReadInputStatus(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);
Introduce to the Software
Function - Modbus RTU
03:

bool ADAMRTU_ReadHoldingRegs(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);
04:

bool ADAMRTU_ReadInputRegs(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);
Introduce to the Software
Function - Modbus RTU

05:

bool ADAMRTU_ForceSingleCoil(
int iPort,
int i_iAddr,
int i_iCoilIndex,
int i_iData
);

06:

bool ADAMRTU_PresetSingleReg(
int iPort,
int i_iAddr,
int i_iRegIndex,
int i_iData
);
Introduce to the Software
Function - Modbus RTU
0F:
bool ADAMRTU_ForceMultiCoils(
int iPort,
int Slave_Addr,
int CoilIndex,
int TotalPoint,
int TotalByte,
unsigned char szData[]
);

10:
bool ADAMRTU_PresetMultiRegs(
int iPort,
int i_iAddr,
int i_iStartReg,
int i_iTotalReg,
int i_iTotalByte,
unsigned char i_szData[]
);
Introduce to the Software
Function - Modbus RTU
z Initial Modbus Port:

int Modbus_COM_Init(
int Port,
int iMode,
unsigned long iBaud,
int iParity,
int iFormat,
int iStopBits
);

z Release Modbus Port:

void Modbus_COM_Release(int Port);

z Error Check:

int Error_Code(void);
Introduce to the Software
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:

z void ADAMRTU_ModServer_Create(
int slave_addr,
unsigned char * ptr_mem,
unsigned int size_of_mem
);
Introduce to the Software
Function - Modbus RTU

Aside from default settings, COM port can get data from Modbus
Server. We can also get Modbus Server data thru ADAM-5090 to
increase system integration ability
The limitation for ADAM-5090 is that ADAM-5090 can only be a
Modbus client and can't be a Modbus Server

RS-232
ADAM-4520 ADAM-4055

ADAM-5090 RS-485
Introduce to the Software
Function - Modbus RTU
01:

bool A5090_RTU_ReadCoilStatus(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);

02:

bool A5090_RTU_ReadInputStatus(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);
Introduce to the Software
Function - Modbus RTU
03:

bool A5090_RTU_ReadHoldingRegs(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);

04:

bool A5090_RTU_ReadInputRegs(
int iPort,
int i_iAddr,
int i_iStartIndex,
int i_iTotalPoint,
int *o_iTotalByte,
unsigned char o_szData[]
);
Introduce to the Software
Function - Modbus RTU

05:

bool A5090_RTU_ForceSingleCoil(
int iPort,
int i_iAddr,
int i_iCoilIndex,
int i_iData
);

06:

bool A5090_RTU_PresetSingleReg(
int iPort,
int i_iAddr,
int i_iRegIndex,
int i_iData
);
Introduce to the Software
Function - Modbus RTU
0F:

bool A5090_RTU_ForceMultiCoils(
int iPort,
int Slave_Addr,
int CoilIndex,
int TotalPoint,
int TotalByte,
unsigned char szData[]
);

10:

bool A5090_RTU_PresetMultiRegs(
int iPort,
int i_iAddr,
int i_iStartReg,
int i_iTotalReg,
int i_iTotalByte,
unsigned char i_szData[]
);
Introduce to the Software
Function - Modbus RTU
z Initial Modbus Port:

int Modbus_5090_Init(
int Port,
unsigned long iBaud,
int iParity,
int iFormat,
int iStopBits
);

z Release Modbus Port:

void Modbus_5090_Release(int Port);

z Error Check:

int Error_Code(void);
Introduce to the Software
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
Function - Modbus TCP
MODBUS TCP CLIENT:
01:
int ADAMTCP_ReadCoilStatus( SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int StartIndex,
int TotalPoint,
int * ByteCount,
char * wData
);
02:
int ADAMTCP_ReadInputStatus( SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int StartIndex,
int TotalPoint,
int * ByteCount,
char * wData
);
Introduce to the Software
Function - Modbus TCP
03:
int ADAMTCP_ReadHoldingRegs( SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int StartIndex,
int TotalPoint,
int * ByteCount,
char * wData
);
04:
int ADAMTCP_ReadInputRegs( SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int StartIndex,
int TotalPoint,
int * ByteCount,
char * wData
);
Introduce to the Software
Function - Modbus TCP

05:
int ADAMTCP_ForceSingleCoil(
SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int CoilIndex,
int Data
);
06:
int ADAMTCP_PresetSingleReg(
SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int RegIndex,
int Data
);
Introduce to the Software
Function - Modbus TCP
0F: int ADAMTCP_ForceMultiCoils( SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int CoilIndex,
int TotalPoint,
int TotalByte,
unsigned char szData[]
);
10: int ADAMTCP_PresetMultiRegs( SOCKET * SO,
int WaitMilliSec,
int Slave_Addr,
int StartReg,
int TotalReg,
int TotalByte,
unsigned char Data[]
);
Introduce to the Software
Function - Modbus TCP
z MODBUS TCP Client connect:

int ADAMTCP_Connect(
SOCKET * SO,
char * Target_IP,
int Target_Port
);
z TCP/IP Disconnect:

bool ADAMTCP_Disconnect(SOCKET * SO);

z Error Check:

int ReturnErr_code(void);
Introduce to the Software
Function - Modbus TCP

MODBUS TCP SERVER:

z Server Create:
int ADAMTCP_ModServer_Create(
int Host_Port,
unsigned long waittimeout,
unsigned int numberConns,
unsigned char * ptr_mem,
int size_mem
);
z Server Update:
int ADAMTCP_ModServer_Update(void);

z Server Release:
void ADAMTCP_ModServer_Release(void);
Introduce to the Software
Function - Modbus TCP
Here is an example program for combining the Modbus TCP
Utility shows that
Server with Modbus TCP Client. ADAM-5510 TCP gets
6024
data from Modbus
Server (ADAM6000)
SCADA
SYSTEM

TCP/IP

Modscan is to be a Modbus Client and get data from 5510


Modbus server
Introduce to the Software
Function - eMail
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" file 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 setting of ADAM-5510/TCP. We don’t provide the “Authorized SMTP Server”

Alarm!!
Introduce to the Software
Function - Socket

We also provide the Socket Library by providing the


related example program and library function for TCP
or UDP

TCP Client TCP Server UDP Client UDP Server


Introduce to the Software
Function - Socket
TCP Server TCP Client
Thank You!!

Das könnte Ihnen auch gefallen