How to communicate between Visual Studio and a Compact logix L24 PLC

Paddy1982

Member
Join Date
May 2021
Location
Galway
Posts
3
Hi

I'm currently doing a college course in robotics and automation and a question we were asked was.

A software application used by production operators scans in Work Orders (WO) on a daily basis. The application was created using Visual Studio.NET framework.

The information is scanned, read by the .NET application and then instructs the CompactLogix L24 PLC to start indexing the conveyor belt for production.

Select a suitable method for Visual Studio to be able to communicate with the CompactLogix PLC. Explain your selection.

I was thinking the advancedHMI will do what is needed but just wondering if there is another simplier way.

Thanks
 
I don't know if it would be simpler or just similar, but libplctag on GitHub looks like it might be able to do the same thing.
 
I don't think there is a simpler way than Advanced HMI, however, did the paper mention you could use something that already has the communication built in (I believe Advanced HMI has) or are they expecting you to just use VSt to theoretically write an application from scratch. That is how it sounds to me, if so then there is a lot of work involved. One thing comes to mind is to use an OPC server, then use VSt to create your application there are a number of free interfaces to connect to an OPC server. Again have you got yto actually create it or is it just a paper exercise.
 
...or are they expecting you to just use VSt to theoretically write an application from scratch. That is how it sounds to me, if so then there is a lot of work involved. ...


Good point @parky. Another class assignment for the forum to "discuss."


If it is meant to be from scratch and it is a paper exercise (e.g. it says "Explain your seletion."), then perhaps it is an invitation to compare E/IP, Modbus, etc.
 
I agree using Advanced HMI would probably not what is expected, and reduce marks considerably. šŸ‘ØšŸ»ā€šŸ«
I have used Kepware before & it comes supplied with sample interface code for C & VB, I ported some to Pascal & it worked a treat, the only thing I struggled with was browse for tags & have it populate automatically, never did get that bit working but there was no need just imported a csv from Kepware.
 
Last edited:
The hard way is to get the documentation from the ODVA people and write the code yourself. If you have only one deployment it can be a really bad idea. If you want to be pushed into truly learning the protocol or if you are going to use it a couple of hundred times it may be the way to go. This assumes that you are not in a hurry and that you are willing to do a lot of testing. The protocol has a lot of features that you do not need for your application.

I was facing a thing a few years ago with cell phone towers that could have escalated to several thousand installations. That pushed me into porting code to the Raspberry PI to avoid hardware costs, paying for Windows, and Windows version changes. It was an unusual case. The project was cancelled for marketing reasons but I learned a lot from it that was used other places.

I've written different versions of Modbus, Square D Symax, General Electric serial and Ethernet, BACnet/IP, GPS, a few versions of Allen-Bradley, and EtherIP is the most complex protocol that I have ever written. I'm working on the third generation of my code now.

An alternative is to use the register-based (PCCC) protocol with the CompactLogix. It's somewhat easier to write but probably not as good as their EtherIP tag-based protocol for the long term.

There's lots of choices. I wish you well in finding the best one.
 
Hi Thanks for the replies.

Laptop went dead earlier and forgot my charger šŸ™ƒ

The question is just in theory. There is no programming to do, there is no restrictions on what method i pick as long as it works.

I just need to pick something that can take info from V.S. and send it to a PLC which will turn on an output and then just explain briefly why i picked it.

The question isn't worth a lot in terms of marks.
 
Hi

I'm currently doing a college course in robotics and automation and a question we were asked was.

A software application used by production operators scans in Work Orders (WO) on a daily basis. The application was created using Visual Studio.NET framework.

The information is scanned, read by the .NET application and then instructs the CompactLogix L24 PLC to start indexing the conveyor belt for production.

Select a suitable method for Visual Studio to be able to communicate with the CompactLogix PLC. Explain your selection.
I think the key word here is select, not write.

I was thinking the advancedHMI will do what is needed but just wondering if there is another simplier way.
Thanks
AdvancedHMI will communicate with the PLC but will it access the work order data in the program you mention. What format is the data in? THAT IS A HUGE PART OF THE PROBLEM. You need to know the format of the data to pick the right application to access it. For instance is the data in xml, json or sql format? There are probably already programs that can what you want. Find one and SELECT it!

This isn't robotics or automation.
 
I think the key word here is select, not write.


AdvancedHMI will communicate with the PLC but will it access the work order data in the program you mention. What format is the data in? THAT IS A HUGE PART OF THE PROBLEM. You need to know the format of the data to pick the right application to access it. For instance is the data in xml, json or sql format? There are probably already programs that can what you want. Find one and SELECT it!

This isn't robotics or automation.

We didn't get any info on data formats just VS to an Allen Bradley PLC, Think ill stick with the AdvancedHMI and if he doesn't like it so be it.
 
I have done something like this. What I did was use Excel and establish OPC communications. Once I created the topic I started addressing my tags and variables that I was going to use in Excel and used the built-in VB to create a push-button style interface on one of the sheet tabs. After I had a solid foundation of how I wanted it to work I started migrating the project over to VS. I wish you success
 
I do agree with using an OPC server for the communication and probably SQL tables for the works order, the beauty of SQL is it interfaces well with VS & excel if that is the route. I have done many recipe handling systems using SQL & OPC servers, these have been either Scada packages or stand alone programs. easy to test as SQL Server express is free & ideal for testing on a local machine. the other benefit is most larger companies will have SQL servers for their own management systems.
 

Similar Topics

Hi everyone, I'm working on a project where I need to exchange data between a Siemens S7-1200 PLC and an Allen-Bradley MicroLogix 1400 PLC. The...
Replies
8
Views
651
Hi, i have fx5u plc. Want to communicate with citect scada. Have tried multiple protocol but it's not communicated. Can any one help in this topic.
Replies
4
Views
1,820
Can anyone help me getting this communications connection set up between KINCO GL100 and KINCO K508-40AR? I am using Port 1(RS485) on the KINCO...
Replies
1
Views
3,311
Can anyone help me getting this comms connection set up? I am using Port 2 on the Versamax ICU200UDR005-DK, set in SNP with port settings Baud...
Replies
4
Views
1,551
I have two cells. They are identical (almost). Each cell has a Contrologix 1756-L73 processor and a 1756-ENBT addressed at 192.168.1.10. Each...
Replies
29
Views
6,198
Back
Top Bottom