
xtal_01 (Customer) asked a question.
Long story but the PLC in an older roofing (panel bending) machine went bad (Direct Logic 105). The company no longer supports the roofing machine. I was able to get a hard copy of the program and a wiring diagram. I do not have the software to read it and it was over 100 lines so I could not use the free version. I posted here a while back was sent a hard copy of of the program (thanks again). I decided a BRX (BX-DM1-18AR) would do the job ...the Direct Logic 105 has been discontinued.
It is a very short program, only 14 lines .... well really only 8 needed I think ...
So, I entered the program using Do-more software. I built a small test panel to simulate the input switches, outputs and the three limit switches.
I have a few questions.
1) The first line of the old program as a first pass only LOAD K2060 into V7633. I was told this was to bring the PLC up in run mode. Do I need this? Can I not just put the switch on the BRX into run? If I "should" put this then what is the new command?
2) I am not sure what the second line of the old program does ... I am hoping someone can tell me. First there is an X20 (Normally Closed) input. This does not make sense to me as there was no X20 on the Direct Logic unit. Was X20 some kind of internal bit that means something? It sets off a timer (T10 ... K100 ... I "think" I read K100 is .1 seconds ????? **** ) The done bit turns on the output Y7 ... but there is nothing connected to Y7. I just don't understand why this is there.
^*** there is not units behind any of the three timer "K" values ... are they in ms or ? ****
3) This is just a general PLC question. The original program had an END coil. I forgot to put one in the new program ... loaded it and it ran ... didn't get a warning. Do I need a END coil? Is it just good practice or ???? I do know you can use it for debugging to end at any point in the program but do or should you put an END at the program? I did go back and put it in and there was no change in the running of the program.
The next two items are more less important but more of "why did they do this" items.
4) I am hoping someone with more PLC programing experience that me (that should not be hard) can look at the program. On line 8 of the old program (ZIP.pdf) and line 6 of the new program (BRX_PLC_ROOF.pdf) ...exact same program, I entered it line for line, just missing the "first scan" and X20 lines I mentioned above ... there is a Timer (T1) that is triggered by C5 (the shear down logic output) but can never actually trigger the output Y2 as X2 and X3 are contacts on the HOA switch and can never be on at the same time. My "guess" is that someone meant to put T1 just one line down in parallel with C5 as a sore of "de-bounce" ... making sure that even if you just tapped the shear button quickly, it would actuate. Does this make sense ????
5) I think there is a lot of "junk" left in the program. I was told when the machine was new it had a complete computer on it to cut panels to length. This died and rather spend $$$$ fixing it, the factory tech rebuilt the controls as a much simpler machine using just a limit switch to set the length. It looks to me like they did this to all machines as the drawings showing this wiring are direct for a factory manual ... maybe the computer was more of an "add on" option. From line 11 on the old program (line 8 in the new program) down must looks like junk. Some things will never happen (again as X2 and X3 on the HOA can't be on at the same time). Some times even if an output turns on (at one point there is a Y4 ... it is not connected to anything ... and Y6 on the drawing is marked as spare) it just won't matter. I just want to see if anyone has the same opinion ... that the lower part of this program is just "junk".
I did put an END coil after line 11 (8) and tested the panel ... worked as it should, no issues.
If it is "junk" as it seems, is it best to leave it as it seems to be doing no damage or it best to get rid of all these lines and clean up the program?
I really appreciate any help or advice with this project.
Thanks ... Mike
My "Assumption' is this Program you have the Print Out for, is from 'File', and it's Possible it has Errors.. Because it did not come from a Running Machine..
First Line is a 'Function' of the PLC.. Not needed for the BRX..
Second and third line I THINK are an 'Unused Start Up Delay'.. Ghost in the Machine I think.. X20 will always be off.. So it will be the Same as Always On Contact when used in the Inverse Condition.... I've left Ghosts in Programming Before, as I might come back and use it 'Later' ( Never ).
End Statements are a Function of the PLC.. Some need them, Some Don't..
As far as the rest of the Program .. again it could be just remaining Ghosts..
It's now your Program.. So Re-Write it as to something you are Comfortable with.. Because your name will now be on it till it also Dies.. and you will be the One having to explain it to others..
ALWAYS Comment your Lines.. and if you leave things in the Program.. Note as to why.. I've got Programs I wrote 20 Years ago.. and Having Notes in the Program helps me to figure I why I did such Crazy $h!*
Cap
Thanks so very much for the advice! After looking over the program, I did decide today to re-write it. I am putting comments on every line so I can remember what I did.
I guess I was just surprised that someone did not "clean up" this program. As you said, maybe it was just a working version ... maybe a final version.
It is probably 20 plus years old. The company is still in business but no longer makes these machines.
I was lucky to find they still could give me what they did and a schematic. They said they did not even have software to read the program file anymore.
Thanks .... Mike