Moxa Technologies C168HS user manual Mhwflow

Page 69

Serial Programming Tools

Syntax for SCO UNIX/OpenServer

 

#define MSTATUS

0x407

 

int

status;

/* status = RS-232 line status

*/

 

 

/* bit0¡ÐCTS (1:on, 0:off)

*/

 

 

/* bit1¡ÐDSR (1:on, 0:off)

*/

 

 

/* bit2¡ÐDCD (1:on, 0:off)

*/

ioctl(moxa_fd, MSTATUS, &status);

 

Syntax for UNIX SVR4.2

 

#define MSTATUS

0x407

 

#include

 

<sys/stropts.h>

 

#include

 

<sys/sysmacros.h>

 

struct strioctl

ioc;

 

int

 

status; /* status = RS-232 line status */

/* bit0¡ÐCTS (1:on, 0:off)

*/

/* bit1¡ÐDSR (1:on, 0:off)

*/

/* bit2¡ÐDCD (1:on, 0:off)

*/

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

7. MHWFLOW

This function is used to enable/disable hardware flow control. The first open() function of a port will set the hardware flow control bits on or off depending on the [RTS/CTS Hardware Flow Control] configuration in mxadm. However, users might want to control the DTR or RTS signal on their will, thus the RTS flow control bit should be turned off (HWFLowControlOff) in order to take over the control of DTR or RTS signal via function MTCRTS or MTCDTR. MTCRTS and MTCDTR can be effective only after the RTS flow control bit of MHWFLOW is turned off.

Smartio C168H/HS User’s Manual 4-11

Image 69
Contents May 1999 6th Edition Smartio C168H/HS User’s ManualCopyright Notice TrademarksDisclaimer Moxa Internet Services Software Installation Hardware InstallationConnection Option Opt8x and Cable Wiring TroubleshootingTable of Contents Troubleshooting Connection Option Opt8x and Cable WiringSerial Programming Tools Technical ReferenceOverview Smartio The Smart Multiport Async SolutionsJP1 Quick InstallationOperating System Support Introduction Surge ProtectionMoxa Serial Comm Tools Wide ApplicationsUart FeaturesCheck List IntroductionOpt8A/Opt8B/Opt8S Opt8F/Opt8Z Opt8C/Opt8DIntroduction Opt8J RS-422 ModeRS-485 Mode Installation GuideSmartio C168 Series Default SettingsAddress INT Vector 0x1C0How to Do Quick Hardware Installation Quick Hardware InstallationConfiguration changed Hardware Installation with IO-IRQ UtilityIO-IRQ Utility and Hardware Configuration Hardware Installation Speed IRQHardware Installation Normal Speed Spectrum High Speed Spectrum Windows NT Software InstallationInstalling Driver Software Installation 4Smartio C168H/HS User’s Manual Port Number Rx Fifo TriggerTx Fifo Size 6Smartio C168H/HS User’s Manual Configuring Board and Port 8Smartio C168H/HS User’s Manual Updating Driver Windows 95/98Removing 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 Unloading Driver Unix# cd # /tmp/moxa/mxinstall# moxaadm SCO UnixFor SCO UNIX/OpenServer For Unix SVR4.2For SCO UNIX/OpenServer For Unix SVR4.2 Moxa TTY Device Naming Convention Administration Utility moxaadm Baud Rate SettingsNon-Modem and Modem Baud Rate Software Installation Basic ConfigurationBaud Rate Mapping Advanced ConfigurationLabel High/Normal Speed High Speed Low Band High Band Port Monitoring Tx Fifo TriggerRTS/CTS Hardware Flow Control Software Installation Terminal Emulation Driver Removal SCO UNIX/OpenServer Setting Moxa Ports to Terminal36Smartio C168H/HS User’s Manual Windows NT and Windows 95/98 InstallationUtilities PComm Programming LibrarySerial Programming Tools Diagnostic for Moxa boards only Monitor for Moxa boards under Windows NT Only Serial Programming Tools Terminal Emulator Programming the Moxa Ports Extended Unix Ioctl CommandsSyntax for Unix SVR4.2 Syntax for SCO UNIX/OpenServerMtcrts Mtcdtr Mstatus Mhwflow 12Smartio C168H/HS User’s Manual Utilities Terminal Emulator DOS API-232 Library Data Scope Diagnose RS-485 Programming for Opt8JSolution Function in PComm or API-232 library. ItThere is a dedicated RS-485 RS-232 Cable Wiring for Opt8A/B/C/D/S Connection Option Opt8x and Cable WiringOpt8A/S DCE, DB25 Female Opt8B/C DTE, DB25 MaleOpt8D DTE, DB9 Male RTS CTS DSR DTR GND DCD Type 1 To connect Smartio C168 Series to a DTE deviceType 2 To connect Smartio C168 Series to a DCE device Opt8B/C Opt8B/C DTE Device DB25 Male Opt8D DTE Device DB9 Male DB25 Male RS-422 Cable Wiring for Opt8J/F/ZOpt8J/F/Z Followings are operation modes for RS-422 Opt8J RS-485 Cable Wiring for Opt8JRS-422/485 Impedance Matching 12Smartio C168H/HS User’s Manual Hardware causes and solutions General TroubleshootingSoftware Causes and Solutions Io-irq StepRemove the jumper on position JP1 Windows NT system panic blue screen COM number of the Smartio C168 Series conflicts with othersSoftware Cause and Solution Under UNIXs, the newly rebuilt kernel could not boot 8Smartio C168H/HS User’s Manual Appendix SpecificationsSCO Xenix QNX Uart 16C550CIO/ Address Device PC I/O Port Address MapPin no Signal DB62 Connector PinoutsMoxa Driver Version Moxa hardware settings Operating System oPC Host Return Procedure