Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCRTGraph for Java
 RTProcessVar Historical information

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
dldudley Posted - 01 Jun 2010 : 10:49:20
Is there a way to get the number of historical data points currently stored by a process variable? I'm wondering if a particular variable is acquiring history information, so I'd like to display a count of the number of history elements stored.

4   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 01 Jun 2010 : 12:57:53
You have to set the process variable to save historical data before you attempt to read the count of the historical data. That is done using the setDatasetEnableUpdate method, as seen in our scrolling examples. You don't have to set the AutoTruncateMin and Max values.

If you plan to check process variables that may have not been initialized for historical data yet, check for null first and return 0 in that case.

int n=0;
if (processvar1 != null)
  if (processvar1.getProcessVarDataset() != null)
    n = processvar1.getProcessVarDataset().getNumberDatapoints();

dldudley Posted - 01 Jun 2010 : 12:08:52
Should also say that I can do the getAutoTruncateDataset() and get false. Do I have to set the AutoTruncateMax and AutoTruncateMin counts to anything initially?
dldudley Posted - 01 Jun 2010 : 12:06:47
When I execute that statement, I get a java.lang.NulllPointerException. I probably haven't initialized my ProcessVar correctly. Do I have to tell the variable to accumulate historical information? I currently set and read the ProcessVar value through my realtime display, and I'm trying to add a Historical chart to the display using that same variable.
quinncurtis Posted - 01 Jun 2010 : 11:13:24
int n = processvar1.getProcessVarDataset().getNumberDatapoints();

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07