Moxa Technologies WE-2100T Series Manual de usuario Pagina 7

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 50
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 6
Total Solutions for Industrial Device Networking
www.m o x a . c o m e - m a i l : i n f o @ m o x a . c o m
3-6
Serial Device Servers
3
char nportip=”192.168.1.10”;
char buffer[255];
int port = 1;
int portid;
nsio_init();
portid = nsio_open(nportip, 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 IP=192.168.1.10 */
/*set 9600, N81 */
/* wait for 1000 ms for data */
/* read 200 bytes from port 1 */
/* clost this serial port */
/* close IP Serial Library */
Server Control Port Control Input/Output Data Port Status Inquiry Miscellaneous
nsio_init nsio_open nsio_read nsio_lstatus nsio_break
nsio_end nsio_close nsio_SetReadTimeouts nsio_data_status nsio_break_on
nsio_resetserver nsio_ioctl nsio_write nsio_break_off
nsio_checkalive nsio_fl owctrl nsio_SetWriteTimeouts nsio_breakcount
nsio_DTR
nsio_RTS
nsio_lctrl
nsio_baud
nsio_resetport
The IP Serial Library is a collection of Windows functions for
NPort 5000 device servers. Serial command sets and common
subroutines are provided. The purpose of the library is to help
reduce complexity and increase efficiency when programming
for serial communication over TCP/IP. For example, the IP Serial
Library can be used to add new functionality to your Telnet
sessions, since Telnet can only transfer data and can not monitor or
configure serial line parameters.
IP Serial Library eases
programming for socket-based
serial communication
For programmers who are familiar with serial communication, the
IP Serial Library provides well-designed function calls that have the
same style as MOXAs PComm Library.
The IP Serial Library is amazingly simple and easy to understand.
By including the library in your VB, C, or Delphi programming
environment, you will be able to develop TCP/IP applications that
have control of serial communication parameters.
When Real COM mode is used, NPort serial device servers use
two TCP ports for communication between an attached device
and a host computer’s Real COM driver. The two ports, a data port
and a command port, provide pure data transfer without requiring
encoding and decoding. With the IP Serial Library, only one port is
used to communicate with a user's application, and no encoding or
decoding is required.
Why Use the IP Serial Library?
IP Serial Library Example
IP Serial API Function List
What is the IP Serial Library?
Vista de pagina 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 49 50

Comentarios a estos manuales

Sin comentarios