Created Function Block but Inputs and Outputs generating errors

Hello Experts

I need to move data based on a condition.
In most FBD PLC's I would turn on Enable for the MOVE FB and use my condition to enable the moves as necessary.
I understand the EN for MOVE is not coming till 2021.0
So I thought no problem, just create my own FB.
 
Created variables
ENABLE, Type is BOOL, and  USAGE as INPUT
ENABLEOT, BOOL and OUTPUT
STRING_IN, STRING INPUT
STRING_OUT, STRING OUTPUT
TEMP_STRING_IN, STRING, LOCAL
TEMP_STRING_OUT, STRING, LOCAL
 
Then made the below code
TEMP_STRING_IN := STRING_IN;
IF (ENABLE)  
>  THEN  
>  TEMP_STRING_IN := TEMP_STRING_OUT;  
>    
>  ELSE   
>  ENABLEOT := FALSE;  
>    
>  END_IF;  
>    
>  TEMP_STRING_OUT := STRING_OUT;
 
I made this as a Function Block under LOCAL in components.
 
I used this conditional move in a program that is called under ESM1
the FB goes in to the program no issues.
 
I am getting and Error though that
"The program instance 'enMOVE' does not exist in the 'axcf2152:PLC'
 I am confused because its not a program its a Function Block.
 
If I go to the error it wants me to assign my FB inputs to a port??????
 
Thanks,

KIND OF SOLVED

I am not sure how they ended up in the Port List but after clicking remove all ports not used it cleared and let me build.....
That said the astute amount you probably noticed my code will not work.
the reason it is written the way it is...
 
In my head I just need
IF (ENABLE)  
>  THEN  
>  STRING_IN := STRING_OUT;  
>    
>  ELSE   
>  ENABLEOT := FALSE;  
>    
>  END_IF;
 
Doing this gives me
Assignments to read-only variables are not valid. I may start a new post on this if I can not find anything.

Hi darin,

Try changing
STRING_IN := STRING_OUT;
to 
STRING_OUT := STRING_IN;
~ Martin.