Sign in to follow this  
Followers 0
JAT

Storing Data i.e. like a recipe for different variants that I need to inspect, what's the best w

7 posts in this topic

Hi There, This is my first post, hope you can help. I am using RS Logix 500 with a Micrologix 1100 and panelview 300. I am starting to structure out a new PLC program where I need to take into account the inspection of about 40 different areas on a product. The inspection means that I need to trigger a vision system once per area. The system will also consist of up to 20 different variants where they will have different combinations of the 40 areas to be inspected. Therefore I want to store the data for the different variants somehow. My thoughts were the following: a) Use the Integer Data Table and Assign 4 Words per Variant, thus filling it with the correct sequence and allowing for future expansion (i.e. up to 64) b) Then when performing the inspection copy this data to a binary data table and bit-shift through as each area is selected for inspection, thus only perform the inspection if a logic 1 is present. My questions are: Is there a better way? Also in order to store this data to the Integer Data table, if that's the way to go, can it be set without needing to assign each value in the PLC program at power up? i.e. is there a way to store such data that will remain constant? I have used data blocks with Siemens before... Also I would like to make it easy to change the Variants via the HMI or Even add new ones at some stage.. Or am I missing the point and panelbuilder32 could give me the answers? I haven't used this yet Thanks for your help James

Share this post


Link to post
Share on other sites
James! Best you'd give a few details on how you intend to communicate with the vision system first. The setup data part is pretty simple, if it's just 4 words per product. Most of the work (probably) will be to support the PanelView. Back to you.......

Share this post


Link to post
Share on other sites
James. Since the PLC/HMI hardware you are using is fairly small scale I would seriously look at the possibility of storing the data in the Vision system. Most modern camera's have far more storage available than the ML or the Panelview 300. regards Andybr.

Share this post


Link to post
Share on other sites
Dear James: If I understand your layout correctly you have a MicroLogix PLC and a Panelview 300 communicating with a vision system. The vision system can inspect between 1 and 40 points {Future expansion to 64} on a given product. In the PLC you want to store sets of Inspection Masks where a 1 in the mask means do this inspecion and a 0 means skip. At the present time you have 20 products or inspection schemes planned. Try the following scheme for starters: In the ML N7:0 = Product Identifying Number { Must be Limited 0 to 63 - you Only needed 20} N7:1 = Table Beginning Pointer { equals N7:0 x 4} N7:2 = Present Step Inspectiing {Values of 0 to 63 are valid} Create N17 as a data table of size 255 to support 63 parts. With This scheme N17:[N7:1]/[N7:2} gives you the boolean for the test you are about to run. Incrementing N7:2 gets you to the next test. For PV Communication B13/0 thru B13/63 are lamps for inspections 1 thru 64 you'll need several screens probably. B13/64 thru B13/127 are Pushbuttons to toggle inspections on/off. N7:3 is Present Product being manipulated by PV. N7:4 is Product Number to UpLoad / Download. B3/0 is Pushbutton to Upload a new Product to PV for Manipulation. Copying N17:[N7:4] to B13:0 for 4 words gets the present settings for a part. Copying N7:4 to N7:3 acknowledges the Upload Completed. B3/1 is Pushbutton to Download a new Product to PLC after Manipulation. Copying B13:0 to N17:[N7:3] for 4 words sets the present settings for a part. It is obvious from your work with siemens that you are unaware that a ML Data File will retain its contents thru power up and power down cycles. Once a part is stored in the N17 table it is always there for manipulation. Hope the above helps.

Share this post


Link to post
Share on other sites
Panelviews store their data. When the Panelview powers down and powers back up and connects to the PLC, if you have it set correctly, it will send all the set points stored in it to the PLC. You can upload the settings off the Panelview whenever you want to make a backup copy. Or you can restore settings by downloading a backup copy of the Panelview program. Most of the time, this Panelview "feature" is just plain annoying. Every time I go to make changes to the Panelview, I have to make sure to copy off the old running program, apply changes, and then put it right back in. If I don't all the operator's current settings revert back to whatever I had when I last made a backup copy. But in your case, it's just what you are probably looking for. And I second the previous statement that AB PLC's don't "forget", most of the time. I'm not sure why you want to do bit shifting either. If each bit corresponds to a single test, it is far easier to use absolute references corresponding to each test. Read up carefully on indirect addressing. This is how you do arrays with AB PLC's. But you are not limited to one-dimensional arrays like it seems at first. You can create an array of tables and set two indirect variables. N[X]:[Y] is legal and one way to do it. You can also create multidimensional arrays with a single data table. For instance, I have 2 weights (max. and min.) stored in my PLC's. The product has 9 series, 3 models, and 12 versions of each one. So to determine the maximum weight, I calculate N7:10=9*series_num+3*model_num+12*version_num*2. N100:[N7:10] returns the maximum weight. Then I can use ADD to calculate N7:11=N7:10+1. So N100:[N7:11] returns the minimum weight. Before you go and attempt to calculate indirect addresses on bits (B[X]:[Y]/[Z]), hold on a minute. It is a legal PLC 5 instruction but there is a bug in RS-Logix so it won't let you do it.

Share this post


Link to post
Share on other sites
Thanks for your help guys, Since I didn't get any responses for a while, I went ahead by bit shifting and writting and storing to RCP files stored in the PLC. Seems to work really well. Thanks again. James

Share this post


Link to post
Share on other sites
You might also try using four different files to store the four parameters, one parameter per file, and then use a single indirect address pointer to access all parameters. For example, files are N10, N11, N12, and N13 with 40 elements each. You select which set of parameters by placing a number 0-39 in N7:0. Then your four parameters are at N10:[N7:0], N11:[N7:0], N12:[N7:0], N13:[N7:0]. This way there is no need to move data around or calculate any offsets for indirect addressing.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0