Tia Portal Creating Memory data blocks

thewalkerist

Member
Join Date
May 2021
Location
Izmir
Posts
178
Hello everyone,

As you can see in the screenshot below i have some values that are retentive. Now i want to create a specific value for specific situations and save that value. For example i will process some tomatoes and for tomatoes i need to change Required_Weight_SP to 10000g. And for oranges Required_Weight_SP needs to be 5000. Now i want every value to change for each specific fruit/vegetable. How can i make that happen? My initial though was create a FB for tomatoes and if i click on the tomatoes on the HMI, Every Value that you see in here changes to the Value that i wrote in the FB. And create Function blocks around 20 and use them. I dont want to change the Start values since that is something like factory reset option. I mean my first thought was to create WRIT_DBL for every value and change them entirely but i dont want it

What do you guys think? is this way of thinking ideal? or is there a better way that i dont know about?

Screenshot (835).png
 
In my opinion, this DB you set up. I would create a UDT based on those values.

This way you can have multiple instances of that data for whatever you need.

I definitely wouldn't be creating a separate FB for it all.
 
In my opinion, this DB you set up. I would create a UDT based on those values.

This way you can have multiple instances of that data for whatever you need.

I definitely wouldn't be creating a separate FB for it all.

What do you mean by UDT based?

And wont i need a seperate FB or Function though? Lets say i have a tomato setting in which i change them all to the tomato values and i have an orange one and 18 more vegetables or fruits with these two. Wont it get really complicated to create a global memory for everyone of them in single FB?

And also there are 10 values that i want to change so this means to save them i need to create 10 global memory(excluding other logic) for 1 fruit/vegetable type and if i want to have 20 options to choose from wont i need to create like 200 seperate Global memories? This seems weird to me. Am i missing something here?
 
there are 10 values that i want to change so this means to save them i need to create 10 global memory

The reason why i want to create a global memory for every one of them is i want them to be changed from the HMI whenever they need to change the original setup of the specific fruit/vegetable.
 
Make everything you need to store about your "fruit" then crate this as a data type in the PLC.

You could set each one in a DB on it's own, or crate an array. Putting them into an array makes using other functions, such as indirect addressing easier later on if needed.

DB.png
 
Make UDT and copy recipes with several move blocks to used recipe DB-area (which is also UDT data type)

Move blocks are enabled by different fruits (different fruit is different integer number and list view on HMI or use buttons to select different fruits / recipe from HMI.)




You can also use serialize and deserialize instead of move blocks. (Look thread http://www.plctalk.net/qanda/showthread.php?t=131748)
 

Similar Topics

Hello, As a person who is not that experienced in plcs i am new to a lot of things in this environment. Today my problem includes the alarms...
Replies
3
Views
1,332
Hi Experts, I have created a face plate and to make the objects on it visible and invisible for this i created a tag Bool called Show hide Face...
Replies
2
Views
2,328
Hello I'm looking for a way to do the following but i don't know if it's possible.. I use Wincc TIA V15 comfort panel i use the recipes as...
Replies
2
Views
3,539
I am using CPU 315-2 PN/DP which doesnt allow to assign the variables to the created UDT , meaning the created UDT"PLC Data type" doesnt show in...
Replies
8
Views
2,783
Hi, If I were to create an INT for my FB / DB, will this use up a whole DINT every time I use one or will is just use an INT's worth of memory...
Replies
4
Views
1,864
Back
Top Bottom