Moxa Technologies RS-422, RS-485 user manual Solution

Page 61

Serial Programming Tools

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_SetWr iteTimeouts(por t, 0);

/* Set sio_wr ite() into block mode if for

 

Windows NT and Windows 95/98 */

sio_RTS(por t, 1);

/* Tur n on RTS signal. The RS-485

 

por t is r eady for tr ansmitting data. */

sio_wr ite(por t, buff, 10);

/* Wr ite 10 byte char acter s in " buff" .

 

The

function blocks until last

 

char acter tr ansmitted */

sio_RTS(por t, 0);

/* Tur n off RTS signal. The RS-485

 

por t is r eady for r eceiving data. */

sio_r ead(por t, buff, 10);

/* Read 10 bytes */

Solution 2

 

in PComm or API-232 library. It

There is a dedicated RS-485 function

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

sio_putb_x(por t, buff, tick ); /*

1.

Tur n on RTS and r eady for

 

 

tr ansmitting data.

 

2.

Send data.

 

3.

Wait for tick time.

 

4.

Tur n off RTS and r eady for

 

 

r eceiving 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.

Industio CI-134 Series User’s Manual 4-11

Image 61
Contents Mar 1st Edition Industio CI-134 Series User’s ManualCopyright Notice Industio CI-134 Series User’s ManualTrademarks DisclaimerMoxa Internet Services Software Installation Hardware InstallationConnection Cable and Cable Wiring TroubleshootingTable of Contents Troubleshooting Connection Cable and Cable WiringTechnical Reference Introduction Industio The Industrial Multiport Async SolutionOverview Termination Resistors Ready for RS-422/RS-485 Automatic Data Direction Control for RS-485Surge/Isolation Protection Asic Design, Compact SizeIntroduction Quick InstallationOperating System Support Moxa Serial Comm ToolsBroad Applications FeaturesSCO Xenix QNX Check ListInstallation Guide First Thing to Do Interface Settings Hardware Installation0x1C0 Quick Hardware InstallationHow to Do Quick Hardware Installation Hardware Installation with IO-IRQ Utility IO-IRQ Utility and Hardware Configuration 6Industio CI-134 Series User’s Manual Address Port IndexSpeed Nor mal Speed Spectr um High Speed Spectr um Press F10 to save the configuration and exit the utility 10Industio CI-134 Series User’s Manual Windows NT Software InstallationInstalling Driver Software Installation 4Industio CI-134 Series User’s Manual Rx Fifo Trigger Port NumberTx Fifo Size 6Industio CI-134 Series User’s Manual Configuring Board and Port 8Industio CI-134 Series User’s Manual Removing Driver Updating DriverWindows 95/98 Software Installation 12Industio CI-134 Series User’s Manual Rx Fifo Trigger 14Industio CI-134 Series User’s Manual Updating Driver 16Industio CI-134 Series User’s Manual DOS Driver Setup Software Installation 20Industio CI-134 Series User’s Manual Por t number TxD buf size RxD buf size F5 Gr oup edit 22Industio CI-134 Series User’s Manual Unloading Driver Loading DriverWindows Software Installation Configuring Driver Baud Rate Settings 28Industio CI-134 Series User’s Manual Serial Programming Tools PComm InstallationWindows NT and Windows 95/98 PComm Programming Library Diagnostic for Moxa boards onlyUtilities Industio CI-134 Series User’s Manual Terminal Emulator DOS API-232 Library Installing API-232Data Scope 6Industio CI-134 Series User’s Manual Serial Programming Tools Diagnose Utility Windows Comm API Library Win16Existing Applications By RTS Mode For back-compatibility Automatic Data Direction Control Mode RecommendedRS-485 Programming Solution 12Industio CI-134 Series User’s Manual RS-422 Cable Wiring Connection Cable and Cable WiringCI-134 RS-422 Point-to-point RS-422 Broadcasting RS-485 Cable Wiring Impedance Matching and Termination Resistors For RS-422 Mode DB-37 Connector Pin OutsFor RS-485 Mode 6Industio CI-134 Series User’s Manual General Troubleshooting TroubleshootingHardware causes and solutions Software Causes and Solutions Io-ir q Remove the jumper on position JP1 Windows NT system panic blue scr een DOS Technical Reference SpecificationsUart TI550C IO/ Addr ess Device PC I/O Port Address MapProblem Report Form Return Procedure