720 likes | 1.07k Views
NPort Advanced Functions - Driver. Moxa Connectivity 2012-08. Advanced Functions – Overview. Secure. Firmware. Driver. Inactivity Timeout Delimiter Force Transmit Packet Length Connection Control. TCP Alive Check Timeout Max. Connection Ignore Jammed IP Allow Driver Control
E N D
NPort Advanced Functions- Driver Moxa Connectivity 2012-08
Advanced Functions – Overview • Secure Firmware Driver • Inactivity Timeout • Delimiter • Force Transmit • Packet Length • Connection Control • TCP Alive Check Timeout • Max. Connection • Ignore Jammed IP • Allow Driver Control • Command by Command • Authentication • Fast Flush • TX Mode • Auto Network Re-connection • Return Error If Network Is • Unavailable • Always Accept Open Requests • COM Grouping (NPort 5000) Serial Ethernet
Fast Flush Serial Ethernet
Fast Flush – Introduction Q : What is Fast Flush? When do I need to enable this function? Where can this function be used? Tips: When your program uses the PurgeComm function call, Fast Flush will avoid forcing the driver to query NPort firmware continuously when in Real Com mode
Fast Flush – Introduction • What is PurgeComm? • Before working with a port, we recommend clearing the buffers; sometimes there's also aneed to clear the bufferswhen working with ports. The PurgeComm function can be used for this purpose. This function can alsostop the read and write operations • What is Fast Flush? • Fast Flushis effective withPurgeCommfunction to directly flush thelocal bufferrather than queryingNPort firmwarecontinuously. • If you don’t use this function,it would take more time(about several hundred milliseconds) compared to native COM ports, especially when network traffic is very heavy.
A portmon (Port Monitor) is a 3rd party freeware utility and GUI/device driver combination that monitors and displays all serial port activity on a system.http://www.sysinternals.com/ntw2k/freeware/portmon.shtml Fast Flush – PurgeComm Introduction • You must make sure that your application program uses Win32 PurgeComm functions (IOCTL_SERIAL_PURGE) for NPort Serial-to-Ethernet communication. • You can use capture logs from the *Port Monitor utility to determine if PurgeComm functions exist.
< 10 ms AP PurgeComm Firmware Driver Flush firmware buffer Flush driver buffer >100 ms Fast Flush Enable <10 ms Fast Flush Disable > 100 ms Fast Flush – How does It Work? If Fast Flush isDISABLED……. It takes about >100 ms for PurgeComm AP 1. PurgeComm( ) But if Fast Flush is ENABLED……. Driver 2. Flush driver buffer It takes less than <10 ms for PurgeComm 4. Return “success” Firmware 3. Flush firmware buffer
Fast Flush – Where to Find It? Apply Change to activate this optional setting Apply Change to activate this optional setting NPort 5000 NPort 6000
TX Mode Serial Ethernet
TX Mode – Introduction Q : What is Hi-Performance and Classical in TX Mode? Where can this function be used? Tips: TX mode in RealCom Mode is available for better data performance and reliability
TX Mode – Where to Find It? NPort 6000 NPort 5000
Auto Network Re-connection Serial Ethernet
Auto Network Re-connection – Introduction Q : What is Auto Network Re-connection? Where can this function be used? Tips: When NPort does not respond to background “check alive” packets, the driver will repeatedly attempt to re- establish the TCP connection. The customer’s software doesn’t have to close the port then re-open it.
3. Check Alive 2. Crash or network is broken 4. No Response 5. Try to Re-connect Auto Network Re-connection – How does It Work? Host 1. Establish Connection Ethernet RealCOM mode
Serial Return Error If Network Is Unavailable Ethernet
Return Error If Network Is Unavailable – Introduction Q : What is Return Error If Network Is Unavailable? Tips: If the driver cannot establish the connection to NPort, calling the Win32 Comm function will result in the error return code “STATUS_NETWORK_UNREACHABLE”
3. 3. Call Win32 Comm 5. 2. Crash or network is broken 4. No Response 5. Return STATUS_NETWORK_UNREACHABLE Return Error If Network Is Unavailable – How does It Work? AP Host 1. Establish Connection Driver Ethernet RealCOM mode
Return Error If Network Is Unavailable – How does It Work? • When the driver cannot establish the connection to NPort, it will return 0xC000023C which means the network is unreachable.
Serial Always Accept Open Requests Ethernet
Always Accept Open Requests– Introduction Q : What is Always Accept Open Requests? Where can this function be used? Tips: Even the driver cannot establish the connection to NPort, user's software still can open the mapped COM port just like a onboard COM port.
2. 3. 1. Crash or network is broken 3. Open COM port OK. Always Accept Open Requests – How does It Work? AP Host 4. Try Establish Connection Driver Ethernet RealCOM mode
Always Accept Open Requests– Advanced Options • Put writing data in queue if network connection lost • Opened the COM port when NPort is offline • Start writing data to COM port • Stored the data • Send data to NPort while connects to it • Drop writing data if network connection lost • Opened the COM port when NPort is offline • Start writing data to COM port • Dropped the data
Serial COM Grouping Supported Models: NPort 5000 / 5000A Series NPort IA5000 / IA5000A Series Ethernet
COM Grouping– Introduction Q : What is COM Grouping? Where can this function be used? Tips: Designed to simulate the serial RS-485 multi-drop behavior over an Ethernet network.
COM Grouping– How does It Work? COM 4 Ethernet COM 4 Confidential
How to Configure COM Grouping? • Creating a COM Group • Adding a Port to a COM Group • Removing a Port from a COM Group • Deleting a COM Group • Modify Ports in a COM Group • Driver Support List: Confidential
1 2 Creating a COM Group (Step 1-3)Step1: Select group members Confidential
Step2: Group selected ports together 3 4 5 Confidential
Step3: Apply changes 6 Confidential
Adding a Port to a COM Group (Step 1-4)Step1: Select member 1 2 Confidential
3 4 5 Step2: Grouping Confidential
Step3: Confirming 6 Confidential
Step4: Apply changes 7 Confidential
Removing a Port from a COM Group (Step 1-3)Step1: Select port 1 2 Confidential
Step2: Change to a unused COM number 3 4 Confidential
Step3: Apply changes 5 Confidential
Deleting a COM Group (Step 1-3)Step1: Select COM Group 1 2 Confidential
3 4 5 Step2: Change COM number Confidential
Step3: Apply changes 6 Confidential
Modify Ports in a COM Group • Changing the COM Number of a COM Group • Changing Read/Write/Signal Status Permission • Changing Advanced Settings of the COM Group
Modify Ports in a COM Group-Changing the COM Number of a COM Group Step1: Select target COM Group 1 2 Confidential
Step2: Select target COM number 3 4 5 Confidential
Step3: Apply changes 6 Confidential
Modify Ports in a COM Group-Change Read/Write/Signal Status PermissionStep1: Select any COM port of target COM Group 1 2 Confidential
5 3 4 Step2: Enable the COM Group settings page Confidential