Siemens S7 - Function Blocks & UDT

AshleyParr

Member
Join Date
Dec 2008
Location
Midlands, UK
Posts
184
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 in/output variable as UDT0.

This works fine inside my function block but when i try to call the "Valve_Control" block i keep getting told my input into the UDT variable is invalid.

Basically i cant assign my UDT to the blocks UDT input variable,

Any ideas on how to get around this?

Ash
 
Sorry, i forgot to mention that im using step7 to program an S7-300 PLC

Maybe I misunderstood, but as I read it you have not declared the data you want to pass into the FB.
Today you just type UDT10 at the input to your FB?

That won´t work.

In a datablock, add a line and there you declare a new variable of type "UDT" and type in your UDT10.
This data you can now use to pass into your FB.
 

Similar Topics

hi guys iam new to using siemens s7 , and I have a question with regards to the function blocks. how does one open a function block to get to the...
Replies
2
Views
1,659
Hi I would like to make a array of function blocks. I'm trying to declare the array in a data block, in other platforms such as Codesys i would...
Replies
0
Views
1,924
Hello PLCtakt.net I have been searching for a way to export some functions block, made with Siemens TIA Portal v12. The only way i can find is...
Replies
3
Views
13,419
How can you update the tooltip text for a function block written in SCL? Currently the tooltip text shows IN:BOOL (the type of the input).
Replies
1
Views
1,392
Morning all, I have created some function blocks, however while i can connect ladder logic symbols ie n/c to the inputs, the output side of the...
Replies
8
Views
2,357
Back
Top Bottom