Posted 20 Sep 2017 (edited) Dear all! Could you tell me, how to move amount bit anywhere of D1 to anywhere of D2 in PLC Mitsubishi? I read in manual SH(NA)-080809 but I not yet found. Thanks and best regard! Edited 20 Sep 2017 by NgoHoang Share this post Link to post Share on other sites
Posted 21 Sep 2017 Just now, Gambit said: ROR(P) RCR(P) Thanks for yor reply! But my mean is difference: I want to copy 3 bits of D0 ( ex: bit 10 to bit 12) to 3 bit of D1 (bit 2 to bit 4) and another bits of D1 is not change! Thanks and best regard! Share this post Link to post Share on other sites
Posted 21 Sep 2017 Well the easiest would than probably be to use the bit notation of the word adres D0.A, D0.B and D0.C Share this post Link to post Share on other sites
Posted 21 Sep 2017 5 hours ago, Gambit said: Well the easiest would than probably be to use the bit notation of the word adres D0.A, D0.B and D0.C Gambit is correct. There is no instruction that will get three random bits in one word to transfer to another. The best would be using the Kn designation to move 4bits (minimum, 32 bits maximum at 4bit increments) at a time. Share this post Link to post Share on other sites
Posted 22 Sep 2017 (edited) 11 hours ago, Akahige said: Gambit is correct. There is no instruction that will get three random bits in one word to transfer to another. The best would be using the Kn designation to move 4bits (minimum, 32 bits maximum at 4bit increments) at a time. Thanks all! I'm looking for a command same with this command in PLC Omron. If you know it in Mitsubishi, pls post it on the topic Thanks Edited 22 Sep 2017 by NgoHoang Add new image Share this post Link to post Share on other sites
Posted 22 Sep 2017 First: It's very hard to help if you cannot explain what the purpose is. Why do you want to do exactly this? Second: To solve your problem, use a combination of the answers you have already received, and the easiest is probably @Gambit's bit notation when you only have two or three bits. If not, then again please explain what you want to accomplish then it's easier to help you with the most elegant solution. Share this post Link to post Share on other sites
Posted 22 Sep 2017 Just now, kaare_t said: First: It's very hard to help if you cannot explain what the purpose is. Why do you want to do exactly this? Second: To solve your problem, use a combination of the answers you have already received, and the easiest is probably @Gambit's bit notation when you only have two or three bits. If not, then again please explain what you want to accomplish then it's easier to help you with the most elegant solution. Thanks for your reply! I make a example: In some case, PLC receive data 2 word D0 and D1 as below image. I want to merge Data 1 and Data 2 to 1 Word (example D2). Could you tell me the best simple way to do this in PLC Mitsubishi (Last time I do this with Omron is very easy)? Share this post Link to post Share on other sites
Posted 22 Sep 2017 You should look at: DIS(P) 4-bit dissociation of 16-bit data UNI(P) 4-bit linking of 16-bit data WTOB(P), BTOW(P) Data dissociation in byte units, data linking in byte units Share this post Link to post Share on other sites
Posted 22 Sep 2017 1 hour ago, Gambit said: You should look at: DIS(P) 4-bit dissociation of 16-bit data UNI(P) 4-bit linking of 16-bit data WTOB(P), BTOW(P) Data dissociation in byte units, data linking in byte units Dear! DIS, UNI, WTOB, BTOW also can not correct for this matter. So, I can do it by WAND, WOR....with data before merge it. Thanks all Share this post Link to post Share on other sites