Moxa NPORT 5110-T Instrukcja Użytkownika Strona 84

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 94
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 83
NPort 5100 Series IP Serial LIB
8-3
Example Program
char
NPort 5100-Nip=”192.168.1.10”;
char buffer[255];
int port = 1;
int portid;
nsio_init();
portid = nsio_open(
NPort 5100ip, port);
nsio_ioctl(portid, B9600, (BIT_8 | STOP_1 | P_NONE) );
sleep(1000);
nsio_read(port, buffer, 200);
nsio_close(portid);
nsio_end();
/*data buffer, 255 chars */
/*1st port */
/* port handle */
/*initial IP Serial Library */
/*1st port,
NPort 5100 IP=192.168.1.10 */
/*set 9600, N81 */
/* wait for 1000 ms for data */
/* read
200 bytes from port 1 */
/* close this serial port */
/* close IP Serial Library */
Przeglądanie stron 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 93 94

Komentarze do niniejszej Instrukcji

Brak uwag