文件名称:
赫优讯产品TCP IP驱动手册.pdf
开发工具:
文件大小: 180kb
下载次数: 0
上传时间: 2019-11-01
详细说明:赫优讯产品TCP IP驱动手册pdf,赫优讯产品TCP IP驱动手册Table of contents
1 INTRODUCTION
1 Terms for this manual
2 Overview
3 Message Structure
2 USING SYSTEM SPECIFIC TCP/UDP IP APL.
21 Parameters…
2.2 Open Connection Endpoint
2.3 Establishing of a Connection(Device=Server)....
777
.4 Waiting for Incoming Connection(Device= Client)......
2.5 Sending and Receiving data
2.5.1 Examples
9
6 Avoiding TCP Send Delay
2.6.1 Acknowledge Message Format.
12
3 USING TCP/UDP IP DRIVER.
13
3.1 General
13
3.2 Operating systems
13
3 Function overview
13
.4 Contents for Windows 9x, Windows NT and Windows 2000..............14
3.5 Installation of the Device Driver.
15
3. 5. 1 Standard Registry Entries Windows 9x, Windows NT and Windows 2000..
16
3.5.2 Driver File Installation .
8
3.5.3 Driver Utilities.
.6 Configure the Windows 9x/2000/NT Driver..
19
7 Programming Instructions..
3.7.1 Include the Interface API in your Application
20
3.7.2 The Application Programming Interface
20
7.3 Hints
21
4 ERROR CODES∴
Dunn D
4.1 List of Error Numbers...
22
4.1.1 Error Codes ..
4.1.2 Hints
231
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
Introduction
Introduction
This manual describes the way of accessing hilscher devices with iP interfaces via
TCP/P or UDP/P and the application programming interface(API)to our devices. In
the following dEVICE stands for communication interface, the communication module
NetNode, NetLink or any other device from Hilscher with iP interface
The general mechanism of data transfer is protocol independent and for each hardware
the same procedure and is described therefore in the toolkit Manual ' genera
Definitions
All parameter and data have basically the description LSBMSB. This corresponds to
the convention of the Microsoft C compiler. The storage format of word oriented send
and receive process data of the handled I/O dEVICES is configurable
Values with a following h are in hexadecimal notation such as 1Eh =30. Values
without any following letter are in decimal notation
Supplementary information is contained in the following Manuals
Toolkit Manual 'General Definitions'(Tk: TKIT)
Protocol Interface Manuals of used protocols
Device Driver Manual Device Driver(Dd: DevDrv)
1.1 Terms for this manual
DPM
Dual-Port Memory this is the physical interface to all
communication board (DPM is also used for PROFIBUS-DP
Ma
aster)
CIF
Communication inter Face
COM
Communication Module
HOST
Application on the Pc or a similar device
DEVICE
Synonym for communication interfaces or communication
modules
RCS
Realtime Communicating System, this is the name of the
operating system that runs on the communication boards
DLL
ynamic Link Library
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
Introduction
1.2 Overview
There are two ways of accessing Hilscher devices via IP protocol
Using the IP Driver
Using the system specific IP stack Application Programming Interface (like
Windows or Berkley sockets)on the system directly
In both cases communication is made by sending and receiving messages over the
TCP/P or UDP/P protocol. The format and the meaning of these messages are
described in the Toolkit Manual General Definitions'(Tk:TKIT)and in Protocol
Interface manuals of the given protocol on the device. For Example: Using a Netlink
with ProFibus Master interface, the description is made in Protocol Interface manual
of ProFIBUs-DP Master(Pi: DPM)
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
Introduction
1.3 Message Structure
A message consists of an 8 byte message header, and optional 8 byte telegram
header and up to 247 bytes of user data
Message Header Used by the dEvice operating system for transporting and
address the message. This structure is fixed and constant
Telegram Header Defines the action for the protocol task
User data Send/received data
Parameter
Type Meaning
Msg. RX
byte
Receiving T ask
Message header
Msg. TX
byte
Sending task
Msg. Ln
byte
Data length
Msg. nr
byte
Identification Code
Msg. A
byte
Response Code
Error code
Msg B
byte
Command code
Msg. E
byte
Extension Code
Msg. DeviceAdr
byte
Communication Reference
Telegram Header
Msg. DataArea
byte
Data block
Msg. DataAdr
vord
Object Index
Msg. Datald
byte
Object Subid
Msg. Data Cnt
Data quantit
Msg DataType
byte
Data Type
Msg. F
Service
MSgD0-246]
byte
User data
Telegram User Data
byte
General structure of message
This is an example for a PROFIBUs-FMS command message. For other protocols the
structure is the same, but the containing parameters must be changed when Modbus
Plus is used for example, from communication reference to slave address, object index
to register address, or service to function code
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
Using System specific TCP/IP API
2 Using System specific TCP/UDP IP API
It is very simple to access a device from own applications via T CP/P or UDP/P. The
application just has to establish a IP connection and to send specified messages
If the device works as TCP/IP or UDP/IP server, an application has to work as tcP/P
or UdP/P client and has to open the connection If the device works as TcP/P or
UDP/P client, the device will establish the connection and the application has to wait
for incoming connections
The following section will describe the way of communication with the well known BSD
socket or Winsock model. Most IP Application Programming Interfaces(APi)are based
on these model
2.1 Parameters
Standard iP communication with hilscher devices is handled over tcP/P Port 1099
device is server. Other communication modes have to be configured on the devices, if
possible
Standard transmitter number (MESSAGE tx) in messages is 255(Oxff
2.2 Open Connection Endpoints
Open a socket with a the function cal
On Windows systems, call WSAStartupo before opening a socket
Bind the successfully opened socket to local IP address with function
2. 3 Establishing of a Connection(Device Server)
Connect the bound socket to the server with function call
);
2.4 Waiting for Incoming Connection(Device client)
Set socket in listen state
Wait for incoming connection on socket in listen state
);
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
Using System specific TCP/IP API
2.5 Sending and Receiving Data
After a successful connect you can send and receive messages with the function calls
Please see your system specific development documentation for further details
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
Using System specific TCP/IP API
2.5.1 Examples
2.5.1.1 Application in client mode
The following shows a simple example to establish a TCP/IP connection(device
server )and sending and receiving a message with Windows sockets
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
Using System specific TCP/IP API
10
Copyright* Hilscher Gesellschaft fur Systemautomation *Dd: TCPUDPIP#1EN
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.