You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old January 16th, 2022, 02:33 PM   #1
thewalkerist
Member
Turkey

thewalkerist is offline
 
Join Date: May 2021
Location: Izmir
Posts: 177
Tia Portal Creating Memory data blocks

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?
Attached Images
File Type: png Screenshot (835).png (47.3 KB, 38 views)
  Reply With Quote
Old January 16th, 2022, 03:02 PM   #2
Rob...
Lifetime Supporting Member
United Kingdom

Rob... is offline
 
Join Date: Jul 2016
Location: Manchester
Posts: 361
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.
  Reply With Quote
Old January 16th, 2022, 03:54 PM   #3
thewalkerist
Member
Turkey

thewalkerist is offline
 
Join Date: May 2021
Location: Izmir
Posts: 177
Quote:
Originally Posted by Rob... View Post
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?
  Reply With Quote
Old January 16th, 2022, 04:09 PM   #4
thewalkerist
Member
Turkey

thewalkerist is offline
 
Join Date: May 2021
Location: Izmir
Posts: 177
Quote:
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.
  Reply With Quote
Old January 16th, 2022, 04:14 PM   #5
Rob...
Lifetime Supporting Member
United Kingdom

Rob... is offline
 
Join Date: Jul 2016
Location: Manchester
Posts: 361
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.
Attached Images
File Type: png DB.png (57.2 KB, 38 views)
  Reply With Quote
Old January 16th, 2022, 06:14 PM   #6
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,787
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)
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Tia portal question sending data between 2 plcs stu LIVE PLC Questions And Answers 12 September 15th, 2021 03:15 AM
Diffrence between data blocks (DB) in TIA Portal and Twincat Dleys1094 LIVE PLC Questions And Answers 7 May 8th, 2016 02:33 PM
Export Function Blocks made in LAD with Siemens TIA Portal v12 nitan LIVE PLC Questions And Answers 3 December 25th, 2013 01:03 PM
MPI comunication Manuel Raposo LIVE PLC Questions And Answers 22 July 16th, 2007 07:24 AM
SLC 5/03 data loss andydaoust LIVE PLC Questions And Answers 1 October 10th, 2002 07:38 PM


All times are GMT -4. The time now is 04:39 AM.


.