Measuring time in TwinCAT

arbitart

Member
Join Date
Aug 2013
Location
islamabad
Posts
1
Hi,
I'm looking to measure the time between an input and an output in twinCAT using structured text. How would I go about doing so?

I've seen the function blocks such as getsystemtime can track the passage of time but I am confused as to what to the outputs it gives refer to.

Thanks
 
use now()
however it is impossible to check how long it takes when an input gets true, and then measure the time until the output gets on, this is separate process.
however you can measure how long your program takes, by putting
usedtime:= now()-oldtime;
oldtime:=now()
 

Similar Topics

Hi all! im a two week old TwinCAT newby and im having some problems to measure the time that a BOOL is TRUE, for exmple a machine thats turned on...
Replies
3
Views
3,988
Hi everyone, I don't know much of PLCs but it happened that i need to connect Leuze AMS358i Ethernet laser measurement to Productivity 1000...
Replies
0
Views
1,067
Hello everyone! Firstly I'd like to say that I'm new to this forum and also new to PLC programming world altogether, that said I really would...
Replies
27
Views
4,857
I am looking for a way to determine level in a silo. The material is called Perilite which has a very light density. Bulk density could be...
Replies
10
Views
2,753
In our water cooling tank, I've installed and successfully wired up 4 float switches & updated the PLC (big thanks to @parky for that). As a...
Replies
46
Views
11,493
Back
Top Bottom