Vinicios Posted July 26 Report Share Posted July 26 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 26 MVP 2022 Report Share Posted July 26 Moved to U90 forum. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 26 MVP 2022 Report Share Posted July 26 Perhaps I was too hasty in moving to the U90 forum. A V230 PLC is programmed with VisiLogic, not U90. Quote Link to comment Share on other sites More sharing options...
Vinicios Posted July 26 Author Report Share Posted July 26 Correct, I'm using Visilogic, I had the U90 on my head, sorry. I was using the function below. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 26 MVP 2022 Report Share Posted July 26 Moved to VisiLogic forum. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 26 MVP 2022 Report Share Posted July 26 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). Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted July 26 MVP 2022 Report Share Posted July 26 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 Quote Link to comment Share on other sites More sharing options...
Vinicios Posted July 28 Author Report Share Posted July 28 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted July 28 MVP 2022 Report Share Posted July 28 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 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted July 29 MVP 2022 Report Share Posted July 29 If you can't get it working upload your program so we can have a look. Joe T. Quote Link to comment Share on other sites More sharing options...
DanT Posted July 31 Report Share Posted July 31 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.