Jump to content

Help with shift function


Recommended Posts

I need help with the SHR function to shift bits, I can't shift anything. I get The high or low signal from an inspection camera and would need to reject the failed products.

I've already read the material in help and on the forum and i've had no sucess.

I'm using U90 ladder for a V230 hmi.

 

Thanks.

Link to comment
Share on other sites

  • MVP 2023

Can you describe your problem a little more clearly besides "I can't shift anything"? What exactly does it do when you press F1? Further, if you only want a single bit shifted, you might consider changing the Direct Contact of F1 to a Positive Transition Contact. At the bottom of your VisiLogic screen you have the ability to inspect your integer operands in binary. Watch that window when you're performing the shift operation (when online with the PLC, of course).

Link to comment
Share on other sites

Hi;

 

In the screen shot, F1  is a NO Contact.

That means as long as F1 is Pressed, the shift will happen every scan cycle.

So the data will be thru the shifting in say 16 cycles. - a blink of the eye.

Try with a   ---|P|----   for   F1  and every time the F1 key is pressed, then 1 shift at a time -  abd observe the output.

Aslo, if it in a subroutine, be sure it is being called.  and maybe note how you are calling the subroutine - every scan cycle or intermittent.

As Joe noted, post the program so we can see the whole picture.

 

DanT

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.