Siemens UDT usage

AlecTek

Member
Join Date
Sep 2010
Location
Vancouver
Posts
155
Can anyone tell me why my variables are red in the attached picture?

I just started to use siemens and I am trying to understand how udt works. Is there any tutorial or sample codes about the user define struct and pointers?

Thanks in advance!

udp.JPG
 
One possibility is that you have edited the UDT whilst the FB was open. Close down the editor and re-open the FB and insert the UDT again. Which version of Simatic manager are you using?
 
Hello L D[AR2,P#0.0],

When I try to use a FC instead of FB, it does not work again. Everything same except FB is changed to FC. Does FC not work with UDT because it doesn't have its variable space?

Many thanks!

udp.JPG
 
When you enter the UDT declaration for the IN_OUT, replace the <nr> with your selected udt number as opposed to adding the number to the end of the "UDT" string. It is a bug in the editor. Saving the FC after updating the interface only (no code entered), closing and re-opening the FC will also fix it.

uuu.jpg
 

Similar Topics

Hello All: I'm starting to use Intouch (2017). I comunicate with S7-1500 PLC with SIDIRECT using symbolic. I'm trying to create a faceplate. I see...
Replies
0
Views
1,175
How do I move one byte of data in an array to a UDT that is one byte in length. AB would be a slam dunk on this with a simple Copy instruction...
Replies
22
Views
5,392
I have created a UDT. This UDT is a IN_OUT to a FB I am creating. This UDT contains a few strings. Inside the FB I am attempting to use SFC20...
Replies
3
Views
2,382
In S7 Program there is a DB which is created from UDT. To modify DB, UDT was changed because only if UDT changed then DB is changed. My question...
Replies
1
Views
3,939
Hi all, im hoping that you can help me out on this problem. I have a function block called "Valve_Control" (FB1), in this i have assigned a...
Replies
4
Views
9,150
Back
Top Bottom