API I/O Access Over TruePort

API I/O Access Over TruePort

You can access IOLAN I/O data through TruePort using the Perle API. The API uses the command/response format. See the ioapiotp.c sample program, found on the product CD-ROM, for an example implementation.

API Request Format

All data in the Request must be sent as a single write to the COM port. The API command takes the following format:

Number of Bytes

Value

1Function Code (in hex):

z 01—Get read/write boolean register z 03—Get read/write register

z 04—Get read only register

z 15—Set read/write boolean register (0x0F) z 16—Set read/write register (0x10)

2Starting register number (see A4/T4 Registers , A4D2/A4R2 Registers , or D4/D2R2 Registers for this value).

2Number of registers to act on starting from the register defined in byte 2 above.

nData for write. Some values must be read/written as a unit consisting of 2 consecutive registers. If the request is to write, the data to write follows the number of registers. If accessing registers consisting of 2 bytes or 4 bytes, the data is in big endian (network order) format.

API Response Format

The API command takes the following response format:

Number of Bytes

Value

1Function code of request if no error. Most significant bit will be set if an error occurred.

1Length of data in response if no error occurred. If an error occurred, the byte will contain the error code (see the Error Codes table below).

nData response for request (the number of bytes is dependent on the number and type of registers requested). If the request returns 2 or 4 byte values, it will be in big endian (network order) format. If the request returns boolean values, the least significant bit (bit 0) represents the first value requested and bits 1 to 7 represents subsequent boolean values. If more than 8 boolean registers are requested, they are returned in successive bytes.

TruePort Utility 223

Page 223
Image 223
Perle Systems DS1, TS2 manual API I/O Access Over TruePort, API Request Format, API Response Format

DS1, TS2 specifications

Perle Systems TS2 and DS1 are advanced serial-to-Ethernet devices designed to facilitate seamless integration of serial devices with modern IP networks. These devices serve as crucial tools for businesses looking to enhance their communication capabilities while leveraging existing infrastructure.

One of the standout features of the Perle TS2 and DS1 is their ability to support multiple serial protocols including RS232, RS422, and RS485. This versatile support allows businesses to connect various legacy devices to their networks, ensuring that critical equipment can still communicate effectively in an increasingly digital landscape.

The TS2 model is particularly noted for its dual serial ports, enabling simultaneous communication with multiple devices. This capability is invaluable for applications requiring real-time data transmission, such as remote monitoring and automated control systems. The DS1 model, on the other hand, is designed for single-port use, making it an ideal solution for smaller-scale operations or specific single-device connections.

Both the TS2 and DS1 incorporate advanced features such as configuration through a web interface, which simplifies setup and management. Users can easily access device settings and monitor performance metrics remotely, enhancing operational efficiency. These devices also support various network protocols such as TCP/IP, UDP, and ICMP, ensuring compatibility with a wide range of network architectures.

In terms of security, Perle Systems prioritize user data protection. The TS2 and DS1 offer features including SSL encryption and SSH protection, providing an added layer of security for sensitive information transmitted over the network. This is particularly important for industries where data integrity and security are paramount, such as healthcare and finance.

Additionally, the rugged design of both devices ensures reliable performance even in harsh environments. With extended temperature ratings and robust housing, the TS2 and DS1 can operate in diverse conditions without compromising functionality.

To summarize, the Perle Systems TS2 and DS1 provide a reliable and flexible solution for connecting legacy serial devices to modern networks. With their support for multiple serial protocols, web-based management, robust security features, and rugged design, these devices cater to a variety of industries looking to modernize their communication infrastructure while maintaining existing equipment. Whether for large-scale operations or smaller implementations, the TS2 and DS1 equip businesses with the tools needed for effective serial communication in an IP-driven world.