Pc Communication Driver For Rs232 Port; Overview; Pc Communications Driver - Honeywell UMC800 Reference Manual

Rs232 communications
Hide thumbs Also See for UMC800:
Table of Contents

Advertisement

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.
8/99
RS232 Communications Reference Manual
PC Communication Driver
15

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rs232

Table of Contents