S5 hidden code

kiegmann

Member
Join Date
Apr 2006
Location
Winona, MN
Posts
26
A program I am decoding has a FB that shows a size of 1174 but only displays a few lines. I converted it into S7 and I can view the entire code, but I want to know if I can do something that will keep it in S5 format.
 
I have come accross this where there is a jump to a label past the block end instruction which Step 5 decides is the end of the block and hence doesn't show the rest of it. I think (I haven't done this in a while so I may be wrong) you just have to delete the block end and the rest of the block appears.
 
Simon,

I'm afraid it's not that simple. I've never been able to simply remove the BE instruction, but then it has always been with Step5 V5 or before. I always had to replace the 6500 machinecode in the memory with an 0000 (NOP 0) code. But because bit fiddling is only to be performed by someone knowing what he's/she's doing, I won't go further telling how. It's way to tricky. If you're only mistaken one memory location, it might make the complete PLC unuseable. I would never do this when I'm under any kind of pressure, just because of the high risk involved.


Kind regards,
 
Thanks Jean
The software I'm using is S5/S7 for Windows and I don't know if I would want to play around with the raw code. The funny thing is that we don't even have a Siemens TDOP connected to the press so I can just delete it (and I have on one press). I'd rather know whats going on it there although, so I guess I'll have to start learning S7 so I can do that.
 
It's probably a siemens standard block.

you can change the jump M001 to NOP0 using a hex editor if you know how the block is structured, but beware siemens use some kind of compiler to generate a lot of their code & there may be instructions that are nor documented in S5, one of them is loading an MC5 instruction (hex code) into the RS area then DO the RS word this runs the MC5 code in the RS.
 
Thanks Parky
Before the FB 48 call there is a L KY 51,0 and when running the simulator on a PC the error "FB 48 instruction can't be loaded: L RS 42". That sounds kinda like what you are saying. I will be looking at the S5 to S7 converted code today to see whats in there.
 
In many instances if you convert standard siemens s5 blocks the S7 converter will create a dummy function if it cannot de-compile the code. I was called to a company that had converted an old s110 to S7 & it would not work, the standard blocks were for sequence programming, I ended up creating a simple step sequencer that did the job in smaller code & was easy to understand.

I suggest you find out how the system should run then start from scratch.
 
kiegmann said:
Before the FB 48 call there is a L KY 51,0.
Hi
Looks like you try to convert standard FB51 (TDOP:511) from S5 to S7. Just for sure, is there a code in OB20,OB21 and OB22 which load number "1" to DB51,DW64. If is, then You can forget that FB!
In S7 you don't need any communication FB's between OP and PLC.

-Pete- 🍺
 
Inat S5/S7 software. You can convert back and forth. Note: The program is runnning on an S5 and will still run on an S5. I tried converting it to S7 for s***'s and giggles and it worked. I most likely don't need the code as we no longer us a Siemens TDOP, but I'm curious as to what it does. There are several DB that are likely used by only this FB and I could get rid of them as well. Some SCADA routines I might put in would put the size well above the memory limit.

Thanks all for the replys

p.s. Pete - there is indeed DB51, DW64 set to 1 in OB21 and 22!

Thanks
 
Last edited:

Similar Topics

I've got a problem with Omron Sysmac CPM1A-40CDR-D. My machine controlled by cpm1a doesn't make all programmed moves like before. I suppose PLC is...
Replies
0
Views
1,439
Hi, I'm an absolute beginner in PLCs.. I have an Allen Bradley SLC5/03 PLC installed on a machine, the program is working well, I uploaded it to...
Replies
25
Views
3,841
Hi, I'm a bit new to this and this is my first post, so I hope I'm doing this right. I have an Allen Bradley Family 5 PLC in our plant and I am...
Replies
17
Views
4,538
I have a S5-115U, 941B.... In OB1, I can see some block calls Like JU PB16, JU PB17 and so on.... But in the Directory I don't see these blocks at...
Replies
44
Views
10,780
Hello, I have a problem with Eplan, and I can't seem to find answer anywhere online. I am working on a project, and I have many pages of...
Replies
2
Views
3,101
Back
Top Bottom