![Honeywell RS-232 Скачать руководство пользователя страница 25](http://html.mh-extra.com/html/honeywell/rs-232/rs-232_reference-manual_149050025.webp)
PC Communication Driver
8/99
RS232 Communications Reference Manual
15
3. PC Communication Driver for RS232 Port
3.1 Overview
General Information
The purpose of this communication driver is to support RS232 communication protocol. The
communication driver will be implemented as a .LIB file. The physical reads and writes will be done via
the ReadFile and WriteFile AFX messages, which are supported in Windows 95 and Windows NT. The
driver will not be backward compatible with Windows 3.1. Communication is in non-overlapped mode,
which means that the API functions will not return until a reply has been received or the port times out.
Utilization
This section explains how to utilize a Honeywell-supplied communication driver to access controller data
on a PC. The user must link the Honeywell supplied code library with a program of their own design using
Microsoft Visual C++ Version 5.0. The driver exposes a C++ interface and is useful only with C++
programs.
Disk Contents
The disk, which accompanies this document, contains an EXE (with source code) for a simple “peek &
poke” utility. It forms a sample of how to use the driver library and provides a useful tool for
experimenting with UMC800 communication.
Reads and Writes
The utility allows a user to read and write values of function block parameters. For simplicity, the utility
assumes that you will only write to parameters which are floating-point numbers. UMC800 Boolean (on-
off) parameters are floating point numbers with FALSE represented as 0.0 and TRUE represented as 1.0.
The utility represents a value read from the instrument as a floating-point number in the Value field and as a
raw byte stream in the Hex field.
PeekNPoke
Since this is a dialog-based application, most of the code which interests the programmer is in the module
PeekNPokeDlg.cpp. Of particular interest are the Read and Write button handlers, OnRead and OnWrite,
and the utility functions FormatCommErrString and XlateErrCode.
Hierarchy of Layers
The driver will consist of the following layers:
The API layer
•
Interfaces with the application via API functions.
•
Keeps track of unit address and message sequence number.
•
Traps errors that result from the instrument rejecting the message, replying to the wrong message, or
the wrong instrument replying.
•
Performs retries.
Содержание RS-232
Страница 12: ...Overview 2 RS232 Communications Reference Manual 8 99 ...
Страница 24: ...Protocol Description 14 RS232 Communications Reference Manual 8 99 ...
Страница 36: ...PC Communication Driver 26 RS232 Communications Reference Manual 8 99 ...
Страница 121: ...Function Parameter Index Reference 8 99 RS232 Communications Reference Manual 111 Static Configuration Parameters None ...
Страница 143: ...Function Parameter Index Reference 8 99 RS232 Communications Reference Manual 133 ...
Страница 150: ...Index 140 RS232 Communications Reference Manual 8 99 ...
Страница 151: ......
Страница 152: ...Industrial Automation and Control Honeywell Inc 1100 Virginia Drive Fort Washington Pennsylvania 19034 ...