CangkeMan Posted December 25, 2021 Report Posted December 25, 2021 Can someone help me how to transfer D memory in gx works 2 but only 8 bit (Mitsubishi D memory is 16 bit cmiiw) ? Quote
waynes Posted December 25, 2021 Report Posted December 25, 2021 Easiest I know is to use the move instruction. MOV K2M0 D0 This moves 2 nibbles (K2=2 nibbles=8 bits) starting at M0 to D0. 1 Quote
Wasan Posted December 25, 2021 Report Posted December 25, 2021 @CangkeMan You should use SMOV or AND data with H0F like this Assume that data in D0 and destination are D10 -| M0 |------[SMOV D0 K2 K2 D10 K2] or use "AND" function -| M0 |------[WAND D0 H0F D10] 2 Quote
panic mode Posted December 27, 2021 Report Posted December 27, 2021 do you want to preserve remaining 8-bits in the destination? 1 Quote
CangkeMan Posted January 5, 2022 Author Report Posted January 5, 2022 @Wasan I didn't find SMOV instruction, I use Q01UD PLC. So i use serial to communicate with some devices. the device can't accept null data (which is one ASCII Character 8 bits data) in the middle or front in the row data of the device format requested. null data must be behind CR in order to be read by the device. how can i move the data 8 bits forward ? https://drive.google.com/file/d/1SdY9aCKCJx5YcUwinYg31LIsBFEEQX2d/view?usp=sharing Quote
CangkeMan Posted January 5, 2022 Author Report Posted January 5, 2022 Thanks for the answers guys, case closed. I am using $+ to combine data and it is work for me. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.