Delay in an expression

Drop'ur'Tech

Member
Join Date
Apr 2013
Location
Paris
Posts
9
hI :site:

Factorytalk view on Panelview plus 1500

Simple question :

Is there a way to introduce a delay in an expression ?

I want to close a menu if it's open for more than 5 seconde and i don't know how to implement this condition ! So i wonder if there is some sort of thing like
"delay(5)" or "wait(5)" for doing that in an expression !
If not , is someone have any idea how to do it by an other way ?

Thanks !
 
If you are able to perform addition on a fixed time base, then you should be able to create a counter and compare it's accumulated value in order to have it function as a timer.
 
You might use a macro with an embedded system Time variable to check how long a Display has been Open. See your Factory Talk View User's Guide:

Page 23-16 for If-Then-Else expression;
Page 24-6 for Time & Date embedded variable syntax
Page 29-15 for Using Macro commands to set tag values

Something like this, but I have never done it:

;Macro to Display Screen for 5 seconds
Tag100 = /*T*/ ;set Tag100 Dispay Start Time to current system time
Label: BEGIN; start point for LOOP
Tag105 = Tag100 + 5; add 5 seconds to Tag100
TagQuit = If(Tag105</*T*/) then QUIT else LOOP; compare Start Time + 5 to current time
QUIT: (close the display)
LOOP: Go to BEGIN
 
Last edited:

Similar Topics

Build error occurs with TON ladder logic command. Time Input expected on block. Using Integer Tag under Control Local, and then hard number 19...
Replies
2
Views
773
I have an SLC 503 running a machine with a scanner and 1794 RIO. One of the functions is a register motor on a printing cylinder. The manual 3...
Replies
3
Views
1,283
Hello all, I am using a temposonic R series linear transducer for positioning of a lower ram on a hydraulic powdered metal press. The transducer...
Replies
7
Views
1,953
My first post so I am going to try my best.:D I am totally new to RSlogix 5000, all my previous work was on 500. I am working with a...
Replies
14
Views
5,594
In the code below I have what should be, in its current condition, a simple cycling up counter with a delay before recycling. But as it is shown...
Replies
36
Views
8,221
Back
Top Bottom