Strange S7 timer behaviour (S5Time)?

uptown47

Lifetime Supporting Member
Join Date
Feb 2008
Location
Over there, next to those boxes
Posts
1,146
I have a strange problem in my software. I'm using a 315-2DP PLC and picked (what I thought) a free timer to use in my code. Timer 128.

I used T128 as an extended pulse timer but the strange thing is that it keeps triggering for around 200ms ?

So, it comes on then 200ms (ish) later it goes off. I've check the reference data and it doesn't appear to be used in the software. The software is quite basic LAD and I can't see any STL so I don't think it's being brought on by a cross-area pointer or anything like that.

I just wondered if this timer might have gone 'rogue' and be giving spurious signals??

Anyone seen anything like this before or, does anyone know how else I can check to see if the timer is being used??

;-)
 
If it's an old 315-2DP (part no. 6ES7 315-2AF03-0AB0 or similar) it'll only have 128 S7 timers - T0 to T127.

Just a thought.
 
Last edited:
In the past when I've used a timer that is out of range for a particular CPU, the block containing the timer will not download.
 
In the past when I've used a timer that is out of range for a particular CPU, the block containing the timer will not download.

Never done that before, so I tried it....throws up a D280 block compile error when you try to download.
 
If it's an old 315-2DP (part no. 6ES7 315-2AF03-0AB0 or similar) it'll only have 128 S7 timers - T0 to T127.

Just a thought.

Thanks for that. I thought that myself (especially as it was T128) but when I checked the CPU will support 256 timers.

Pick another free timer ? Post the code you are using.

I did that (T138) and it's working fine.

I just really wanted to see if anyone had come across this in the past?

;-)
 
If the program is using something like below, you will not be able to cross reference the timer(s), This is the only way I can think of a timer going nuts.


L 128
T #POINT

A M 0.0
L S5T#5S
SD T [#POINT]
 
If the program is using something like below, you will not be able to cross reference the timer(s), This is the only way I can think of a timer going nuts.


L 128
T #POINT

A M 0.0
L S5T#5S
SD T [#POINT]

Hi Henkie,

I've just looked through the entire program and there isn't any STL used anywhere. It's just real simple Ladder. I've run the program on PLCSim and T128 behaves normally.

I'm thinking it must be an issue internal with the PLC. Although it's so weird how it could just affect 1 timer?

Anyone seen anything like this before??

;-)
 
Hi Henkie,

I've just looked through the entire program and there isn't any STL used anywhere. It's just real simple Ladder. I've run the program on PLCSim and T128 behaves normally.

I'm thinking it must be an issue internal with the PLC. Although it's so weird how it could just affect 1 timer?

Anyone seen anything like this before??

;-)


About once or twice.
In about 50% of our PLC's.

I'm starting to think these S5timers are not re-usable.
 
I've added a "DO NOT USE" this timer to the symbol of T128 so hopefully nobody else will get caught out. I think it's happened before to people as every timer was used apart from T128 and then from T129 they were used all the way up to T137. So I just used the next available one (i.e. T128) and then found this strange problem. On the output of the timer is a profi bit and that went via another machine to a labeller. I couldn't understand why the labeller was stopping randomly and thought that maybe the bit was being used somewhere in the middle machine. It was a right pain tracking it down as it was the last thing I expected.

Still... you live and learn..... ;-)

Good to hear it has happened to someone else too.
 
...or leave it being used but not for any function - it will not then appear to be free when eventaully the program gets uploaded and the symbols are lost.
 
did you have cleared the memory of your plc before downloading a new program....sometimes when you re-use a plc from elsewhere and you download new block to it, if there was a block not used by your new program, it may not be over-writted and still be in the plc...If the old unknown block is using your specific timer are the specified preset timing adress you probably imagine that it is like if you assign 2x the same timer...

I would recommend that you clear the plc memory and re-download your code just in case another adress can cause you some issue
 
did you have cleared the memory of your plc before downloading a new program....

The software has been in for around 10 years. I didn't think an 'old' block could affect it if it isn't being called? I'm not going to do a full Mres though in case it causes other issues. Thanks for the suggestion though ;-)

...or leave it being used but not for any function - it will not then appear to be free when eventaully the program gets uploaded and the symbols are lost.

We actually have quite a good crew of sparky's here and so I've never known symbols to be lost during an upload. All programs are backed up to USB sticks and kept in the panels once changes have been made. Once a year, all programs are backed up to external hard drive and kept in a safe.

On the contrary, I've worked in many places where it is regular to not have the symbol file or, even worse, the wrong symbol file!!

;-)
 

Similar Topics

Hello all, I am facing an issue with my Commander SK that I cannot solve on my own, I am struggling on it since several days :confused: The...
Replies
9
Views
1,052
Hi. I'm doing an upgrade of an old 1400e to a new panel view plus 7 standard using ftv studio v 12,which will be communicating to a slc 5/04 via...
Replies
15
Views
2,633
Can someone explain the jumper between the elements? Does it do anything? See attached jpeg.
Replies
4
Views
689
We have an OPC server getting data from a Compactlogix PLC. The PLC also communicates with a Panelview and a couple VFDs via Ethernet/IP...
Replies
3
Views
1,165
I have a small system controlled by a Siemens S7-1200 PLC. I created a totalizer function block (TIA v17), where I'm counting total revolutions...
Replies
16
Views
3,139
Back
Top Bottom