Jump to content

Recommended Posts

Posted
Hi guys, I am a little new to TIA portal. My question is whether it is possible to create structures of data (UDTs) and use them without addresses in the program? Or is it absolutely necessary to assign base addresses to all variables? thanks for looking in & will greatly appreciate any help Raj S. Iyer
Posted
You can create UDT's under the tab "PLC data types". I attached a small picture to make it a bit clear what I mean.
Posted
Hi Bryll, Thanks a lot for your prompt reply. I know about creating data types... Now my question is whether the instances of these data can be used without the assignment of address? So far I haven't been able to create any variable - elementary or User-defined without assigning addresses; in the PLC tag tables that is. However, in OB1, I have been able to create private variables starting with "#" Such as #int1 which is local to OB1, which implies that it could be global. Same rule applies to structured variables or user data types. And Bryll, I would like to understand data-blocks. If you create a structure and instantiate it, does it become an instance data-block.
Posted
If you create a FB and connects a DB to it, then you will have an instance DB. If you create a DB to store variables in, then you will have a DB with addresses for each tag/byte/word. You access them in your program by dragging them to the position or write the address directly like: DB100.DBX0.5 If you create an UDT, then you can access them by the label or drag and drop (no addresses). Might be wrong, since I'm just a beginner myself

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...