You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
490 B

FUNCTION BS_ASCII2INT : INT
VAR_INPUT
ASCII1 :BYTE;
ASCII2 :BYTE;
END_VAR
VAR
END_VAR
(*
20190912
1.0
2位数ASCII码数字转换函数
ASCII
*)
(*
Input_Type: 输入
ASCII1十位数ASCII码
ASCII2个位数ASCII码
Output_Type 输出
ASCII
*)
BS_ASCII2INT:=(BYTE_TO_INT(ASCII1)-48)*10+BYTE_TO_INT(ASCII2)-48;
END_FUNCTION