saruans

Shift bit somachine

4 posts in this topic

Hello,

Maybe somebody know. I am using variable, which address is %MW100. I am trying shifting register bit. I made video. The Variable changed, but variables, which address is %MX100.0 ... %MX100.7  does not change. Why?

ScreenRecorderProject2.mp4

Share this post


Link to post
Share on other sites

Hi saruans,
Bits of words (example: %MWx:X where X is the offset of the bit) 
Try %MX100:0

Regards,
Garry

Share this post


Link to post
Share on other sites

You have to write this

 

    MAIN_SHIFT: Shift_register;
    Registras  AT %MW100    : WORD;
    Registras0 AT %MX100:0 : BOOL;
    Registras1 AT %MX100:1 : BOOL;
    Registras2 AT %MX100:2 : BOOL;
    Registras3 AT %MX100:   : BOOL;
    Registras4 AT %MX100:4 : BOOL;
    Registras5 AT %MX100:5 : BOOL;
    Registras6 AT %MX100:6 : BOOL;
    Registras7 AT %MX100:7 : BOOL;

 

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