[Instruction] Contents

[Instruction] Contents [Instruction] Contents

servotechnica.ru
from servotechnica.ru More from this publisher
13.07.2015 Views

Advanced Function InstructionFUN55 D PB→GBINARY-CODE TO GRAY-CODE CONVERSIONFUN55 D PB→GExample 2: When M0 =1, it will perform the 32-bit code conversionM0EN55DP.B G ˙Converting the 32-bit Binary-code in DR0 intoS :D :R0R100Gray-code, and then storing the result into DR100.DR0= 00110111001001000010111100010100B DR100= 00101100101101100011100010011110B7-31

Advanced Function InstructionFUN56 D PG→BGRAY-CODE TO BINARY-CODE CONVERSIONFUN56 D PG→BS :Starting of sourceD :Starting address of destinationS , D operand can combine V 、 Z 、 P0~P9 for indexaddressingOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D40950~FFFFH0~FFFFFFFFHP0~P9S ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○D ○ ○ ○ ○ ○* ○ ○V、Z●When operation control "EN"=1 or "EN↑"( P instruction) changes from 0→1, it will perform the codeconversion; where S is the source (Gray code), and D is the destination (Binary code) for storing theresult.● The conversion method shown as below :Example 1: When M0 changes from 0→1, it will perform the 16-bit code conversionM056P.G BEN S :D :D0D100˙Converting the 16-bit Gray-code in D0 into Binary-code,and then storing the result into D100.D0= 1001010101010011B D100= 1110011001100010B7-32

Advanced Function <strong>Instruction</strong>FUN55 D PB→GBINARY-CODE TO GRAY-CODE CONVERSIONFUN55 D PB→GExample 2: When M0 =1, it will perform the 32-bit code conversionM0EN55DP.B G ˙Converting the 32-bit Binary-code in DR0 intoS :D :R0R100Gray-code, and then storing the result into DR100.DR0= 00110111001001000010111100010100B DR100= 00101100101101100011100010011110B7-31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!