New task about timeing

martin3885

Member
Join Date
Aug 2005
Location
Saarland
Posts
144
Hi,
I have just become a new task from my boss. It seems to be quite easy, but one thing, that I am not sure is to measure a time...
The main point of my task ist to send some data from PLC to some control card - it will read the data. Now the problem is that the data exchange must be done within a some time. So... a first question is how can I measure a time in siemens PLC S7 when sending a data from one DB to another :), and then to write this time to another DB?
The second question is -is there a possibility to impose a speed of data exchange? What if the exchange is to slow, can it be somehow accelerated?
 
Reading the time in an S7 is easy enough, either you use the official way which is SFC1 out of the Standard Library, or you do it the easy way and read the time out of the local data in OB1 - all depends on the accuracy you require. If you're subsequently going to be sending the data on via Profibus, then the OB1 solution is probably accurate enough.

There are ways to make the data exchange via Profibus more consistent, but since I'm not familiar with that yet, I'll leave it for someone else to deal with!
 
The time when OB1 started the current cycle is stored in the 8 Bytes from LW12 in the TEMPs. The Bytes contain, in increasing Byte order from Byte 12 to 18 the following: Year, Month, Day, Hour, Minute, Second and msec - important, all entries are BCD coded! In the low-order 4 Bit Nibble of Local Byte 19 is the day of the week, where 1 = Sunday - 7 = Saturday.

There have been some discussions here as to how one can generate pseudo-random numbers, you should probably be able to find something if you do a search. In this case, you could use the msec Byte as a seed value.
 

Similar Topics

We are to develop a first application in Codesys. It will contain motion (Softmotion) with drives on Ethercat (CSP mode). Off course there will be...
Replies
2
Views
914
Hi guys.. I am using Vijeo Citect 7.4.. I am doing a function inside a function.. What I want to do is I want to put a function to sleep but want...
Replies
7
Views
1,439
I have been searching for more information regarding qualifying standard tags in a safety task and all I have found is a quick excerpt in one of...
Replies
5
Views
1,284
Hi, I modified the structure of a program (let’s call it app) in a CompactLogix 1769-L30ER due to high variation in the output times. I mean the...
Replies
12
Views
2,292
I am working on a project that requires an additional remote rack (say about 150 i/o points) on a L73 redundancy system with about 900 i/o points...
Replies
0
Views
865
Back
Top Bottom