Moxa Technologies Industio CP-114 Series CP-114 Series Bedienungsanleitung Seite 52

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 70
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 51
4-10 Industio CP-114 User's Manual
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
There is a dedicated RS-485 function in PComm or API-232 library. It 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.
Seitenansicht 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 69 70

Kommentare zu diesen Handbüchern

Keine Kommentare