Moxa Technologies Your Essential Guide to the Moxa 5110 Manual and IP Serial LIB Functionality

Page 85

NPort 5110 Series User’s ManualIP Serial LIB

IP Serial LIB Function Groups

Server Control

Port Control

Input/Output Data

Port Status

Miscellaneous

 

 

 

Inquiry

 

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_flowctrl

nsio_SetWriteTimeouts

 

nsio_breakcount

 

nsio_DTR

 

 

 

 

nsio_RTS

 

 

 

 

nsio_lctrl

 

 

 

 

nsio_baud

 

 

 

 

nsio_resetport

 

 

 

Example Program

char NPort

/*data buffer, 255 chars */

5110-Nip=”192.168.1.10”;

char buffer[255];

/*1st port */

int port = 1;

/* port handle */

int portid;

/*initial IP Serial Library */

nsio_init();

/*1st port, NPort 5110

portid = nsio_open(NPort 5110ip,

IP=192.168.1.10 */

port);

/*set 9600,

N81 */

nsio_ioctl(portid, B9600, (BIT_8 /* wait for

1000 ms for data */

STOP_1 P_NONE) );

/* read 200

bytes from port 1 */

sleep(1000);

/* close this serial port */

nsio_read(port, buffer, 200);

/* close IP Serial Library */

nsio_close(portid);

 

 

nsio_end();

 

 

7-3

Image 85
Contents First Edition, December NPort 5110 Series User’s ManualCopyright Notice NPort 5110 User’s ManualTrademarks DisclaimerTable of Contents Ethernet Cables Ethernet Port Pinouts Serial Port PinoutsIntroduction Product Features Package ChecklistOverview Product Specifications Getting Started Panel Layout Connecting the HardwareConnecting the Power Connecting the HardwarePanel Layout Connecting to a Serial Device Connecting to the NetworkLED Indicators LED Name LED Color LED FunctionInitial IP Address Configuration NPort 5110 Administration Suite Factory Default IP AddressDefault IP address Initializing NPort 5110’s IP AddressTelnet Console Page Page Serial Console 19200, n, 8 Page Page Choosing the Proper Operation Mode TCP Client Mode TCP Server ModeReal COM Mode UDP ModePair Connection Mode Ethernet Modem Mode Web Console Configuration Opening Your Browser NPort 5110 Series User’s Manual Web Console Configuration Web/Telnet Console Basic SettingsServer name Web ConsoleIP configuration Network SettingsMethod Function Definition Netmask IP addressGateway DNS server 1 / DNS serverIP Address Report Snmp SettingsCommunity name ContactAuto report to IP Serial SettingsAuto report to TCP port Auto report periodSerial Parameters Real COM Mode Operating SettingsTCP alive check time Max connectionSetting Factory Default Necessity To 65535 ms Optional Setting Factory Default Necessity To FF hex None OptionalMax connection 2 to DelimiterInactivity time TCP Server ModeSetting Factory Default Necessity To FF None Optional Command port Setting Factory Default Necessity 4001 RequiredSetting Factory Default Necessity 966 Optional Local TCP portTCP Client Mode Delimiter Destination IP address 2/3/4 Destination IP addressTCP connect on UDP Mode Local listen port Pair Connection Slave Mode Pair Connection Master Mode Dial-in Ethernet ModemDial-out Disconnection request from local siteDisconnection request from remote site AT CommandsAT&D RegistersTCP port Setting Factory Default Necessity 4001 Required Accessible IP SettingsAuto Warning E-mail and Snmp Trap Auto Warning SettingsMail Server Snmp Trap Server Event TypeDSR changed DCD changedLoad Factory Defaults Change PasswordOverview Installing Windows Administrator Configuration Configuring Windows AdministratorInstalling Windows Administrator Page Page Page Configuration Broadcast Search Page Page Unlock Password Protection Unlock LockBlank FixedConfiguring NPort Page Upgrade Firmware Export/Import Monitor Select Add Target Page Page Page Page Port Monitor On-line COM Mapping COM MappingOn-line COM Mapping Off-line COM MappingSelect COM Settings to modify COM No., default setting, etc Page Fast Flush only flush local buffer Page Page Select Apply change Off-line COM MappingIP Location Page IP Serial LIB Why Use IP Serial Library? What is IP Serial Library?How to install IP Serial Library Example Program IP Serial LIB Function GroupsPinouts and Cable Wiring Ethernet Port Pinouts Serial Port Pinouts Port Pinout DiagramsDB9 Male RS-232 port pinouts for NPort Ethernet Cables Cable Wiring DiagramsWell Known Port Numbers TCP Socket Application ServiceNPort 5110 Series User’s Manual Well Known Port Numbers UDP Socket Application ServiceNPort 5110 Series User’s Manual Well Known Port Numbers Snmp Agents with MIB II & RS-232 Like Groups Address Translation MIB System MIB Interfaces MIBTCP MIB Snmp MIB Input Signal Table Output Signal Table Auto IP Report Protocol Info n Auto IP Report FormatID List AP ID & Hardware ID Mapping TableService Information Following services are provided Moxa Internet ServicesMoxa Product NPort Serial Number Problem Report Form Moxa NPortProduct Return Procedure