Quatech MPAP-100 User Manual

Syncdrive plus communications software
Hide thumbs Also See for MPAP-100:

Advertisement

Quick Links

CONNECT WITH RELIABILITY
Syncdrive Plus

Communications Software

User's Manual
QUATECH, INC.
662 Wolf Ledges Parkway
Akron, Ohio 44311
Toll free: 1-800-553-1170
TEL: (330) 434-3154
FAX: (330) 434-1409
http://www.quatech.com
Syncdrive Plus
User's Manual P/N: 940-0184-100

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MPAP-100 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Quatech MPAP-100

  • Page 1: Communications Software

    CONNECT WITH RELIABILITY Syncdrive Plus Communications Software User’s Manual QUATECH, INC. 662 Wolf Ledges Parkway Akron, Ohio 44311 Toll free: 1-800-553-1170 TEL: (330) 434-3154 FAX: (330) 434-1409 http://www.quatech.com Syncdrive Plus User’s Manual P/N: 940-0184-100...
  • Page 2 Copyright Copyright © 1984 - 2003, Quatech, Inc. All rights are reserved. The information contained in this document cannot be reproduced in any form without the written consent of Quatech, Inc. Any software programs that might accompany this document can be used only in accordance with any license agreement(s) between the purchaser and Quatech, Inc.
  • Page 3: Table Of Contents

    Table of contents Introduction ----------------------------------------------------------------------------------------------------------------------- 1 System Requirements ---------------------------------------------------------------------------------------------------- 1 Installing Syncdrive plus ------------------------------------------------------------------------------------------------ 2 Synchronous communication with Syncdrive Plus -------------------------------------------------------------------- 6 Understanding BIT-synchronous formatting ---------------------------------------------------------------------- 6 Operational overview----------------------------------------------------------------------------------------------------------- 7 Data handling --------------------------------------------------------------------------------------------------------------- 7 Transmitting frames------------------------------------------------------------------------------------------------- 7 Receiving frames------------------------------------------------------------------------------------------------------ 8 Clocking parameters ------------------------------------------------------------------------------------------------------ 8 Include file structure------------------------------------------------------------------------------------------------------ 9 Operating under Windows 2000/XP ---------------------------------------------------------------------------------- 9...
  • Page 4 Quatech Syncdrive Plus User’s Manual Table of contents Table of figures Figure 1 - Found new hardware prompt ... 2 Figure 2 - Welcome screen ... 2 Figure 3 - Install Hardware Device Drivers screen... 3 Figure 4 - Locate Driver Files screen ... 3 Figure 5 - Insert installation disk prompt ...
  • Page 5: Introduction

    Relieves programmers of the burden of directly programming the synchronous communications hardware User can change or upgrade synchronous communication hardware with minimal modifications to the application software Support for all Quatech MPA-series PCI bus and PCMCIA adapters: MPAP-100: Multi-protocol RS-232 synchronous serial card MPAP-200/300: Multi-protocol RS-422/485 synchronous serial card MPAC-100: Single port RS-232 synchronous board.
  • Page 6: Installing Syncdrive Plus

    Step Procedure Press Next to continue. ! Step 3 Rev 01 (2/6/2003) Follow this procedure to install your Quatech Syncdrive Plus synchronous communication software. Description This is the CD that shipped with the MPAX-XXX adapter. The Found New Hardware prompt displays briefly, followed by the Found New Hardware Wizard’s Welcome screen.
  • Page 7: Figure 3 - Install Hardware Device Drivers Screen

    Step Procedure ! Step 4 Select the Search for a suitable driver for my device (recommended) option. Press Next to continue. Step Procedure ! Step 5 Select the Specify a location option. Press Next to continue. Rev 01 (2/6/2003) Figure 3 - Install Hardware Device Drivers screen Description The Locate Driver Files screen displays.
  • Page 8: Figure 5 - Insert Installation Disk Prompt

    Step Procedure ! Step 6 Browse to the correct drive location on your CD-ROM drive. Click OK to continue. Step Procedure ! Step 7 Select the Quainf.inf file and click Open. Rev 01 (2/6/2003) Figure 5 - Insert installation disk prompt Description The complete path is E:\Synchronous Adapters\Software\Windows 2000,...
  • Page 9: Figure 7 - Driver Files Search Results Screen

    Step Procedure ! Step 8 Make sure the directory path ends at the Quainf.inf file. Click Next to continue. Note: find your Syncdrive Plus adapter listed Windows Device Manager under Synchronous Communication Step Procedure Click Finish to continue. ! Step 9 Rev 01 (2/6/2003) Figure 7 - Driver Files Search Results screen Description...
  • Page 10: Synchronous Communication With Syncdrive Plus

    Synchronous communication with Syncdrive Plus Note: Syncdrive Plus uses synchronous communication for faster data transfer rates with less overhead. Understanding BIT-synchronous formatting Rev 01 (2/6/2003) Most data communications in personal computers is handled asynchronously using standard communication ports. Asynchronous communication transfers data one character at a time with significant overhead due to the addition of the start and stop bits required for each character.
  • Page 11: Operational Overview

    The Quatech board has a 1-KB transmit FIFO to supplement the 4- byte transmit FIFO in the Zilog ESCC chip. If it receives an end-of- frame (EOF) or the transmitter is not busy, the driver immediately transfers as much data as possible into the transmit FIFOs.
  • Page 12: Receiving Frames

    The receive logic works in a similar fashion to the transmit logic. The Quatech board has a 1-KB receive FIFO to supplement the 8-byte receive FIFO in the Zilog ESCC chip. If it receives a frame is that is...
  • Page 13: Include File Structure

    Link the application's object modules with the Syncdrive Plus API import library file QuaDLL.LIB. The file can be found in the \Synchronous Adapters\Software\Windows 2000, XP\Syncdrive Plus \Examples directory of the Quatech CD-ROM. Ensure that the Windows XP/2K device driver has been installed properly on the system.
  • Page 14: Syncdrive Plus Data Structures

    Syncdrive Plus data structures Note: This design ensures that the application uses the same header file as the driver files and helps to minimize difficult memory overwrite debugging. MPA_CONFIG Handles device configuration Syntax: typedef struct tagMPA_CONFIG ULONG union } set; ULONG ULONG ULONG...
  • Page 15 The baud rate in baud. Valid ranges are 1 to 1/6 of clock rate. BaudRate The clock rate in Hz. The clock rate is determined by the Quatech ClockRate hardware. Factory standard configuration is 9.8304 MHz. This value may be different if you are using custom-configured Quatech hardware.
  • Page 16 MPA_CONFIG Continued Parameters, cont.: The source of the transmit clock. Use the following enumeration to set TxClockSource clock source. Any other value is invalid. typedef enum tagCLOCK_SOURCE RTXC, TRXC, BAUD_RATE_GEN, DPLL } CLOCK_SOURCE; Selection for what should be output the TRxC pin. Use the following TRXCOutput enumeration to set TRxC source.
  • Page 17 MPA_DRIVER_VERSION Used to get driver version Syntax: typedef struct tagMPA_DRIVER_VERSION ULONG // Driver version is in format major.minor. UCHAR UCHAR } MPA_DRIVER_VERSION, *PMPA_DRIVER_VERSION; Description: Structure for retrieving driver version. Driver version is in format major.minor. API Functions Used: MPA_GetDriverVersion() only. Parameters: Length of the MPA_DRIVER_VERSION structure in bytes.
  • Page 18 MPA_NODE_ADDRESS Handles node addressing Syntax: typedef struct tagMPA_NODE_ADDRESS ULONG union } set; UCHAR BOOLEAN } MPA_NODE_ADDRESS, *PMPA_NODE_ADDRESS; Description: Used to set the device's node address and/or enable node addressing. API Functions Used: MPA_SetNodeAddress() only. Parameters: Length of the MPA_NODE_ADDRESS structure in bytes. Should be filled structLen in before calling MPA_SetNodeAddress().
  • Page 19 MPA_RESET_FRAMES Used to reset transmit and/or receive frames Syntax: typedef struct tagMPA_RESET_FRAMES ULONG BOOLEAN BOOLEAN } MPA_RESET_FRAMES, *PMPA_RESET_FRAMES; Description: Used to reset frames. Transmit and receive frames can be reset individually or simultaneously. API Functions Used: MPA_ResetFrames() only. Parameters: Length of the MPA_RESET_FRAMES structure in bytes. Should be filled structLen in before calling MPA_ResetFrames().
  • Page 20: Syncdrive Plus Application Programming Interface

    Syncdrive Plus application programming interface Note: All Syncdrive Plus API functions are prototyped in the QuaDLL.h Syncdrive Plus include file. Function MPA_Close() MPA_GetConfig() MPA_GetData() MPA_GetDriverVersion() MPA_GetFrameCount() MPA_GetFrameSize() MPA_GetModemControlSignals() MPA_GetTransferStatus() MPA_Open() MPA_PutData() MPA_ResetFrames() MPA_SetConfig() MPA_SetModemControlSignals() MPA_SetNodeAddress() Calling convention Return values Rev 01 (2/6/2003) There are a number of functions that make up the application programs entry points into Syncdrive Plus.
  • Page 21: Examples

    Examples Command reference MPA_Close () Close the MPA device Syntax: MPADLL_API MPA_ERROR_CODE IN const PMPA_HANDLE Description: Closes previously opened handle to the MPA device. Must be called when finished calling MPA_Xxx() functions. Return: Successful close. ERR_NO_ERROR Unsuccessful close. ERR_COULDNT_ CLOSE_DEVICE Device was not opened with MPA_Open().
  • Page 22 MPA_GetConfig () Continued Return, cont.: Device was not opened with MPA_Open(). ERR_DEVICE_ NOT_OPENED The structure size in structLen did not match size in driver. ERR_INVALID_ STRUCT_SIZE Communication error occurred between DLL and SYS. ERR_IOCTL_ ERROR Parameters: Handle to the open device obtained from MPA_Open(). pHandle The current configuration in a caller-supplied MPA_CONFIG structure.
  • Page 23 MPA_GetData() Continued Return, cont.: For non-overlapped I/O only. Bytes received differ from requested. Not ERR_INCORRECT_ necessarily an error if a larger buffer was allocated than required. NUM_BYTES_READ Device opened as overlapped but storage for an overlapped structure not ERR_INVALID_ passed in lpOverlapped. PARAMETERS_ PASSED The structure size in structLen did not match size in driver.
  • Page 24 MPA_GetDriverVersion () Continued Return, cont.: The structure size in structLen did not match size in driver. ERR_INVALID_ STRUCT_SIZE Communication error occurred between DLL and SYS. ERR_IOCTL_ERROR Parameters: Handle to the open device obtained from MPA_Open(). pHandle The driver version in a caller-supplied MPA_DRIVER_VERSION pVersion structure.
  • Page 25 MPA_GetFrameSize () Gets the size of the oldest received frame Syntax: MPADLL_API MPA_ERROR_CODE IN const PMPA_HANDLE OUT PMPA_FRAME_SIZE Description: Gets the frame size in bytes of the oldest received frame that hasn't been given to the caller via MPA_GetData(). This permits the caller to allocate the exact size buffer necessary prior to receiving the frame.
  • Page 26 MPA_GetModemControl Continued Signals () Return: Device was not opened with MPA_Open(). ERR_DEVICE_NOT_ OPENED The structure size in structLen did not match size in driver. ERR_INVALID_ STRUCT_SIZE Communication error occurred between DLL and SYS. ERR_IOCTL_ERROR Parameters: Handle to the open device obtained from MPA_Open(). pHandle The current configuration of the modem control signals in a caller- pModemCntlSig...
  • Page 27 MPA_GetTransferStatus() Continued Return: Driver failed to return correct status to DLL. Could indicate hardware ERR_TRANSFER_ failure. STATUS Parameters: Handle to the open device obtained from MPA_Open(). pHandle Pointer to the overlapped structure corresponding to the transfer that lpOverlapped status is requested. The amount of data that has been transferred.
  • Page 28 MPA_Open () Continued Parameters, cont.: The number specifying which device to open. For systems with a single deviceNumber card installed, this will always be 0. For 2-card systems, select 0 or 1 to specify which card. A single system supports up to 16 cards (0 through 15).
  • Page 29 MPA_PutData () Continued Parameters, cont.: Pointer to a caller-supplied buffer of data to be transferred. Each call to pBuffer MPA_PutData() sends the data in the buffer as a complete frame of data. The length of the buffer in bytes. bufferLen The number of bytes transmitted.
  • Page 30 MPA_SetConfig () Sets the configuration and gets the resulting configuration Syntax: MPADLL_API MPA_ERROR_CODE IN const PMPA_HANDLE IN const PMPA_CONFIG OUT PMPA_CONFIG Description: Sets the configuration for the device. The bits in the MPA_CONFIG union are used to indicate which parameter(s) are to be set. The driver ignores parameters associated with bits that are not set.
  • Page 31 MPA_SetModemControl Sets the modem control signal(s) and gets resulting configuration Signals() Syntax: MPADLL_API MPA_ERROR_CODE IN const PMPA_HANDLE IN const PMPA_MODEM_CNTL_SIG OUT PMPA_MODEM_CNTL_SIG Description: Sets the modem control signal(s) for the device. The bits in the MPA_MODEM_CNTL_SIG union are used to indicate which parameter(s) are to be set.
  • Page 32 MPA_SetNodeAddress () Sets the SDLC node address and/or enables addressing Syntax: MPADLL_API MPA_ERROR_CODE IN const PMPA_HANDLE IN PMPA_NODE_ADDRESS OUT PMPA_NODE_ADDRESS Description: Sets the SDLC node address for the device and/or enables addressing. The SDLC address is eight bits long and is used to designate which receiving station accepts a transmitted message.
  • Page 33: Using Example Programs

    LPBCKBI2K FDBCKBI2K SENDBI2K Rev 01 (2/6/2003) Quatech supplies numerous small console application example programs with Syncdrive Plus. These examples cover the various operating modes of the product. We also supply source code and executable files for each example program. We have tested the Syncdrive Plus example programs with Visual C++ 6.0©...
  • Page 34: Recbi2K

    RECBI2K THREADRX2K THREADTX2K Crossover cable Rev 01 (2/6/2003) This program receives single frames and runs in bit-synchronous mode. You can use it in tandem with SENDBI2K running on another computer by connecting two MPA-series adapters with a crossover cable. You can select configuration options on the command line. See Crossover cable below for pinouts.
  • Page 35: Troubleshooting

    1/6 of the input clock frequency. If you need a baud rate that cannot be achieved with the standard clock frequency, contact Quatech Technical Support. It may be possible to use a custom clock oscillator to change the available baud rate selections.
  • Page 36: Error Codes

    Error codes Note: The error code meaning may vary, depending on the Syncdrive Plus command. Error message ERR_NO_ERROR ERR_BAD_RETURN_SIZE ERR_COULDN’T_CLOSE_DEVICE ERR_COULDN’T_OPEN_DEVICE ERR_DATA_CRC ERR_DATA_OVERRUN ERR_DEVICE_NOT_OPENED ERR_ERROR_READING_DATA ERR_ERROR_WRITING_DATA ERR_INCORRECT_NUM_BYTES_READ ERR_INCORRECT_NUM_BYTES_WRITTEN ERR_INVALID_FOR_NON_OVERLAPPED ERR_INVALID_PARAMETERS_PASSED ERR_INVALID_STRUCT_SIZE ERR_IOCTL_ERROR ERR_IO_STILL_PROGRESSING ERR_NOTHING_TO_DO ERR_READ_PENDING ERR_TRANSFER_STATUS ERR_WRITE_PENDING Rev 01 (2/6/2003) The definitive source for error codes is the QuaDef.h include file.
  • Page 37: Appendix

    Appendix A Definitions Term API (Application Programming Interface) Asynchronous communication Bit-sync BRG (Baud Rate Generator) Byte-sync DPLL (Digital Phase Locked Loop) Rev 01 (2/6/2003) Definition An application program interface is the specific method prescribed by a computer operating system or by an application program by which a programmer writing an application program can make requests of the operating system or another application.
  • Page 38 The integrated circuit that handles the bulk of the hardware functions for the serial channel. Typically, the SCC will either be an AM85C30- 10 or Z85230-10 on Quatech MPA-series adapters. In general, synchronous is an adjective describing objects or events that are coordinated in time.

This manual is also suitable for:

Mpapr-100Mpap-200Mpap-300

Table of Contents