10/17/2017 2:59 PM | |
Joined: 9/27/2006 Last visit: 9/28/2025 Posts: 12428 Rating:
|
Hello pallisi; To add to Towone's post, you could start by looking at the TONR instruction in Step 7 v1x; it is described below (the manual cited is for Step 7 basic v14 SP1, but the instruction exists in earlier versions of TIA Portal): https://support.industry.siemens.com/cs/document/109747135/step-7-basic-v14-sp1?dti=0&lc=en-WW TONR: Time accumulator (S7-1200, S7-1500) Description You can use the "Time accumulator" instruction to record how long the signal is at the input of instruction "1". The instruction is started when the result of logic operation (RLO) changes from "0" to "1" (positive signal edge). The time is recorded as long at the RLO is "1". If the RLO changes to "0", the instruction is halted. If the RLO changes back to "1", the time recording is continued. The query of the timer status for "1" returns the signal state "1" if the recorded time exceeds the value of the specified time duration and the RLO at the input of coil is "1". The timer status and the currently expired timer can be reset to "0" using the "Reset timer" instruction. ... For S7-1200 CPU The "Time accumulator" instruction stores its data in a structure of the data type IEC_TIMER or TONR_TIME. You can declare the structure as follows:
You would have to use a signal from your Equipment showing "running" status, as an input tom the timer, with a positive-edge instruction. Hope this helps, Daniel Chartier |
Last edited by: dchartier at: 10/17/2017 3:00:54 PM |
|
This contribution was helpful to
1 thankful Users |
10/17/2017 3:36 PM | |
Joined: 7/27/2017 Last visit: 9/5/2024 Posts: 15 Rating:
|
Thank you very much for your reply. This is what I was looking for. |
Follow us on