Another CPU313C - measuring time with OB35

idell

Member
Join Date
Nov 2009
Location
Bucharest
Posts
97
Hi! here is my code in OB35 - configured to 100ms

Code:
L time_min //time_min real variable  
L 1.666667E-3 //add 0.001667 minute each 100 ms (1min = 1/60000ms*100ms=0.001667)  
+R  
T time_min

with simulator it works fine,real time 1min - i get 0.999 .. 1.001min
with CPU i have - real time 1min - i get 1.15 ...1.2min

i also tried to use,this code, triggering by 5th bit of clock memory bit word in ob1, the results is better 0.95 .. 0.96, these results still aren't good enough.

how to "measure" the time the most exactly ?
I want to know how long our installation works for customer.
 
Use SFC1 to read the clock and store the time at the start of your event, then same again at then end of the event. Calculate the difference in time.
 

Similar Topics

Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
164
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
428
Hello I need to message read the entire 16 channel raw analog inputs from a 1769-L33ER Compact Logic controller to another 1769-L33ER Compact...
Replies
8
Views
249
I am noticing a problem where i am using MOV instruction and writing literal text into source and String datatype in destination. It works fines...
Replies
6
Views
491
I'm not actually in front of the equipment yet, but this is the information that I have been given by a client: ------------ Data from HART...
Replies
2
Views
338
Back
Top Bottom