FUNCTION "FC_LenTel_DigitSingle_MCopy" : Void
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
   VAR_INPUT 
      bIn : Byte;
   END_VAR

   VAR_OUTPUT 
      nOut : UDInt;
      xOutError : Bool;
   END_VAR


BEGIN
	
	CASE #bIn OF
	    16#30: 
	        #nOut := 0;
	        #xOutError := FALSE;
	    16#31: 
	        #nOut := 1;
	        #xOutError := FALSE;
	    16#32:
	        #nOut := 2;
	        #xOutError := FALSE;
	    16#33:
	        #nOut := 3;
	        #xOutError := FALSE;
	    16#34:
	        #nOut := 4;
	        #xOutError := FALSE;
	    16#35:
	        #nOut := 5;
	        #xOutError := FALSE;
	    16#36:
	        #nOut := 6;
	        #xOutError := FALSE;
	    16#37:
	        #nOut := 7;
	        #xOutError := FALSE;
	    16#38:
	        #nOut := 8;
	        #xOutError := FALSE;
	    16#39:
	        #nOut := 9;
	        #xOutError := FALSE;
	    ELSE
	        #xOutError := TRUE
	        ;
	END_CASE;
	
END_FUNCTION

