Horner XL4 Data to LAN

Cwill

Member
Join Date
Jan 2017
Location
Vancouver Island
Posts
8
Greetings. I'm a total PLC neophyte so please bear with me. I'm still managing to wrap my head around concepts and the lingo.

I've got a Horner Xl4 up and running and monitoring 6 4-20 ma devices. The data is being logged to an SD card but I really want is access to this data on our LAN so that I can inject it into a SQL database.

What is the easiest method to access these data points over TCP/IP? ModbusTCP? I'm proficient in numerous high level languages so once I am able to get realtime access to the data my job will be much easier.

I'm sure this is a common requirement but after a few days of searching the answer has yet to be reveled to me.

Any pointers or examples would be much appreciated.
 
In order to access the data over the network you would turn on the FTP setting in the controller.
http://accautomation.ca/horner-xl4-ftp-file-transfer-protocol-server/
Using Modbus TCP will allow you to directly read the information in the PLC and then do something with it. Here is a thread that will show you how to access the data using AdvancedHMI. AdvancedHMI will communicate Modbus TCP to the PLC. This is written in vb.net so access to a database is straight forward.
http://accautomation.ca/horner-xl4-modbus-tcp-advancedhmi-communication/

This should get you started.
Regards,
 
Thanks Garry,

I've been using ftp to get the currently logged csv files off the SD card but after something a little more real time than FTP.

In C I'd create a socket, open it and listen for a connection. When a client connected I'd start streaming data.

I stumbled across your second link last week sometime and that is where I got the idea of using ModbusTCP but I haven't come across enough documentation to put all of the pieces together yet.

I did manage to locate the source of the 'Modbus Master Mapping' table on your site but it assumes some background in PLCs and Modbus. What I'm missing is that assumed knowledge that the table's author expects.

I'm hoping that I can have the PLC write data to shared registers/shared memory/shared pipe (I don't know the correct terminology yet) and have a client application elsewhere on the TCP/IP network read that data.

I know there will be a eureka moment soon and it will all seem so obvious. Then I'll be upright in my chair happily coding away. Until then...
 
I think that you are over complicating the process. The PLC will populate a series of registers in the memory. In your case it will probably be %R memory areas in the Horner XL4.
You turn on Modbus Slave (Ethernet Modbus TCP protocol). Your information is now available to the network.
The modbus mapping just shows the address that maps to the memory location in the PLC.
Here is a link for a great video on Modbus TCP.


The software that you use to get the information can now use this data. You can then save the data into a database.
Here is a series that explains step by step data logging. The equipment and software is different but the concept is the same.
http://accautomation.ca/now-you-can-have-robust-data-logging-for-free-part-1/

I like AdvancedHMI because it is easy to modify and change. It is also free to use.
http://accautomation.ca/horner-xl4-modbus-tcp-advancedhmi-communication/
Here is a post in which we read from a database in order to get the login information.
http://accautomation.ca/creating-a-hmi-login-screen-on-advancedhmi/

Regards,
 
Thanks Gary! I went and watched a few of your videos and I'm much farther ahead. I will definitely take advantage of the AdvanceHMI in the future but for now I just need to stream the data to the net so I can view it remotely. Thanks for the great videos!

Capture.PNG
 

Similar Topics

Hi I'm new on Horner PLC XL4 OCS using Cscape software. After establishing ethernet comm I can upload/download program to/from the XL4 just fine...
Replies
1
Views
1,220
Hello Everyone, I am new to Horner PLCs, I am trying to setup analog input and outputs but I am not sure how to assign the %AI and %AO to the...
Replies
3
Views
1,848
So I'll preface by saying I'm familiar with the Horner XL4. I downloaded the BACnet IP and MS/TP protocols from Horner and I've been able to...
Replies
2
Views
1,585
Hi guys, My Horner XL4 is rebooting everytime it starts up with my code. I'm not sure what I did, but the SYSTEM button doesn't respond so I...
Replies
3
Views
2,708
I was loading a program onto an XE1e2 PLC and it got stuck on these two windows and won't progress. It won't let me connect from the PC to reload...
Replies
0
Views
77
Back
Top Bottom