factorytalk time interval function

macgioo2

Member
Join Date
Oct 2009
Location
Cambridge
Posts
98
Hi Guys,

I was wondering if someone could explain to me how the time functions are used in factory talk se v9.

I want to evaluate if an expression is true every 10 seconds.

e.g. {::[Optiport_M01]Program:Station9.S09CAM_IN3}
interval( "10 seconds" )

The syntax is very important to me as I have no example of how this is done.

Thank you in advance
 
Perhaps a description of what you are trying to accomplish with this? i.e. what will happen if it is evaluated true / false?

I'm not sure, but what you are after might not be possible.
 
1) What is Factory Talk SE v9 ? Or do you mean CPR9?
2) I don't know what you are trying to do, but if you want to trigger on a change of state, you can set up an Event in FTView.
 
yes sorry cpr9

Anyway what I am trying to do it to evaluate a simple boolean expression every 10 seconds. I thought the interval time function might allow me to do this. Am I wrong?
 
Well, I'm not sure exactly how you plan on using that.
INTERVAL("10 sec") will return true once every (approximately) 10 seconds. Logically combining that with a tag could return a true once every 10 seconds, or be always false.

Doing something similar in VBA code is a bad idea, as you don't want loops running. Perhaps you can put a display element on the screen (always visible) with an interval in it, expose it to VBA, make an OnChange subroutine for the element, and examine your tag every time it fires, then return something.

Really, seems like a better thing to do inside a PLC.
 
( INTERVAL("10 sec") AND {::[Optiport_M01]Program:Station9.S09CAM_IN3} )

-- Edited to place INTERVAL statement first, assuming short-circuiting, the tag need not be evaluated until the interval is true.
 
Sir,
I want to know time interval function in RS view 32,

I want to created one object it's visable after 10 second's.

For that I use this expressions in animation.
Tag=INTERVAL ("10 sec")+tag
But it's not working please help me
Please I am stuck at this point.

"
( INTERVAL("10 sec") AND {::[Optiport_M01]Program:Station9.S09CAM_IN3} )

-- Edited to place INTERVAL statement first, assuming short-circuiting, the tag need not be evaluated until the interval is true.
"

Thanks you sir
 
Last edited:
INTERVAL("10 sec") will return true once every (approximately) 10 seconds.


For example, if there is an expression


Code:
( INTERVAL("10 sec") AND {::[Optiport_M01]Program:Station9.S09CAM_IN3} )
then, except for once every 10s, the part before the AND, i.e. the [INTERVAL("10 sec")], will evaluate to False, and so the PLC will say (hopefully) to itself "The program wants me to evaluate [a AND b], but since I now know that a is False, I know [a AND b] will be False whether b evaluates to True or False, so I will not evaluate, i.e. I will short-circuit the evaluation of, b, and simply return False as the value of [a AND b]."


Finally, on that one time every 10s, the [INTERVAL("10 sec")] will evaluate to True, in which case the PLC will aslo evaluate the expression after the AND.


So the expression gets evaluated once every 10s.


Another way to do that is probably
Code:
IF INTERVAL("10 sec") THEN
  {::[Optiport_M01]Program:Station9.S09CAM_IN3};
END_IF;
Although that is probably illegal syntax for FTV.
 

Similar Topics

Hi, I've got a project where I have to execute a VBA code cyclically - let's say every 1 minute. I've created a 'hidden' display which is opened...
Replies
2
Views
8,836
how to communicate FactoryTalk Optix and Mitsubishi Q Series. I want to know the details of that
Replies
0
Views
36
Hoping someone can give me some guidance or confirmation of what I need to do. We have a FactoryTalk SE program that I need to change the IP...
Replies
2
Views
80
We are a water/wastewater plant, collecting realtime and manually entered data. We have been using FactoryTalk Historian (OSI PI) for real time...
Replies
3
Views
122
Good morning! Let me start by saying, I am still learning about this type of HMI programming. I recently watched a video about recipes and how it...
Replies
0
Views
68
Back
Top Bottom