UDT usage in SCL illegal data transfer Error

MOeZ

Lifetime Supporting Member
Join Date
Nov 2009
Location
singapore
Posts
101
Hello Expert,

i have illegal data transfer error while i compile below code and please point me where i did mistake :oops:. That is only self homework and thanks in advance.

TYPE VALVE
STRUCT
OP_LS : BOOL ;
CL_LS : BOOL ;
AUTO : BOOL ;
MANU : BOOL ;
OPENED : BOOL ;
CLOSED : BOOL ;
Q_SE : BOOL ;
Q_ERROR : BOOL ;
END_STRUCT;

FUNCTION_BLOCK BDV_TEMP // FB 1

VAR_IN_OUT
BDVTEMP : VALVE ;
END_VAR

BEGIN

IF BDVTEMP.OP_LS AND NOT BDVTEMP.CL_LS THEN
BDVTEMP.OPENED := TRUE ;
BDVTEMP.CLOSED := FALSE ;
BDVTEMP.Q_ERROR := FALSE ;
ELSE
;
END_IF;
END_FUNCTION_BLOCK

FUNCTION_BLOCK BDV_TEMP_CALL // FB 2

VAR_IN_OUT
BDV509 : VALVE ;
END_VAR

VAR
VALVE1 : BDV_TEMP ; // CALL FB1
END_VAR


BEGIN

VALVE1 (BDVTEMP := BDV509);

END_FUNCTION_BLOCK
 
Last edited:
As always, many thanks LD. even i read your link and screen shot, still i don't get it. :unsure: Can i have sample project or coding?
 

Similar Topics

I'm focusing on Rockwell programming for a couple of projects, and I've been thinking about some of the details I've come across while working...
Replies
13
Views
2,326
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...
Replies
4
Views
3,130
Afternoon all, I'm working on setting up a large excel recipe table for porting updates through the Linx Gateway RTD/DDE function into my recipe...
Replies
2
Views
113
I am trying to copy an array of real numbers into a UDT with a real data type element. I have attached a snip below showing my COP instruction...
Replies
4
Views
204
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
131
Back
Top Bottom