Design reusable function blocks

Glenn94

Member
Join Date
Sep 2015
Location
The Hague
Posts
2
Dear all,

I am currently trying to redesign an old plc project and have some issues doing so. The main thing i want to do is to make my program more modular with a small and readable interface.

I'm working with TIA Portal V13 designing software for a PLC 1500 CPU

My question:
how can i make a block that has a small interface, but where i am still able to connect a lot of global variables that originate from different locations? I thought of using a UDT/PLC data type, but my data will not be indivually accesable in a DB?.

I hope someone can enlighten me on this problem!
 
Hi Glenn,

Welcome to the forum! You can use UDT and still access the individual tags.

You could also use STAT in your FB. And pass the info directly to those, separately from your FB call. Is that what you want?
 
If the shared data is stored in multiple shared DBs, then you have to assign an IO pin on the FC or FB for each of these multiple locations. And yes, it is a good idea to define the data structure for each by UDTs.

The individual elements of the data will be accessible in the FC or FB by means of the way the UDT is structured.
 
first of all,thanks for the replies!

I want to define my data structure using a UDT so i can reuse my block in multiple subprograms and have small interface as there is only 1 input (visually). in this UDT contains a lot of boolean variables that are used as conditions. i want to create a different UDT for each subprogram serving as a kind of recipe containing all the condition variables so that i can reuse the function block.

this in itself i can do, but i still want to be able to address the variables individually because they are also used elsewhere.
I hope this clarifies my intentions ,but i will try to make a drawing to support it.
 

Similar Topics

Hi, I want to build a demo station to test devices and programs and I need some help with it. I want to connect GuardLogix, Piltzmulti and...
Replies
1
Views
138
I've run into a non-plc issue that is proving hard to solve. I'm designing a mechanical device that has a base/foundation that must satisfy the...
Replies
3
Views
390
I’m currently starting a brand new design with a compactLogix controller and a panel view 700. I’ve completed similar projects from start to...
Replies
7
Views
1,228
What's a good place to start for learning electrical design? I am always the end user so I can follow along machine schematics, etc. but I want to...
Replies
10
Views
3,880
Dear, I am wanted to design the marble cutter machine on HMI. The issue is how to show the movement of round blade reverse and forward...
Replies
0
Views
921
Back
Top Bottom