s5 program problem

michaelchan

Member
Join Date
Jun 2007
Location
FUJIAN PROVINCE
Posts
43
Hi all,I have a second-hand machine with S5 controller,I could not startup the system because of program problem,there is always a set bit in FB2 segment1,the bit would triger a [program problem] message on message display unit.I checked Istack found CLO,ERAB,AF... are detected,I am new with S5,could anyone explain this to me?

PS the attached file is the program.
 
michaelchan said:
Hi all,I have a second-hand machine with S5 controller,I could not startup the system because of program problem,there is always a set bit in FB2 segment1,the bit would triger a [program problem] message on message display unit.I checked Istack found CLO,ERAB,AF... are detected,I am new with S5,could anyone explain this to me?

PS the attached file is the program.

The Istack only gives info on a processor fault. It will not tell you info on a program condition that is not working. I am assuming the S5-CPU has not faulted.

attached is the ISTACK explantion from the S5-115U manual
 
I cannot see anything wrong with segment 1 of FB2?
However there appears to be a problem with segment 2 in that there are two "JC's". I beleive that the second JC should be a JU.
Please confirm where you think the problem is?
 
Hi curlyandshemp,thanks for your reply,s5 software is so hard for me.moggie,I've uploaded detailed info,I don't think the program is error,I just don't understand why RLO status in FB2 segment1 is 1(not 0) which trigger message diaplay unit a fault display,what set it 1?segment1 is not like segment2 is easy to understand.sronggot,I also hope the program is fine,I've spent lots of time on startup the system.
 
The RLO Status only changes when an instruction changes it, like an AND Flag x.y etc. The instructions in Seg.1 are opening a DB and loading data, so the RLO remains uneffected.

How many segments do you have in FB2, I don't think the problem is where you are. For a start the accumulators shows values of 6C Hex(108 decimal) and 6E Hex (110 Decimal), the only load you show is 130, so not one of the above, the fault occurs after the above values have been loaded.

If I remember correct the REL-SAC shows where in the block the fault occurs (its a long toime since I used an S5, so cannot remember how you bring up the address).

The STOPS is what caused the fault, when you highlight that what does it say?

By the way, page 1 of the ISTACK does not tell you much, page 2 always put you onto the fault.



EDIT:
Segment 1 is easy, its placing the value of 130 into Data Word 0 of DB4.


EDIT2:
Segment 2 has an error, as someone has said, the second JC should be a JU, this would not cause the PLC to crash.
 
Last edited:
Error Number?

michaelchan,

Are you getting a error number? Such as error 125, 126,... I looked at the code in FB 2. There are 121 segments in that FB and the first 106 are looking for certian conditions to be made, then they put a KF number into DB 4 DW 0. If you know the number in DB 4 DW 0, then you could trace it back to which segment is giving you the problem. Also as stated above the second JC looks like it should have been JU in segments 2 - 106. Hope this helps.
 
Last edited:
Forgot to engage brain before last post.

michaelchan,

Upon futher investigation I saw that there is a 99 stored in DB 4 DW 0. If this is the error you have been getting it is set by F 9.3, which is set in OB 13 segment 25 (TOP STOP) or in PB 3 segment 8 (TOP - STOP) by Input 40.0 being 0 If you can find out why Input 40.0 is not a 1 this may lead you to the problem.
 
lhughes39 said:
michaelchan,

Are you getting a error number? Such as error 125, 126,... I looked at the code in FB 2. There are 121 segments in that FB and the first 106 are looking for certian conditions to be made, then they put a KF number into DB 4 DW 0. If you know the number in DB 4 DW 0, then you could trace it back to which segment is giving you the problem. Also as stated above the second JC looks like it should have been JU in segments 2 - 106. Hope this helps.
I found the problem,it's the other segment cause the problem as you said,thanks 1hughes39,thanks all.
 

Similar Topics

Hi dears I am facing problem during program upload on S7 200 (226 cpu)microwin 4 sp9 closes on 100% I try to upload data blocks, its ok, System...
Replies
8
Views
2,452
Hello everyone. I'm trying to write a program in ST which would toggle a bit with one button. So when the button is pushed the bool sets to 1 and...
Replies
15
Views
3,632
Hi all, I'm hardly a Siemens expert, and am struggling with a conversion I'm working on right now. A system was purchased at auction, and I'm...
Replies
1
Views
1,854
Hello, I am trying to find one varible used on my HMI in FX2N program...it is variable D726 and cross refference always direct me to line where...
Replies
5
Views
1,356
Hi All, I need your help that i want to upload the program from Logix5572. Communication is OK through rslinx over ethernet. but when i try to...
Replies
10
Views
3,552
Back
Top Bottom