Jump to content

shift register


Recommended Posts

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. 

 

image.png.addf9bb7304c9aa80406d43584235adb.png

 

thanks in advance,. 

 

 

 

 

 

 

 

Link to comment
Share on other sites

  • MVP 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

  • MVP 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

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

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.

Guest
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...