Chapter 7: Start Writing Your Own Applications

7. Start Writing Your Own Applications

Before you start writing host applications or programs to interact with LES301A, make sure you have done the following.

7.1 Preparing the System

1.Properly connect the LES301A hardware, including power, Ethernet, and serial cable.

2.Properly configure the LES301A parameters, including connection type, IP address, gateway IP address, and network mask (see

Chapter 3).

3.Configure the LES301A as a TCP Server using the default TCP port number “4660.”

4.The host (PC) application program must be configured as a TCP client and connects to the LES301A with a designated TCP port number “4660” for COM1.

5.Make sure the LES301A is running by checking the running status through the SerialManager configuration utility.

7.2 Running the Sample Program

Sample programs written in VB and VC++ are included in the package for reference; source codes are also included. You can find test programs on the product CD or diskette under the directory of \sample\vb_ap\and \sample\vc_ap, respectively.

There are two test programs: TCPTEST written in Visual Basic and TCPTEST2 written in Visual C++.

7.2.1 TCPTEST in Visual Basic

This sample program is written in Visual Basic 5.0 with Winsock Controls. It shows how to send and receive data between host (PC) and LES301A via Ethernet in two socket ports.

Run Visual Basic and open sample program tcptest.vbp. After the program is started successfully, you can start testing functions. For more information, press “Help” in the program for a detailed explanation.

NOTE: Make sure the Microsoft visual studio family software is installed on the computer. Otherwise, the sample program will not run.

Figure 7-1. TCP test sample program in Visual Basic.

Page 44

724-746-5500 blackbox.com

LES301A user manual

 

 

Page 44
Image 44
Black Box RS-422, RS-232, RS-485 Start Writing Your Own Applications, Preparing the System, Running the Sample Program

RS-422, RS-485, 1-Port 10/100 Device Server, RS-232 specifications

The Black Box IC113C and IC175C are part of a series of versatile RS-485 interface converters designed to facilitate reliable data transmission over long distances. RS-485 is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems, and these specific Black Box converters exemplify the technology's adaptability and robustness.

The IC113C is an RS-485 to RS-232 converter, providing a seamless transition between these two common serial communication protocols. With a compact design, it boasts an operating temperature range of -40 to 85 degrees Celsius, making it suitable for harsh environmental conditions. Its key feature includes the ability to extend the communication distance up to 4,000 feet, which is ideal for industrial applications where devices may be far apart. Additionally, the IC113C includes built-in surge protection, ensuring that the device can withstand electrical noise and spikes, ultimately increasing the system's reliability.

On the other hand, the Black Box IC175C serves as an RS-485 to USB converter, bridging older serial devices with modern USB interfaces. This converter is critical for users wanting to connect legacy equipment to contemporary computing systems. Featuring a plug-and-play design, the IC175C is easy to install with no external power supply required, as it is powered directly through the USB connection. It also supports data rates up to 115.2 Kbps, ensuring fast and efficient data transfer.

Both models employ differential signaling, which enhances noise immunity and allows for greater transmission distances compared to single-ended communication standards. Furthermore, the converters support multiple nodes on the same bus, accommodating a network of devices without requiring complex wiring schemes.

In summary, the Black Box IC113C and IC175C offer essential features that cater to diverse industrial and commercial applications. With their robust construction, extensive operating ranges, and compatibility with various communication protocols, these converters enhance system interoperability and provide durable solutions for long-distance data communication needs. Whether connecting legacy systems or extending communication capabilities, these devices exemplify reliability and efficiency in modern data transmission technologies.