Sign in to follow this  
Followers 0
DMC

IEC61131-3 Data Structures

6 posts in this topic

Encapsulating your data into custom Data Structures will allow you to Dominate (maybe not the world, but at least your PLC)! I have recently been examining the benefits of Data Structures, particularly through a series of the IEC61131-3 Standard. I first reviewed the standard data types that virtually every PLC will support. Once I reviewed the data types I was able to then discuss the Data Structures or UDT's as a way to cluster or group native data types. I will post my blog to a link of the charts I used (provide a better visual demonstration): http://www.dmcinfo.com/blog.aspx/articleType/ArticleView/articleId/124/categoryId/10/IEC61131-3-Data-Structures-Encapsulation-Domination.aspx Please let me know if I missed anything vital here. I am in interested in knowing your thoughts on this! Thanks!

Share this post


Link to post
Share on other sites
Looks great, but... ....how do you create a UDT then? Are they part of the IEC61131-3 standard or PLC specific?

Share this post


Link to post
Share on other sites
Hello, Creating a UDT depends on what software you're using to program the your PLC. It is part of the IEC 61131 specs. Its usually compared to creating a struct in C++. For example, lets say I want to create a struct to keep track of my connected TCP/IP devices. In PCWorx, I would create a new datatype, and write something like: TYPE TCP_Device : STRUCT IPAddress : STRING; Mem_Address1 : INT; Mem_Address2 : INT; END_STRUCT; END_TYPE; Then you create a variable Device1 of type TCP_Device. Then, to call the 'attributes' of Device1, I would say something like Device1.IPAddress := '192.168.0.1'. I think the article does an accurate job explaining why this is such an important and powerful tool. Edited by Daniel Fenton

Share this post


Link to post
Share on other sites
Thanks Daniel. I'm familiar with this sort of construct, and I really like the idea of this in a PLC. Currently I'm using Omron PLC's and it looks like the newer range may support this (not sure), but unfortunately I'm not using any of the newer range just now. Shame, but I may be able to have a play if I can get my Omron programming package upgraded.

Share this post


Link to post
Share on other sites
You're welcome. The more who take advantage of tools like these, the easier it is for all of us

Share this post


Link to post
Share on other sites
ANDY_P, the Omron CJ2 range supports this. Recently, I have used it in one project, it is really good. I used CX-Programmer 9.1. SVN Edited by svn

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0