EasyManua.ls Logo

FATEK FBs-2DA - Page 210

FATEK FBs-2DA
348 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Advanced Function Instruction
7-46
FUN 64 P
→ASCII
CONVERSION OF HEXADECIMAL VALUE TO ASCII CODE
FUN 64 P
→ASCII
〈Example 1〉When M1 changes from OFF→ON, it converts hexadecimal value to ASCII code.
M1
EN
S :
N :
1
R0
64P. ASCII
D :
R100
˙Converts the Nibble 0 of R0 to ASCII code and stores
it into R100 (High byte does not change).
R0=0009H Î R100=0039H(9)
〈Example 2〉When M1 is ON, it converts hexadecimal value to ASCII code.
M1
EN
S :
N :
2
R0
D :
R100
64. SCII
˙Converts the NB0~NB1 of R0 to ASCII code and
stores it into R100 ~ R101 (high bytes remain
unchanged).
R0=009AH Î R100=0039H(9)
R101=0041H(A)
〈Example 3〉When M1 is ON, it converts hexadecimal value to ASCII code.
M1
EN
S :
N :
R0
64. SCII
D :
R100
3
˙Converts the NB0~NB2 of R0 to ASCII code and
stores it into R100~R102
R0=0123H Î R100=0031H(1)
R101=0032H(2)
R102=0033H(3)
〈Example 4〉When M1 is ON, it converts hexadecimal value to ASCII code.
M1
EN
S :
N :
R0
64. SCII
D :
R100
6
˙Converts the NB0~NB5 of R0~R1 to ASCII code
and stores it into R100~R105
R0=3456H Î R100=0031H(1)
R1=0012H R101=0032H(2)
R102=0033H(3)
R103=0034H(4)
R104=0035H(5)
R105=0036H(6)