netdomain

UDT - Individual Comments on BOOL / Members

8 posts in this topic

Hello there,

Is it possible to put individual Comments on members of UDT.

 

For example, I have a UDT called Cylinder

Cylinders has 2 members (CM   (Command - BOOL) and CP (Complete - BOOL)

 

Now if I use this UDT in many stations, it would be

 

Station1_.CM    - It  will take its comment from the UDT and will be called "Command"

 

But I want this to be commented unique .... like Station 1 - Cylinder 1 - Command

 

Is it possible in NJ  or CJ Processors????

Edited by netdomain

Share this post


Link to post
Share on other sites

Are you saying that there is more than one cylinder per station?

Share this post


Link to post
Share on other sites

Yes,

If there are 10 cylinders in that station,

I will have this UDT used 10 times

Station1_C1.CM  (Comment - Cylinder)

Station1_C2.CM (Comment - Cylinder)

As you can see above,  if UDT has its member named as "Cylinder",  it will display the same comment everywhere.


But if somehow if individual comment is possible,  I would rather have this

Station1_C1.CM (Station 1 - Cylinder 1 Extend Command)

Station1_C2.CM (Station 1 - Cylinder 2 Extend Command)

 

Is that possible?

 

 

Share this post


Link to post
Share on other sites

This is possible with the NJ and the CJ2 PLCs. Omron refers to them as Data Types.

CX_Data_Type.thumb.jpg.fb9064899aaaf9c8b

Share this post


Link to post
Share on other sites

You can make a structure that looks like this in both Sysmac Studio and CX-Programmer that will accomplish what you want:

StructComment.thumb.jpg.894d49f32686b43e

You can also change the comment on the variable and it will override the data type comment, see below:

StructComment2.thumb.jpg.20366f7c7ddddb3

If your concept was to nest data types, then the method in the image above would accomplish what you want.  By nest, I mean that if you created a data type called cylinder and then created a data type called Station that was an array of data type cylinder, then you could use the above method to comment each cylinder.

With CX-Programmer, you can do what I did in the top image, but I do not know of a way to do what I did in the lower image.

Share this post


Link to post
Share on other sites

Thankyou very much. 

Michael, that is what I was looking for .   Method #2

Too bad, I cannot apply the 2nd method on CX-Programmer,  since you cannot override the comments everytime you use the UDT.  It only uses the comments that is inside the UDT.

 

And then, that works bad, since its too generic.  Every cylinder in that station will have same name like "Cylinder"   or "Cylinder 1".   But I want it to be unique, like shown in Picture #2.

Share this post


Link to post
Share on other sites

I see now that I misunderstood the question. I find it strange that CX does not allow that. I also find it strange that you cannot view the Members of an 'Instance' of a Data Type in the Symbol Table. On large Data Types, I find myself having to use the Data Type Table as a reference. This would be a nice improvement at least for Sysmac Studio.

Share this post


Link to post
Share on other sites

Yes, IO_Rack,    i wished it would be easier to tag bunch of members of UDT easily.

 

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