Diffrence between data blocks (DB) in TIA Portal and Twincat

Dleys1094

Member
Join Date
May 2016
Location
na
Posts
4
For an automation project we need to program for the first time in TwinCAT (V2). The Twincat software and PLC control is new to me. Programming in FB an ST in TwinCAT is not a problem. But since I only have been working with Siemens and TIA Portal, I don’t have any clue of how Data blocks, as in TIA Portal, are made in TwinCAT.
Can someone shed some light on this issue for me, thanks!:)
 
Global data is declared as global variables. You can first declare DUT's (UDT) and then use it as global variable. There is no such thing as DB in twincat/codesys (basically in anything but siemens).

For function block's usage, you must declare them as variable in program / fb and use them there. No pairing of "db" to fb.
 
Last edited:
I don't think that there is something the same like a DB from S7 in Twincat 2.

What you can do is Go to the Tab 'Resources' (left side Down below). Make a New object under Global vars. Give IT the name 'DB'. Inside this object, you can define the Different DB-entries.
 
I don't think that there is something the same like a DB from S7 in Twincat 2.

What you can do is Go to the Tab 'Resources' (left side Down below). Make a New object under Global vars. Give IT the name 'DB'. Inside this object, you can define the Different DB-entries.

Thanks for the information. I made a new object under Global vars, gVar_Taglist (for the in and outputs) and gVar_Alarms_and_Events.
It seems to work for now, but how do they program in twincat when there
is no use of DB. It seems more difficult to me e.g. to send and receive data from another PLC without using DB's.
 
You need to try to shift how you think about stuff. With s7 most are concerned "where" when with twincat it is basically unnecessary. You have the data struct in memory (like you would have the db) but you only access it symbolically. Basically you need to try to forget the "where". Just have the data in abstract sense via name.

Depending on how and what your chosen data transfer is (tcp/ip, udp/ip, fieldbus etc.). You can do DUT (UDT) and declare global variable of that type.

TC and codesys are very close to s7, they are german afterall. But there is some inherent differences.
 
Last edited:

Similar Topics

Hi, We have a machine that we wan't to restart after power on if the emergency stop is OK. But if the emergency stop is tripped with the button...
Replies
21
Views
6,346
Hi to all. We have a pH transmitter from Mettler Toledo (M400) that can be powered by 120 VAC or 24VDC. We also have a transmitter (M420) that is...
Replies
8
Views
6,073
how to differentiate between rotary and linear motion exactly?any example about these two motion? i am starting working on packaging and tube...
Replies
1
Views
1,907
I 'd like to know if force is different in s7-300 and 400 because I saw an article that said they are diiffrent but didn't explain about it
Replies
9
Views
3,462
Hi. First of all, sorry for my lack of some basic knowledge. Actually, I have worked with AB SLCs and never worked with DCS. That is the...
Replies
12
Views
8,889
Back
Top Bottom