RS-485 Programming for Opt8J

If you intend to do RS-485 communication with Opt8J, please follow the RS-485 programming guide below and also refer to Chapter “Connection Option (Opt8x) and Cable Wiring” for more Opt8J RS-485 operation details.

The Opt8J supports only 2-wire half-duplex RS-485 communication. Data+/- pins are served for both data transmitting and receiving, depending on the RTS signal.

The port switch of each port should be set to On position. The port is for transmitting data if RTS is asserted and for receiving data if RTS is not asserted.

RTS scheme is suitable for any system, including Windows NT and Windows 95/98, DOS, or UNIX, that permits RTS control from application programs.

How to transmit and receive data under Windows NT and Windows 95/98

We recommend you to configure Smartio C168H/PCI ports as follows in order to acquire precise timing control in RS-485 2-wire transmission.

There are 2 solutions to control RS-485 2-wire transmission.

Solution 1

The following model is common in RS-485 2-wire transmission.

sio_SetWriteTimeouts(port, 0);

/* Set sio_write() into block mode */

sio_RTS(port, 1);

/* Turn on RTS signal. The RS-485 port is ready for t

 

ransmitting data. */

sio_write(port, buff, 10);

/* Write 10 byte characters in "buff". The function bl

 

ocks until last character transmitted */

sio_RTS(port, 0);

/* Turn off RTS signal. The RS-485 port is ready for

 

receiving data. */

sio_read(port, buff, 10);

/* Read 10 bytes */

4-6Smartio C168H/PCI User’s Manual

Page 50
Image 50
Moxa Technologies C168H user manual RS-485 Programming for Opt8J, Solution

C168H specifications

Moxa Technologies is renowned for its cutting-edge networking solutions, particularly in industrial applications. One of their standout products is the C168H, a versatile and robust industrial-grade communication device designed to facilitate seamless integration and data transmission in demanding environments.

The Moxa C168H is primarily an industrial serial device server that allows Ethernet access to serial devices. It supports up to 16 serial ports, making it ideal for applications requiring multiple connections and data handling capabilities. This flexibility is essential for industries like manufacturing, transportation, and energy, where numerous serial devices need to be monitored and controlled simultaneously.

A key feature of the C168H is its high-speed data transmission capability. The device supports RS-232/422/485 interfaces, enabling reliable communication along long distances and in electrically noisy environments. The ability to convert serial communication to Ethernet and vice versa means that legacy serial devices can be seamlessly integrated into modern network infrastructures. This feature is particularly beneficial for businesses looking to upgrade their systems without completely overhauling existing equipment.

Another significant characteristic of the C168H is its robust build quality. Designed to operate in harsh industrial settings, the device is constructed with durable materials that can withstand extreme temperatures, vibrations, and electrical interference. This makes it an ideal solution for outdoor applications or environments with strict safety and operational standards.

In terms of connectivity, the C168H supports various networking protocols, including TCP/IP, UDP, and IP multicast. This versatility ensures that the device can be easily integrated into different network architectures, whether the requirement is for local area networks or extensive enterprise systems. Furthermore, it comes with advanced management features like web-based configuration and monitoring, simplifying the setup process and ongoing maintenance.

Moxa has also prioritized security in the design of the C168H. The device includes advanced encryption protocols that safeguard data transmission against unauthorized access. This is crucial as industrial IoT solutions become increasingly interconnected, and protecting sensitive information is paramount.

Overall, the Moxa C168H device server stands out for its combination of high-performance capabilities, rugged construction, flexible connectivity options, and enhanced security features. These characteristics make it a reliable choice for businesses looking to optimize their industrial communication systems and ensure efficient operation in an increasingly connected world. Whether for legacy systems needing an Ethernet interface or new installations, the C168H proves to be an indispensable tool in industrial networking.