Sign in to follow this  
Followers 0
jthyge

Struct datatype in Studio 5000

3 posts in this topic

Hi 

Is it not possible to use the datatype struct in Stuido 5000, when making a UDT? 

Best regards 
Jesper 

 

Share this post


Link to post
Share on other sites

My C++ is a little rusty, but a struct isn't itself a datatype but consists of a collection of variables that can be different datatypes themselves. Basically a function-less class. In that sense, a UDT is a struct. It can also contain other embedded UDTs.

Share this post


Link to post
Share on other sites
48 minutes ago, Joe E. said:

a UDT is a struct

This.

Logix UDTs are Rockwell's implementation of structs.  There are some quirks, like its odd  and non-optional 32-bit alignment (64-bit in some case with v27+ firmware) rules.  (In summary:  single 8-bit types are byte-aligned, single 16-bit types are 16-bit aligned, all else is 32-bit aligned, including all all arrays and nested structures.)

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