Moxa Technologies C168HS user manual Solution, Function in PComm or API-232 library. It

Page 76

There are 2 solutions to control RS-485 2-wire transmission.

Solution 1

The following model is common in RS-485 2-wire transmission.

sio_SetWriteTimeouts(port, 0); /* Set sio_write() into block mode if

 

for Windows NT and Windows 95/98 */

sio_RTS(port, 1);

/* Turn on RTS signal. The RS-485

 

port is ready for transmitting data. */

sio_write(port, buff, 10);

/* Write 10 byte characters in "buff".

 

The function blocks until last

 

character transmitted */

sio_RTS(port, 0);

/* Turn off RTS signal. The RS-485

 

port is ready for receiving data. */

sio_read(port, buff, 10);

/* Read 10 bytes */

Solution 2

function in PComm or API-232 library. It

There is a dedicated RS-485

integrates the above functions of solution 1 regarding sending data as one.

sio_putb_x(port, buff, tick ); /*

1.

Turn on RTS and ready for

 

 

transmitting data.

 

2.

Send data.

 

3.

Wait for tick time.

 

4.

Turn off RTS and ready for

 

 

receiving data. */

For more information on these functions, please refer to PComm library on-line Help file for Windows NT and Windows 95/98 or API-232.txt file for DOS, respectively

.

4-18Smartio C168H/HS User’s Manual

Image 76
Contents Smartio C168H/HS User’s Manual May 1999 6th EditionTrademarks Copyright NoticeDisclaimer 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 UartIntroduction Check ListOpt8A/Opt8B/Opt8S 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 Rx Fifo Trigger Port NumberTx Fifo Size 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 Unix SVR4.2 For SCO UNIX/OpenServerFor SCO UNIX/OpenServer For 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 Tx Fifo Trigger Port MonitoringRTS/CTS Hardware Flow Control 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 DiagnoseFunction in PComm or API-232 library. It SolutionThere is a dedicated RS-485 Connection Option Opt8x and Cable Wiring RS-232 Cable Wiring for Opt8A/B/C/D/SOpt8B/C DTE, DB25 Male Opt8A/S DCE, DB25 FemaleOpt8D DTE, DB9 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 SignalOperating System o Moxa Driver Version Moxa hardware settingsPC Host Return Procedure