Mac9010 Posted May 6, 2023 Report Share Posted May 6, 2023 hi everyone! I am trying to do a program with the function "shift register" Mi problem is the next I have a machine that has a camera, and it takes a photo about a "code" if the code is correct the camera send a signal "ok" or 1. to my PLC. and now when the camera send a signal bad or "0" , and now i would like to make the next. final discard camera bit 1 1 1 1 1 1 1 0 1 camera bit 1 1 1 1 1 1 1 1 0 when the signal goes to cero in a specific point of the machine , i want to activate a signal to discard the product that didn't has the correct code. Someone could help me with this?? or could explain to me, how to can I use the shift registrer. thanks in advance,. Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted May 7, 2023 MVP 2023 Report Share Posted May 7, 2023 Please use this solution You can use vector of MB and Vector copy with overlapping and no need to use shift register. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted May 8, 2023 MVP 2023 Report Share Posted May 8, 2023 @kratmel - He's working in a Jazz. It doesn't have the nice Vector copy functions. You'll need two of the Special Functions. You've already started playing with the Shift Register, which is what you'll need to walk your camera data along in an MI. Note that an MI is 16 bits, so if the distance from the camera to the rejection point is more than 16 increments you may have a problem. Next you'll need to extract the data at the reject station by using a Convert MI to MB function. This will allow you to easily examine just one bit, which you can tied to your reject mechanism. Look at Help->Sample U90 Projects->Basic Ladder Operation for some example projects. Then post your program here so we can see what you've done. Joe T. Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted May 8, 2023 MVP 2023 Report Share Posted May 8, 2023 15 hours ago, Joe Tauser said: It doesn't have the nice Vector copy functions. Joe I agree that copying the bit vector is not stated in the U90 ladder. However, the author can operate with numbers and use Vector Copy for MI variables present in U90 as SI140-SI143. That is, the object seen by the camera is recorded in MI with the number 1, and the missing object = 0. Next, by double copying MI vectors, we implement a shift with an overlap if it cannot be done as in visilogic. Although I haven't tried to do MI vector copy with overlapping in U90 ladder. Experiment needed for test Link to comment Share on other sites More sharing options...
Mac9010 Posted May 9, 2023 Author Report Share Posted May 9, 2023 On 5/7/2023 at 11:24 PM, Joe Tauser said: @kratmel - He's working in a Jazz. It doesn't have the nice Vector copy functions. You'll need two of the Special Functions. You've already started playing with the Shift Register, which is what you'll need to walk your camera data along in an MI. Note that an MI is 16 bits, so if the distance from the camera to the rejection point is more than 16 increments you may have a problem. Next you'll need to extract the data at the reject station by using a Convert MI to MB function. This will allow you to easily examine just one bit, which you can tied to your reject mechanism. Look at Help->Sample U90 Projects->Basic Ladder Operation for some example projects. Then post your program here so we can see what you've done. Joe T. Thanks a lot Joe T. I check the examples project but i couldn't understand how to use Convert MI to MB function. Could you help me with this? Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted May 11, 2023 MVP 2023 Report Share Posted May 11, 2023 Can you upload your program? Joe T. 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