Vinicios Posted July 26, 2023 Report Share Posted July 26, 2023 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 More sharing options...
MVP 2023 Flex727 Posted July 26, 2023 MVP 2023 Report Share Posted July 26, 2023 Moved to U90 forum. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted July 26, 2023 MVP 2023 Report Share Posted July 26, 2023 Perhaps I was too hasty in moving to the U90 forum. A V230 PLC is programmed with VisiLogic, not U90. Link to comment Share on other sites More sharing options...
Vinicios Posted July 26, 2023 Author Report Share Posted July 26, 2023 Correct, I'm using Visilogic, I had the U90 on my head, sorry. I was using the function below. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted July 26, 2023 MVP 2023 Report Share Posted July 26, 2023 Moved to VisiLogic forum. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted July 26, 2023 MVP 2023 Report Share Posted July 26, 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 More sharing options...
MVP 2023 kratmel Posted July 26, 2023 MVP 2023 Report Share Posted July 26, 2023 Hi , you can use vector copy for solve your problem Joe Tauser post this solution I use it for one of my project P.S. You need V230 on table for simulate program via Visilogic Link to comment Share on other sites More sharing options...
Vinicios Posted July 28, 2023 Author Report Share Posted July 28, 2023 Hello again, in the tests carried out with several functions, no bit was shifted, probably I was doing something wrong. I'll analyze Joe's program and understand what I'm doing wrong, thank you very much for now. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted July 28, 2023 MVP 2023 Report Share Posted July 28, 2023 Vinicios, if you have the functions in a subroutine, ensure that you are calling the sub. Utils/Call/Call Subroutine The sub does NOT run if you don't call it. As well, there are other potential issues. Read this: https://forum.unitronics.com/topic/8850-important-sub-routine-advice-updated/ cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 29, 2023 MVP 2023 Report Share Posted July 29, 2023 If you can't get it working upload your program so we can have a look. Joe T. Link to comment Share on other sites More sharing options...
DanT Posted July 31, 2023 Report Share Posted July 31, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now