KETBDcode Posted July 1, 2015 Report Posted July 1, 2015 On previous jobs with a Q series or FX3U plc there is a way to turn on a specified bit of a data register (----ll----------------------(D20.5). In this example it would turn on bit 5 in the data register D20. I would like to do something similar for a current project with a FX3G plc, but this option is not available. Is there an alternative? I would like to single out specified bits for communication with GOT system information data. Quote
Bryll Posted July 1, 2015 Report Posted July 1, 2015 (edited) I had the same problem when stepping down from FX3U to FX3G. Don't know if it's the best way, but it works for me. Move D20 to 16 M-positions, MOV_M (D20, K4M0) turn on the bit M5 Move the M-positions back to your register, MOV_M (K4M0, D20) D20.5 is now on Edited July 1, 2015 by Bryll Quote
Inntele Posted July 1, 2015 Report Posted July 1, 2015 (edited) Too difficult... A smooth code is following: LD BitWOR H0020 D20 D20INVWAND HFFDF D20 D20 Edited July 1, 2015 by Inntele Quote
JRoss Posted July 2, 2015 Report Posted July 2, 2015 Yeah, that feature is disabled on the FX3G. If you're talking about a single bit in a specialize application, then use Inntele's method. If you're doing this with a bunch of bits in the same word, then really the best choice is to just use M bits. However, if you need to pack them into a D register for some reason (recipes storage, for example) then I would use KETBDcode's method. For what it's worth, the GOT series HMI (and perhaps others?) can address to the bit level, even on the FX3G. Quote
KETBDcode Posted July 2, 2015 Author Report Posted July 2, 2015 I think I got too use to doing it the other way. Felt dumb after reading replies as I should have been able to figure it out. It was easy using bryll's method by simply moving k4M** to the data register. I'm sure the other method is good also. Thanks for the help. Quote
Inntele Posted July 3, 2015 Report Posted July 3, 2015 The "WOR H0020 D20 D20" is an equivalent to "SET D20.5" The "WAND HFFDF D20 D20" is an equivalent to "RST D20.5" 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.