Technical Forum

SIMATIC S5 / STEP 5

S5 CPU95-problem

Thread Starter: luciferC4   Started: 8/11/2012 1:25 PM   Replies: 10

« Previous thread Next thread »
12» Page 1 of 2 (11 items)
  8/11/2012, 1:25 PM
Joined 1/25/2006
Last visit: 5/4/2013
Posts: 208
Rating:
Rated: Very Good [2 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,
I should to make some changes in one step 5 program. I added new 4 inputs an no outputs. I made changes in one PB block but I couldn't get a good result. Before I explane a little more, for information, hardware configuration like this: CPU 95U, (address: I32.0-I33.7, Q32.0-Q33.7) and two input/output (6ES5 482-8MA13) moduls 16Di/16DO (I64.0-I65.7, Q64.0-Q65.7 and I72.0-I73.7, Q80.0-Q81.7- note: I read this addresses from documentation of machine). And there is memory submodule EPROM. For my inputs I used 4 DI on addresses I72.0-I72.3). After my attemptings to find out where I make mistake in program, I make one simple, test program, reading one input and put on output
A I72.3
=Q 64.6 (Q64.6 is free output)
What's strange?! When I set bit I72.3(this signal is cyclically where I72.3 is 1 about 750ms and 0 about 250ms- this is CAM signal of eccentric machine), appeared led lamp on Q64.4 (set output), but when I put 0 on I72.3, Q64.6 is still "1"!!! After that I didn't know what going on? When I power off machine and than power on, Q64.6 become 0! Can someone know what's problem?
Or, the next example I was made: 
A I72.2 ( for example, I touch 24V on this input 2 sec and than untouch signal)
S Q64.6
AN I72.2
R Q64.6
and all time  signal Q64.6 is 1!!!
Why, I don't know. 
By the way, in text bellow I'll write my program (I should read status of bar code scanner I72.1)
 seg 1 (falling edge of I64.0)
A I72.3
AN I64.0
AN F43.0
=F43.1
S F43.0
A I64.0
R F43.0
seg 2 (during cycle of I72.3 I read status of I 72.1- bac code signal)
A I72.3
A I72.1
S F43.2
AN I72.3
R F43.2
seg 3 (callinf FB 15, where I shift one word)
A F43.1
JC FB15

FB15:
A F43.2
=F40.0
L FW40
SLW 1
T FW40
This program should read status of barcode signal of eccentic machine, in cycle time about 1 sec. This status I write on location F40.0 and than shift word. Than I read bit F41.2 (this is 10th locaiton of shift word) and used as control signal for ejecting products if barcode is Ok). 
Top
  8/14/2012, 9:07 AM
Joined 6/26/2007
Last visit: 5/20/2013
Posts: 87
Rating:
Rated: Outstanding [3.82 out of 5 / rated 11 time(s)]. (11) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
HI


When Input goes to 0 and I 72.3 fro example. What is the voltage level at this moment?

2nd point are you writing this program in the Ob1 or OB13.


Confirm these points


Regards:-
Titas
Top
  8/15/2012, 9:36 PM
Joined 1/25/2006
Last visit: 5/4/2013
Posts: 208
Rating:
Rated: Very Good [2 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,
I didn't check voltage level but I suppose that is about 0-5V. The second points, I write this program in OB1 cycle block. The first, OB1 call PB 94 and then, in PB94 calls PB 194 where I make changes. And in PB194 I call FB15. I have three nesting. 
In FB block I didn't use formal operand, only direct addressing.
Best regards.
Top
  8/16/2012, 4:11 PM
Joined 1/30/2007
Last visit: 4/17/2013
Posts: 246
Rating:
Rated: Outstanding [3.35 out of 5 / rated 17 time(s)]. (17) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi  luciferC4,

hope you don't mind this question, but did you remove the eprom before you changed the program?

good luck
Top
  8/16/2012, 8:44 PM
Joined 1/25/2006
Last visit: 5/4/2013
Posts: 208
Rating:
Rated: Very Good [2 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
No, I didn't. Is it necessary to remove it?
Top
  8/17/2012, 10:30 AM
Joined 1/30/2007
Last visit: 4/17/2013
Posts: 246
Rating:
Rated: Outstanding [3.35 out of 5 / rated 17 time(s)]. (17) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi luciferC4,

You need to remove the eprom, before you can change your program.

First of all you need to load the s5 program to a file (all blocks "B") to make sure you don't loose any machine data. Then you switch off the plc and remove the eprom. After power on you will have to reload the program to plc and check if it works properly again.

After this all is done you are free to start changing and testing your program ...

Good luck
Top
  8/17/2012, 1:09 PM
Joined 1/25/2006
Last visit: 5/4/2013
Posts: 208
Rating:
Rated: Very Good [2 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Thank you very much. I'll do as your advices. And one question again: how to check cycle time of this program? Is there special function or something else?
Best regrads.
Top
  8/17/2012, 3:26 PM
Joined 1/30/2007
Last visit: 4/17/2013
Posts: 246
Rating:
Rated: Outstanding [3.35 out of 5 / rated 17 time(s)]. (17) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi luciferC4,

in the plc 95 there is no spewcial function to read the cycle time, but may be this faq might help:
http://support.automation.siemens.com/WW/view/en/142618

Good luck

Have a nice weekend !

Top
  8/17/2012, 9:10 PM
Joined 1/25/2006
Last visit: 5/4/2013
Posts: 208
Rating:
Rated: Very Good [2 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Thank you again. Rnf:lblSmileyTooltip_
BR.
Top
  8/24/2012, 5:07 PM
Joined 1/25/2006
Last visit: 5/4/2013
Posts: 208
Rating:
Rated: Very Good [2 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Simaticus,
I must ask you something. Still I haven't done changes (because machine had to work all time) in plc program. But before that can you explane what do you mean under your advice: First of all you need to load the s5 program to a file (all blocks "B") to make sure you don't loose any machine data!  I have original version of program and for safety, I did upload from plc program and made one copy where I made my changes and that version I'll download in plc.
BR.
Top
12» Page 1 of 2 (11 items)
Actions