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.



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



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.



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...