Illegal parameter assignment?

SeH

Member
Join Date
Jun 2011
Location
Göteborg
Posts
9
I'm trying to make a simple string comparison like this:

Code:
FUNCTION Ok_Att_Aktivera : VOID
    
    VAR_INPUT
        editable_article_nr : STRING[15];
        active_article_nr : STRING[15];
    END_VAR
    
    VAR_OUTPUT
        okAttAktivera : BOOL;
    END_VAR
    
    
    IF editable_article_nr = active_article_nr THEN
        okAttAktivera := TRUE;
    END_IF;
    
END_FUNCTION

But when I try to compile I get two errors both saying "Illegal parameter assignment". It seems like the problem is in the IF statement but I can't figure out way. Does anyone else know what's wrong?
 
Same as before, FC calling FC cannot pass on INPUT parameter of string type. Use temps, but initialise required first.

Code:
FUNCTION fc888 : VOID
    
    VAR_INPUT
        editable_article_nr : STRING[15];
        active_article_nr : STRING[15];
    END_VAR
    
    VAR_OUTPUT
        okAttAktivera : BOOL;
    END_VAR
    VAR_TEMP
        sC1:STRING[15];
        sC2:STRING[15];
    END_VAR
    sC1:='';
    sC2:='';
    sC1:=editable_article_nr;
    sC2:=active_article_nr;
    IF  sC1 = sC2 THEN
        okAttAktivera := TRUE;
    END_IF;
    
END_FUNCTION
 

Similar Topics

Hi everybody, I have DELTA PLC DVP-32ES and I have make a simple project in WPLSoft. using the input X0 to switch ON the output Y0 and using the...
Replies
0
Views
204
Hi, I am having troubles importing a 500 internal database for tags on FTV ME i am getting invalid tag name Cause: Illegal character ('') at...
Replies
1
Views
1,139
I have the HMI setup as shown in the picture. Then from my PLC and from the handy Baseblock ComTest Pro program I get a illegal data address. "...
Replies
8
Views
4,459
Hello Expert, i have illegal data transfer error while i compile below code and please point me where i did mistake :utoh:. That is only self...
Replies
2
Views
1,590
hI FRIENDS; I am working with GE 90-30 series. I have 10 transmitter. i want to define the eu min and eu max as constant. when i entered the value...
Replies
5
Views
2,033
Back
Top Bottom