Sign in to follow this  
Followers 0
Shamus

Bit array

2 posts in this topic

Hello All I have the following bit arrays declared Fire1 - M100 ARRAY [0-31] OF BOOL Fire2 - M132 ARRAY [0-31] OF BOOL I'm using the various bits in my program (FX1N) and would like to compare the all the bits for not equal to zero. I'm trying to DMOV_M the 32 bits of the array into VarD0 (D0 - 32bit) so I can compare the 32bits at in one go but the software doesn't like the input to DMOV_M. can someone help me out. I'm Using GX IEC Developer V7.01 regards Shamus

Share this post


Link to post
Share on other sites
Don't know about IEC version but this is how you check for non-zero value in 32-bit (8 nibbles) in standard GX [D<> K8M100 K0]----------------------(M200) // Fire1 [D<> K8M132 K0]----------------------(M201) // Fire2 If you are using MOV instruction: --| |-------------------------------[DMOV K8M100 D100] --| |-------------------------------[DMOV K8M132 D102] or for 16-bit (4 nibbles): --| |-------------------------------[DMOV K4M100 D100] --| |-------------------------------[DMOV K4M116 D101] --| |-------------------------------[DMOV K4M132 D102] --| |-------------------------------[DMOV K4M148 D103] Check user manual for GX Developer.

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
Sign in to follow this  
Followers 0