Moxa Technologies C218 user manual Programming the Moxa Ports, Extended Unix Ioctl Commands

Page 60

UNIX

Programming the MOXA Ports

The system calls that apply to standard tty port can also be applied to MOXA port since MOXA port conforms to UNIX tty standard. System calls are like open(), ioctl(), read(), write(), close(), etc. Please refer to your UNIX Programmer's Reference manual.

However, these system services only provide limited functions and thus may not satisfy the sophisticated programmers' need. In order to meet the user's special purpose, MOXA supports extended services through ioctl() command, which are:

1.

MIBUFED

(= 0x401)

To get byte count in input buffer.

2.

MOBUFED

(= 0x402)

To get byte count in output buffer.

3.

MTCRTS

(= 0x403)

To control RTS output signal.

4.

MTCDTR

(= 0x404)

To control DTR output signal.

5.MLOWATER (= 0x405) To set output buffer low water level.

6.

MSTATUS

(= 0x407)

To read modem line status (CTS/DSR/DCD).

7.

MHWFLOW

(= 0x40e)

To enable/disable the hardware flow control.

The next section details all the commands.

Extended UNIX Ioctl() Commands

The following lists the syntax of MOXA extended functions for both non-SVR4.x and SVR4.x UNIX. The variable moxa_fd is the returned file descriptor by open() a specific MOXA port. For example,

int moxa_fd;

moxa_fd = open("/dev/ttya11",O_RDWR);

1. MIBUFED

This function let you know how many bytes queued in input buffer when this function is issued.

4-6Intellio C218Turbo /PCI User's Manual

Image 60
Contents Intellio C218Turbo/PCI User’s Manual March 3rd EditionCopyright Notice TrademarksDisclaimer Moxa Internet Services About This Manual Table of Contents Troubleshooting Technical ReferenceIntellio The Intelligent Multiport Serial I/O Solutions PCI SolutionOverview Low Host Processor OverheadPowerful Serial Comm Developing Tools Asic Design, Compact SizeSurge/Isolation Protection Major Operating System SupportFeatures Check ListIntroduction Opt8A/Opt8B/Opt8S Opt8C/Opt8DOpt8F/Opt8Z Opt8JInstallation Guide Page Hardware Installation Installing the Intellio C218Turbo/PCI Control BoardInstalling Connection Option Opt8x Opt8J/Opt8F/Opt8Z Operating Opt8J Hardware Installation RS-422 Mode RS-485 ModePage Software Installation Windows NTInstalling Driver Software Installation Page Uart Fifo Page Configuring Board and Port Page Adding/Removing Board Updating DriverWindows 95/98 Removing DriverInstalling Driver Yes Software Installation First Time Driver Installation Stage WindowsPage Click Next Port Configuration Stage Software Installation Board and Port Ready Stage Without restarting the Windows 98 systemPage Configuring Board and Port Page Software Installation Uart Fifo Updating driver Unix For SCO Unix or SCO OpenServer or Xenix Driver will start successfully later Moxa TTY Device Naming Convention Administration Utility mxadm Basic ConfigurationNon-Modem and Modem Baud Rate Advanced Configuration On Board Line DisciplineBaud Rate Mapping Feature Response RTS/CTS Hardware Flow ControlSoftware Installation Performance Tuning Board ResetDriver Removal Setting Moxa Ports to Terminal Checking Board Initialization StatusPage Installation Windows NT and Windows 95/98PComm Programming Library UtilitiesSerial Programming Tools Diagnostic for Moxa boards only Monitor for Moxa boards under Windows NT Only Serial Programming Tools Terminal Emulator Extended Unix Ioctl Commands Programming the Moxa PortsMobufed Mtcrts Mlowater Mstatus Mhwflow Port Monitoring Serial Programming Tools Terminal Emulator Page Solution RS-485 Programming for Opt8JSolution Connection Option Opt8x and Cable Wiring RS-232 Cable Wiring for Opt8A/B/C/D/SOpt8A/S DCE, DB25 Female Connection Option Opt8x and Cable Wiring DTE DeviceOpt8D DTE Device Opt8B/C Opt8A/S DTE Device GND RTS CTS DTR DSR DCD RS-422 Cable Wiring for Opt8J/F/Z Followings are operation modes for RS-422 RS-485 Cable Wiring for Opt8J RS-485 Pinouts for Opt8JRS-422/485 Impedance Matching Page Troubleshooting General TroubleshootingSoftware Causes and Solutions Windows NT system panic blue screen Moxa port responds too slowly or abnormal key operation Newly rebuilt kernel could not boot Page Specifications AppendixDual-Ported RAM Unix SVR4.2 XenixDB62 Connector Pinouts Uart 16C550CProblem Report Form Intellio C218Turbo/PCIReturn Procedure

C218 specifications

Moxa Technologies, a leader in the field of industrial networking and communication solutions, has made significant strides in enhancing operational technology with its C218 series of industrial Ethernet switches. The Moxa C218 is designed to meet the demanding requirements of industrial automation, ensuring robust performance and reliability in critical applications.

One of the standout features of the C218 series is its advanced networking capabilities. The switch supports Layer 2 switching functionality, which allows for efficient traffic management and improved network performance. With support for up to 8 Ethernet ports, the C218 can seamlessly connect multiple devices, ensuring that communication flows smoothly across the network.

The C218 is designed with resilience in mind, equipped with features such as redundancy support. It includes Rapid Spanning Tree Protocol (RSTP) and Media Redundancy Protocol (MRP), which minimize downtime and ensure continuous network operation even in the event of failures. These features make the C218 an ideal choice for mission-critical applications where reliability is paramount.

Another significant aspect of the C218 is its ability to withstand challenging environmental conditions. With an extended operating temperature range, the switch can handle extreme temperatures typical in industrial settings. Its ruggedized design protects against dust, moisture, and vibrations, ensuring that it performs consistently in harsh environments.

Security is a crucial consideration in modern industrial networks, and the C218 addresses this with built-in security features. The switch supports various authentication mechanisms and allows for VLAN configurations, helping to segment network traffic and protect sensitive data.

Moxa's C218 also provides convenience through its user-friendly management interface. It supports SNMP, allowing for simple network monitoring and management. Additionally, the switch's web-based management and command-line interface (CLI) make it easy for network administrators to configure and monitor the device efficiently.

In summary, the Moxa Technologies C218 switch is a reliable, feature-rich solution tailored for the industrial sector. With its excellent networking capabilities, robust design, environmental resilience, security features, and user-friendly management tools, the C218 is well-equipped to meet the demands of today's industrial automation challenges, helping businesses optimize their operations while ensuring network integrity.