Calculate time A program or job has ran | Factory Talk View

cschlue

Member
Join Date
Nov 2013
Location
Davenport
Posts
34
Hello,

I'm fairly new to Factory talk but I have been an IT Administrator and Hobbyist Programmer for the last few years and recently started a position where one of my duties is programming Factory Talk HMI's with Fanuc Robotic Cells.

Right now most of the applications they have running do not seem to calculate time a job has ran accurately, and it seems like a fairly inefficient way to complete the task.

Basically right now the way they have it setup is they have a macro that simply checks what job is currently active and adds 1 to a variable for storing how long the job has ran for.

So every 900ms the macro runs and adds 1 to the variable, then that value is divided by 60 to calculate minutes.

So i'm curious if theirs a way to take the local time of the touch panel machine, store that in a variable and track the current time, and then display the difference in time.

IE: the job started at 1:00pm and its now 1:30pm and the job is still running so we know the job has been running for 30 minutes.

I'm assuming this would have to be done through a macro, and would probably be best done through a VBScript?
 
It sounds like the the current method is introducing some indeterminate amount of error for the macro execution interval every second. I'm not surprised it's inaccurate.

Is this a FactoryTalk View SE or ME system ? Are there some Rockwell Automation controllers as well as the GE Fanuc robots ?

Macros and VB routines have their place, but I strongly prefer to handle time and events through the programmable controller.
 
We're Using Factory Talk ME, And from what i understand they're only using the pmc's for the fanuc robots, I'm not a robotic automation guy so i'm not entirely sure what limitations that would cause.

When i asked whey they didn't just handle tracking running time on the pmc they had stated it was even more inaccurate for some reason, but didn't really go into detail as to why.
 
Thanks for the reply ! I'm going to keep peppering you with questions, as I'm sure other Forum members will as well, to understand the application better.

Are you running FactoryTalk View ME on ordinary PC computers, or on PanelView Plus operator interface terminals ?

Do you know if there are Allen-Bradley PLC controllers, like ControlLogix or CompactLogix models, involved ?

I'm not a Fanuc robot guy; I know there are PLC-like "Programmable Machine Controller" (PMC) features in robot controllers like the R3i. It would be unusual, but not impossible, to connect a PanelView Plus or FactoryTalk View system directly to one of those.

The ControlLogix clock has millisecond resolution, so either they tried to do clock functions on the Fanuc PMC in some way, or they are just trying to do things the hard way.
 
Most applications we only use the PMC, currently we use Panelview terminals from Allen-Bradley with windows CE, Factory Talk ME View Station, KEPware, and all INputs and OUTputs are generally directed towards the PMC through KEPware.

This is my 2nd week working on these so forgive me if there's anything i'm not clear on, I'm familiar with VBscript and other programming languages so understanding how the HMI's work isn't too difficult, I have no experience with Automation Systems prior to this how ever so out side of the basics I'm fairly clueless when it comes to fanuc ladder logic and programming Robotic controllers. Luckily I'm a fairly technical person so i grasp the concepts fairly easily.
 
Thanks for the info. KEPServer Enterprise is of course the way PanelView Plus terminals talk to non-Rockwell controllers, though it's unusual to have them doing so without any Rockwell controllers around.

The PanelView Plus does run on Windows CE, but the availability of the operating system or extended functions is very limited.

A "Macro" in FactoryTalk View ME isn't a general-purpose script or program. It's a list of tags and the expressions the Macro applies to those tags.

I've never tried to calculate anything with the System/DateAndTimeInteger tag. That might be a way to do what you want.
 
Ok, so the "system\DateandTimeInteger" is an integer number of seconds since midnight January 1, 1970.

This is according to the system clock on the PanelView Plus, not to any other time source or controller.

To capture the DateandTimeInteger for the job starting, you can use an HMI tag. These are held in the onboard tag database for the PanelView Plus, rather than being values from a data server like KepServer or RSLinx Enterprise.

You can then calculate and display the difference between the current DateAndTimeInteger and the stored DateAndTimeInteger, and that value will be in seconds.

Which version of FactoryTalk View ME are you running ? I'll post an example project.
 
It sounds like the the current method is introducing some indeterminate amount of error for the macro execution interval every second. I'm not surprised it's inaccurate.

Not necessarily. I did a Paint shop shift/time scheduler for Wentzville a number of years ago on a PLC-5. All I had to work with was the PLC, the HMI, and a Simplex timekeeping pulse tied to an input.

To get the PLC to create a pretty accurate one second pulse (within a few seconds a day), I fired a STI (Selectable Timed Interrupt) every 985 ms. This in addition to about 15ms of system overhead (aka housekeeping) got me very close to a one second pulse. The Simplex input would give me an 8 second pulse on the hour, and a 12 second pulse on the day that I used to sync the time with.

It would get off less than one second an hour (and it would wish me a "Happy Birthday" on the HMI every year in October :) ).
 
In this case, the "macro" is probably being fired by the PanelView Plus macro service, which is notoriously slow and variable.

The entries in a macro definition in a PanelView are "not guaranteed" to operate in sequence, let alone at a precise interval.

I could gripe about this for a while, but I don't expect it to change.

The PV+ system clock, on the other hand, keeps pretty good time.
 
Would their be a way to pull the system clock from the Panel and then just calculate time between the start of the job and current time?
 
The stuff we do generally doesn't have consequences as serious as these, but I happened to run across a story about the importance of time increment accuracy: http://www.ima.umn.edu/~arnold/disasters/patriot.html

I have a sample program but I want to run it for a bit to make sure I got the rounding correct. FactoryTalk View ME doesn't have access to a general-purpose programming language like VB or Python, so to correctly convert Seconds to Hours/Minutes/Seconds requires some careful use of the expression editor.
 
Last edited:
No offense, but I find it very hard to believe that a Fanuc PMC controller can't keep accurate time. These are multi-axis controllers using time servers to coordinate axis moves which are very precise. I call BS on your fanuc programmer saying it can't keep accurate time. Sounds like passing the buck to me :)
 

Similar Topics

Hi everyone, I need to program a PLC 5 to calculate the difference in percent between the highest and lowest of either 2 or 4 floating point...
Replies
4
Views
1,964
Hi guys, Is there anywhere to calculate a redundant PLC-5 program size when converting them into CLX (redundant)? 1) In PLC 5 lets say I have...
Replies
13
Views
5,518
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
953
Good morning, I have a question. I don't know much about ST yet I would like to calculate the average number of products per hour. how do I do...
Replies
22
Views
2,939
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,098
Back
Top Bottom