Moxa Technologies Moxa Smartio C168H Manuel d'utilisateur Page 57

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 84
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 56
Serial Programming Tools
Smartio C168H/PCI User’s Manual 4-7
sio_SetWriteTimeouts(port, 0); /* Set sio_write() into block mode */
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
The PComm library contains a dedicated RS-485 function that integrates the functions
given in solution 1 regarding sending data.
sio_putb_x(port, buff, tick ); /* 1. Turn on RTS ; ready for transmitting data
.
2. Send data.
3. Wait for tick time.
4. Turn off RTS ; ready for receiving data. */
For more information about these functions, refer to the PComm library on-line Help
file for Windows NT and Windows 95/98.
Vue de la page 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 83 84

Commentaires sur ces manuels

Pas de commentaire