Sign in to follow this  
Followers 0
Mark

MicroLogix 1100 PLC Code use or write new

18 posts in this topic

I uploaded the ladder logic and data files from a Micrologix 1100 this afternoon of a panel that someone built. The builder’s relationship went sour and my customer is looking for support. They most likely will not get the programming files (.rss) for this panel. My thoughts are the upload file is like machine code. How do you go about figuring out what is going on? There are around 140 rungs in one main program. There are a good number of timers and counters. It is designed to work with the PanelView Plus file that screenshots are available. What is missing are tags, rung comments, etc. So, knowing the I\O and if I had RSViewME is it feasible to use the existing PLC code? Is it better to start over by writing a new program? Your thoughts are appreciated.

Share this post


Link to post
Share on other sites
I think that building on the existing code, especially if it runs the machine correctly, is the way to go. 140 rungs is not that large a program in my humble opinion. Your first asset is that this is a small system with a small number of I/O, so tracing out (or using a wiring diagram) and labelling the physical Input and Output bits and words will provide a very good start. If you can reverse the RSView ME runtime file into a project file, you can label a lot of data display and data entry elements (integer and floating point and bit memory locations) because you will know the function of the screen objects to which they are linked. There have been threads on this and other forums about how to rebuild RSView ME project files from runtime files.

Share this post


Link to post
Share on other sites
A little more information: 36 of the 55 identified Timers show preset values; as in they are probably used in the program. 8 of 9 Counters have preset values. N7:0 to N7:120 showing data on seven of the rows (series) Three Floating Point rows with two of them showing some data. Micrologix 1100, (2) OB16 cards, (1) IF2DF2 card

Share this post


Link to post
Share on other sites
Attach the file and I am sure someone will take a look at it and offer ideas.. Have a good one, Bob O.

Share this post


Link to post
Share on other sites
PLC File attached, comments are appreciated ML1100.RSS

Share this post


Link to post
Share on other sites
Mark, just getting your IO documented will go a long ways. I have attahced an Excel spreadsheet that you should find usefull It is set up for creating a file to import address symbols and comments. In excel you can use the auto fill feature with AB PLC addresses. To do this, in cell A2 enter I:0/0 and then in cell A3 enter I:0/1. Click in cell A1, hold the mouse button down and drag down one cell to select both cells. Now release the mouse button and hover the mouse over the lower right hand corner of cell A3 until you the pointer changes from the big + outline to to a small +. Now click and drag straight down to create automatically numbered entries for your addresses. Repeat for base unit outputs and the expansion output modules. Now fill in the rest of the information for each of the IO points. If you enter a string that is too long the field will turn yellow to prompt you to enter something shorter. Once you have that done then delete the top row of the spreadsheet and (any blank rows between entries) and save it as a CSV file. Then import the CSV file into RSLogix500 Tools->Database->Ascii import. From there you can then start to document things like all those counters and timers that are triggered off from an input address. I think that as soon as you do that then things will start to fall into place. That program doesn't look to be particularly complex so it should not be too difficult to reverse document. slc500csv.xls Edited by Alaric

Share this post


Link to post
Share on other sites
That program doesn't look to be particularly complex so it should not be too difficult to reverse document.

Share this post


Link to post
Share on other sites
Greetings Mark ... while you're working on this, you might want to investigate the operation of bit B3/36 ... your program has several instances where a timer Done bit "latches" a binary bit ON ... and then in the next rung, the bit is "unlatched" to an OFF condition ... see the operation of bit B3/37 as an example ... but notice that for B3/36 an OTE is being used - instead of an OTL ... I'll bet (more than pocket change) that the original programmer made a slight slip of the finger there ... it might not change the operation of your program, but it sure looks fishy to me ... you might also want to take a look at the IIM being used in Ladder File #3 ... this ladder is set up as an STI (Selectable Timed Interrupt) which executes once each 7 milliseconds ... it seems strange that the mask for the IIM has been set to update bits I:0/0 through I:0/7 - but NOT bit I:0/8 ... and we see that I:0/8 is indeed being used (right next door to I:0/7) in rung number 112 ... not that there's anything WRONG with that ... but it does seem a little bit strange ... going further ... normally we don't expect to see a programmer using an STI to "update" the input table by using an IIM - UNLESS there is also some specific logic that is also being executed by the same STI ... specifically, it doesn't usually make a lot of sense to "look at" the inputs more often than once (at the beginning of the scan) if you're not going to actually use that information more than once per scan ... I'm not saying that it can't be done - it's just that it doesn't look quite right ... anyway ... just some more things for you to think about ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
Mark - not only can you document with a CSV but you can build *.SLC library files with Excel macros and have excel write your repetitive code. Did a system with 32 identical zones of 5 motors and six PE's each zone. I wrote the first one in about two hours and Excel created the rest in about 2 minutes.

Share this post


Link to post
Share on other sites
Here is the IO documented from the wiring diagrams. I used Excel, saved the file as a .csv and imported through Tools>Database>ASCII Import. I think the IO is a good start. It appears the B3 information would be helpful. I currently do not have RSView ME. Is there another way to open an *.apa file for a PanelView Plus. I have PanelBuilder32 software. I can get access to the panel in a 15 minute drive. Would I be able to get the bit address information through the touch screen? Attached is the .apa file (saved as a .pba). Is it possible to export ASCII information and post/send it so I could put it in the plc file? Ron, Thanks for pointing out B3/36 and B3/37. Could this have been something put in during debug to correct a problem? Ladder file #3 may be a mistake by not including I:0/8. Also, maybe they wanted to use the IIM to optimize the flow element counters. Bob, I'll be looking forward to building with *.SLC libraries and excel macros as I get up to speed. btw, excellent Forum, this is the most helpful one that I have come across ML1100.RSS Edited by Mark

Share this post


Link to post
Share on other sites
Extension of the HMI file suggests that this is PanelView Classic, not the PanelView Plus. But I could't open it (seams corrupt). Software for PV Classic is PanelBuilder32

Share this post


Link to post
Share on other sites
Rename the extension back to .apa and restore using RSViewME I have no idea why he redid the extension.

Share this post


Link to post
Share on other sites
working with an undocumented program is cumbersome but not impossible. If the machine is operational, I would keep the code and work from there. You're bigger problem would possibly be the PV+ (hateful thing it is, a pox on AB for developing this) You could UPLOAD the older PV files, but you can't on the newer PV+ and get the application only the downloaded compiled code. So you can't make any modifications to this w/o the actually application files. If you were going to have to redo the PV+ anyway, you might certainly want to clean up some if not all the plc code at the same time. Do you at least have schematics for the system? that will make deciphering the code quite a bit easier. bob

Share this post


Link to post
Share on other sites
100% true, besides this program is so small and it has HMI file, i've been able to figure out most comments in less than an hour but this is Marks job and besides, I don't want to get involved in some disputes... Mark, You can identfy some of the addresses using HMI program (if this is more or less recent version). you still need to know (or learn it if you don't know already) how the system works (actual process and all modes). I looked at the HMI program and if this is what actually runs, I would call it incomplete but it helped. plc program seam to be in similar shape. you can trim that down and clean a bit: - all code is in one file (not much of it but still...) - very first rung does nothing (T4:50) and can be removed. - T4:30 is also an oscillator (flasher bit for running indicators) but the preset of 50ms is much shorter than limit in following rung so B3:0/0 is always on (run indicators are not flashing after 5 seconds, they are continuous when I:0/7 and I:0/8 are active). - there is bunch of ONS bits which are not just identical (condition in front of them is same) but they are redundant since that condition is already one shot... (i'm talking about B3:0/1...B3:0/6, all of them are after T4:0/DN - which is only active for one scan anyway) - there is bunch of more addresses only used once (B3:20/6, N7:0, N7:8, F8:6...) - scaling of analogs is ... unusual. HMI show GPM (flow rate) while logic seam to show totalized values (volume). need more info on sensor to know for sure... - some of the counters are not doing anything (not affecting program execution and not displayed on hmi) - currently longest observed scan is 8.8ms and current scan time is only 2.6ms while interrupt is set to do immediate update of first few inputs only every 7ms (!?). also this only updates inputs while counters are with the rest of logic... - hmi tags are scattered and use is not consistant. better arangement of HMI tags may further improve the scan time - there are no alarms or any diagnostic whatsoever - mode switching is strange as well. turning off mode indicators happens after delay so one can see more than one mode active at the same time. many signals seam to have few derivates (phases) - mode indication not working on screen with both tanks (it seam to be ok on individual tank screens) - valves, pumps, pressure switches etc don't seam to be animated (just sitting dead on the screen) etc.

Share this post


Link to post
Share on other sites
First, thanks for the good comments. I do have schematics and verified the BOM does match at least by 50%, gives me question to the rest. Luckily this week I got hold of the Specifications, GA, P&ID and Sequence of Operations! What a blessing. Now, I would like to get the hardware at my office to try out some of your comments on the HMI. Like I mentioned earlier, I have PanelBuilder32, does me no good with this HMI. But, I should be able to garner lots of data right through the screen, right?

Share this post


Link to post
Share on other sites
With that latch/unlatch thing. It could be possible that the machine never worked quite right. I've noticed troubleshooting machines make you a lot like Dr. House on TV. It does strange things and you can spend three days figuring it out, until you manage to choke it out of someone that they changed one of the valves to a completely different style. I'm betting this machine never worked correctly, but either no one noticed or no one cared enough to say anything.

Share this post


Link to post
Share on other sites
. . . the panel supposedly was "tested" and ready for installation. May not have caught this during "testing" would probably catch it during install if it presented itself. Customer claims a Logix family processor is desired, not a Micrologix which isn't the same. There must be a thread about A-Bs naming convention of Logix

Share this post


Link to post
Share on other sites
well, MicroLogix was accepted by the customer The PV+ has the program loaded and runs on startup. This being a touchscreen there doesn't seem to be a way to configure it unless I have the PV+ program as there isn't a button to allow access behind the scenes. Looks like it's time to spend that ~$700 for the PV+ software.

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