Moxa NPORT 5110-T Bedienungsanleitung Seite 84

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 94
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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 */
Seitenansicht 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 93 94

Kommentare zu diesen Handbüchern

Keine Kommentare