Horner XL4 Establishing Communication

We program the Horner XL4 OCS all-in-one controller by using Cscape. We will now use our Cscape software to establish communication. Last time we customized Cscape with icons to make it easier to find, communicate and control the unit. There are two different ways to communicate to the XL4 OCS controller, Ethernet and Serial. There are several different methods within these two ways that the XL4 will communicate. The Cscape software package will communicate both of these ways. We will look at establishing communication using Ethernet, USB (Serial) and Serial RS232.Another two serial ways to communicate would be RS485/RS422 (Serial) and CAN Bus (Serial). These two methods allow multiple controllers connected to the communication network. This is similar to Ethernet.

Previously we discussed the following in our Horner XL4 Series:
System Hardware
Installing the Software Cscape
Cscape Software Setup

We will discuss each way of establishing communication and then look at how to implement with the programming package.

USB Port Communication
This is the preferred method of communicating to the Cscape software package. It is quick and the drivers are preloaded already with the installation of the Cscape software. (Version 9.7 or newer) The drivers can also be downloaded from the Horner website at the following URL:
http://www.horner-apg.com/en/download/ocs.aspx

horner-xl4-establishing-communication-110-min
Plug your USB 2.0 Mini B plug into the XL4 controller and the other end into your computer. The computer will automatically load the driver required. A serial port number will be assigned to your computer. Please refer to your device manager to see the port assigned. Start | Control Panel | Device Manger
horner-xl4-establishing-communication-115-min
In my case the Controller USB COM Port (COM9) is being used.

Serial Port Communication
Horner sells an RS232 cable to communicate to the XL4. This will plug into your 9 pin serial port on your computer. The following is from the XL4 manual and shows the pinout of the RS232 port so that you can make your own cable.
horner-xl4-establishing-communication-100-min
Most computers will no longer come with serial ports, so you will have to use a USB to Serial adapter.
Most serial adapters use the same method for installation. Here is a link to describe the steps involved in installing this adapter.

USB to RS485 PC Adapter Installation


Plug your serial cable into your computer and the other end into the RS232 port of the XL4 controller. Please refer to your device manager to see the port assigned. Start | Control Panel | Device Manger
horner-xl4-establishing-communication-105-min
In my case the Prolific USB-to-Serial Comm Port (COM8) is being used.

Ethernet Communication
The first thing that we need to do is to set the IP address and Network Mask on the XL4 controller. To do this hit the system button on the front of the controller. This will call up a menu that allows you to set a number of items in the controller.
horner-xl4-establishing-communication-130-min
We will set the IP Address to 192.168.1.131 and the mask to 255.255.255.0. A previous post was done titled “What everybody ought to know about IP Addressing”. This post will explain the IP addressing and mask network settings.
The IP address and mask must also be set in the Cscape software package. This is done by selecting Controller | Hardware from the main menu.
horner-xl4-establishing-communication-135-min
You can manually fill in the Series, Device Type and Model #. When this is done you can select the ‘Config’ button beside LAN1.
horner-xl4-establishing-communication-140-min
Enter the IP address and mask settings. Note that this can also be set by registers in the controller. Now hit OK.

Cscape – Control Station Central Application Programming Environment – Communication
Now that we have our method of communication attached we can now start to communicate. When we start our program the connection wizard will appear. If it does not, then from the main menu select Controller | Connection Wizard.
horner-xl4-establishing-communication-150-min
Select the method that you want to communicate and then hit next.
USB
If you are unsure of the port number just hit the ‘I Don’t Know’ button and it will scan your system for the correct port.
horner-xl4-establishing-communication-170-min
Serial
If you are unsure of the port number just hit the ‘I Don’t Know’ button and it will scan your system for the correct port.
horner-xl4-establishing-communication-160-min
Ethernet
horner-xl4-establishing-communication-180-min
You will now hit the ‘Finish’ button on the connection wizard window to now establish communication.

We can see the status of the controller by selecting Controller | Status from the main menu.
horner-xl4-establishing-communication-190-min
The menus have now all changed when you are communicating to the controller. The greyed out options are now available.
horner-xl4-establishing-communication-200-min
Status bar at the bottom of the Cscape window will indicate your online communication connection.
horner-xl4-establishing-communication-210-min

Horner provides a troubleshooting guide on their website for communication to the Cscape software package. This can also be found in the XL4 manual.
Troubleshooting Communications on the X series Controllers:
http://www.horner-apg.com/en/news/2014/troubleshooting-communications-with-an-x-series-controller.aspx

All of the documentation can be downloaded at the following URL:
http://www.horner-apg.com/xl4

Next time we will look at numbering systems and addressing.

Watch on YouTube : Horner XL4 Establishing Communication
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.




2 thoughts on “Horner XL4 Establishing Communication”

Leave a Reply

Your email address will not be published. Required fields are marked *