KETBDcode

FX3G turning on specified bits

6 posts in this topic

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.

Share this post


Link to post
Share on other sites
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 by Bryll

Share this post


Link to post
Share on other sites
Too difficult... A smooth code is following: LD BitWOR H0020 D20 D20INVWAND HFFDF D20 D20 Edited by Inntele

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
The "WOR H0020 D20 D20" is an equivalent to "SET D20.5" The "WAND HFFDF D20 D20" is an equivalent to "RST D20.5"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now