Moxa Technologies C168HS user manual Mstatus

Page 68

until the output buffer has 'enough space' again. The criteria to tell if the output buffer has 'enough space' is whether the output buffer reached its 'low water' level. That is the output buffer will accept further data only when the 'low water' level is reached. If the 'low water' value is relatively small, you may find that the output buffer become empty before you write another block of data (this is quite possible because UNIX is time-sharing multitasking environment). This will result in discontinuous data transmission. In a timeout-sensitive application, e.g. facsimile (FAX) transmission, discontinuous data may falter the operation.

The default 'low water' is 512 bytes. You can enlarge it but better not exceed one half of the output buffer. Each port's output buffer is 32K bytes.

Syntax for SCO UNIX/OpenServer

#define MLOWATER

0x405

int

lowater; /* low water value of output buffer

 

(default = 512 bytes) */

ioctl(moxa_fd, MLOWATER, lowater);

Syntax for UNIX SVR4.2

 

#include

<sys/stropts.h>

#include

<sys/sysmacros.h>

#define MLOWATER

0x405

struct strioctl

ioc;

int lowater; /* low water value of output buffer (default = 512 bytes) */ ioc.ic_cmd = MLOWATER;

ioc.ic_timout = 0; ioc.ic_len = sizeof(int); ioc.ic_dp = (char *)&lowater; ioctl(moxa_fd, I_STR, &ioc);

6. MSTATUS

This function is used to know the RS-232 line status (CTS/DSR/DCD).

4-10Smartio C168H/HS User’s Manual

Image 68
Contents Smartio C168H/HS User’s Manual May 1999 6th EditionDisclaimer Copyright NoticeTrademarks Moxa Internet Services Hardware Installation Software InstallationConnection Option Opt8x and Cable Wiring TroubleshootingTable of Contents Connection Option Opt8x and Cable Wiring TroubleshootingSerial Programming Tools Technical ReferenceSmartio The Smart Multiport Async Solutions OverviewQuick Installation JP1Introduction Surge Protection Operating System SupportMoxa Serial Comm Tools Wide ApplicationsFeatures UartOpt8A/Opt8B/Opt8S Check ListIntroduction Opt8C/Opt8D Opt8F/Opt8ZRS-422 Mode Introduction Opt8JInstallation Guide RS-485 ModeDefault Settings Smartio C168 SeriesAddress INT Vector 0x1C0Quick Hardware Installation How to Do Quick Hardware InstallationHardware Installation with IO-IRQ Utility Configuration changedIO-IRQ Utility and Hardware Configuration Hardware Installation IRQ SpeedHardware Installation Normal Speed Spectrum High Speed Spectrum Software Installation Windows NTInstalling Driver Software Installation 4Smartio C168H/HS User’s Manual Tx Fifo Size Port NumberRx Fifo Trigger 6Smartio C168H/HS User’s Manual Configuring Board and Port 8Smartio C168H/HS User’s Manual Windows 95/98 Updating DriverRemoving Driver Driver10Smartio C168H/HS User’s Manual Software Installation 12Smartio C168H/HS User’s Manual Software Installation 14Smartio C168H/HS User’s Manual Updating Driver 16Smartio C168H/HS User’s Manual DOS Driver Setup Software Installation 20Smartio C168H/HS User’s Manual Software Installation Loading Driver Unix Unloading Driver# /tmp/moxa/mxinstall # cdSCO Unix # moxaadmFor SCO UNIX/OpenServer For Unix SVR4.2 For SCO UNIX/OpenServerFor Unix SVR4.2 Moxa TTY Device Naming Convention Baud Rate Settings Administration Utility moxaadmSoftware Installation Basic Configuration Non-Modem and Modem Baud RateAdvanced Configuration Baud Rate MappingLabel High/Normal Speed High Speed Low Band High Band RTS/CTS Hardware Flow Control Port MonitoringTx Fifo Trigger Software Installation Terminal Emulation Driver Removal Setting Moxa Ports to Terminal SCO UNIX/OpenServer36Smartio C168H/HS User’s Manual Installation Windows NT and Windows 95/98PComm Programming Library UtilitiesSerial Programming Tools Diagnostic for Moxa boards only Monitor for Moxa boards under Windows NT Only Serial Programming Tools Terminal Emulator Extended Unix Ioctl Commands Programming the Moxa PortsSyntax for SCO UNIX/OpenServer Syntax for Unix SVR4.2Mtcrts Mtcdtr Mstatus Mhwflow 12Smartio C168H/HS User’s Manual Utilities Terminal Emulator DOS API-232 Library Data Scope RS-485 Programming for Opt8J DiagnoseThere is a dedicated RS-485 SolutionFunction in PComm or API-232 library. It Connection Option Opt8x and Cable Wiring RS-232 Cable Wiring for Opt8A/B/C/D/SOpt8D DTE, DB9 Male Opt8A/S DCE, DB25 FemaleOpt8B/C DTE, DB25 Male Type 1 To connect Smartio C168 Series to a DTE device RTS CTS DSR DTR GND DCDType 2 To connect Smartio C168 Series to a DCE device Opt8B/C Opt8B/C DTE Device DB25 Male RS-422 Cable Wiring for Opt8J/F/Z Opt8D DTE Device DB9 Male DB25 MaleOpt8J/F/Z Followings are operation modes for RS-422 RS-485 Cable Wiring for Opt8J Opt8JRS-422/485 Impedance Matching 12Smartio C168H/HS User’s Manual General Troubleshooting Hardware causes and solutionsSoftware Causes and Solutions Step Io-irqRemove the jumper on position JP1 COM number of the Smartio C168 Series conflicts with others Windows NT system panic blue screenSoftware Cause and Solution Under UNIXs, the newly rebuilt kernel could not boot 8Smartio C168H/HS User’s Manual Specifications AppendixUart 16C550C SCO Xenix QNXPC I/O Port Address Map IO/ Address DeviceDB62 Connector Pinouts Pin no SignalPC Host Moxa Driver Version Moxa hardware settingsOperating System o Return Procedure