RSS .92| RSS 2.0| ATOM 0.3
  • Home
  • About ArchestrAnaut Blog
  • About Our Authors
  • Email Subscription
  •  

    Notes on Arrays

    May 10th, 2012

    I just checked the referring searches list & found that someone was looking for how to get an array’s length in IAS.  Well,  here’s my 5 minutes worth of notes on arrays.  All IAS arrays are one based (indexes start at one).  You can refer to a single index (VariableName[#]) or the entire array (VariableName[]).  I’m breaking the rest of the information down into two parts: UDA arrays & local script variable arrays.

    Read the rest of this entry »


    Notes on Quality

    July 27th, 2011

    I have a couple notes on quality to share.  Not code quality or manufacturing quality, but OPC quality.  For a quick read & good background on how the OPC quality integer is constructed, read this.  I needed a couple SQL functions that mirror the IAS quality checking functions.  FYI, for those that don’t know, there are 5 of these functions:  IsGood, IsBad, IsUncertain, IsInitializing, & IsUsable.

    Here’s a somewhat abbreviated run down of how the OPC quality number is constructed.  An OPC quality is made up of 4 chucks: extended status (vendor specific; 1 byte), major status (good, bad, or uncertain; 2 bits), minor status (based on the major status; 4 bits), and limit status (is it clamped or not; 2 bits).  For each major status, there are 16 available minor statuses possible (0-15) though only the first 8 are defined.

    I ran a quick test to reverse engineer the IAS functions (see script at bottom of blog).  What I found was the following:

    Major Minor IsBad IsInitializing IsUncertain IsGood IsUsable
    0 0-7 True False False False False
    0 8-15 False True False False False
    1 0-7 False False True False True
    1 8-15 True False False False False
    2 0-7 True False False False False
    2 8-15 True False False False False
    3 0-7 False False False True True
    3 8-15 True False False False False

    To summarize the table, it looks like they appropriated part of the bad quality range (major = 0) for initializing which makes sense.  Though you could argue that there was already a status defined for this scenario (Not Connected:  Major = 0, Minor = 2).  Major status 2 isn’t used anywhere, so it got lumped into Bad, which also makes sense.  The minor statuses 0-7 for Good (Major = 3) and Uncertain (Major = 1) work as expected, but 8-15 got lumped into Bad.  I know they’re not defined, but they’re still part of the Good/Uncertain major status.  Glad I ran the test.  Maybe this is different in later versions (the tested version is 3.0 SP2).  The final observation is that IsUsable checks the quality for Good or Uncertain as well as checking the value is also a valid value (i.e. not NaN).

    The test script:
    (The one interesting note here is that you can write directly to the UDA.Quality attribute, which could be useful if you’re doing something fancy surrounding the data’s quality.)

    Dim i as Integer;

    Log header row
    LogMessage("Value,Quality,IsGood,IsBad,IsUncertain,IsInitializing,IsUsable");
    Iterate through all of the possible OPC qualities
    For i = 0 to 255
        ‘ Force the PV quality
       
    Me.PV.Quality = i;
       

        ‘ Log data row for the quality
        LogMessage(
           
    Me.PV.Value + "," +
           
    Me.PV.Quality + "," +
           
    IsGood(Me.PV) + "," +
            IsBad(
    Me.PV) + "," + 
           
    IsUncertain(Me.PV) + "," +
            IsInitializing(
    Me.PV) + "," +
            IsUsable(
    Me.PV));
    Next;

    ‘ Log message for end of test
    LogMessage("——————-");


    Bug in Alarm DB Purge/Archive Utility

    July 25th, 2011

    I found a “feature” in the Alarm DB Purge/Archive utility last week.  The password entry box will only accept 9 characters.  So, if the password for the account is longer than that, you’re out of luck.

    image


    Harder Than a Needle in a Haystack

    June 19th, 2011

    I spent last Friday & Saturday writing some SQL code for client to make finding historical data “outages” quicker and easier.  They wanted to know where all of the time spans where the quality wasn’t good.  I was thinking it was a little like a needle in a haystack problem, but it’s not.  It’s harder than that.  It’s more like measuring every piece of hay in the haystack.

    Read the rest of this entry »


    You ran a W.H.A.T.?!?

    June 8th, 2011

    We ran into a bootstrap issue on a live system this week.  This customer can’t lose data.  On the plus side, it’s a redundant setup & everything is running fine on one machine.  The problem is that we need to wipe the platform that isn’t running the objects (use Platform Killer).

    Read the rest of this entry »


    Watching a Horde of Objects

    May 16th, 2011

    Every now & then I run across a scenarios where I have to build a watch window for hundreds of objects.  If I built watch windows like they teach you in the training class (click & drag in ObjectViewer), I’d still be building them.  There’s a far easier way to build large watch windows.

    Read the rest of this entry »


    Really, why can’t I run IAS on VMWare

    May 3rd, 2011

    As I promised a while back I’ve started some explicit testing with IAS on VMWare VSphere (ESXi 4.1 Update 1 to be specific).  We all know the official support position of Wonderware but I wanted to prove or disprove some things to myself.

    Well, I’ve come across the first thing that could bite you really hard if you are unaware.

    There is a bug in the current release of ESX(i) that freezes your machine if you are running on an NFS data store and you try to remove a snapshot with CBT enabled.  While this may seem like a lot of things that have to line up, it’s actually not.  I think for most you can simplify this to if you are running NFS and you perform VM Backups with a modern software package you’re going to get caught.  By the way, CBT is changed block tracking.  It’s VSPhere’s way of tracking what data changes between backups.  This gives a huge assist to your backup software as it tries to perform differential backups.

    Read the rest of this entry »


    ArchestA Graphics Notes

    April 26th, 2011

    Just ran a quick test on ArchestrA graphics to verify when the OnShow & OnHide scripts execute.  I was also testing if AA graphic objects’ visibility properties are updated when the InTouch visibility was updated.  Nothing Earth-shattering here, but just a quick FYI.

    Read the rest of this entry »


    A How-To Link to with BindTo

    April 6th, 2011

    We’ve run across several scenarios where we want to link to an indeterminate or variable number of items during a script’s execution to do some kind of work with them.  Among other things, we have used this for iterating through a pair of parameter lists in a formula object to perform a compare between the field IO & the loaded formula.  Using IO extensions are too slow to update & read back within a single scan, but you can use the BindTo command with the Indirect type to do what you need!  The BindTo-Indirect combination works like a  pointer for IAS (this one, not this one).

    Read the rest of this entry »


    Search Term Lightning Round – First Edition

    March 7th, 2011

    If you are a blogger on a decent platform one of the metrics you will see is what kind of search terms people used to find out.  We run WordPress so we get this kind of useful intel.  When I see certain terms I want to run off and write a white paper on it because some is interested and I want to teach.  Unfortunately I just don’t have that kind of time.   With that in mind I have decided to take a handful of search terms, either frequent ones or interesting ones, and write a one or two line blurb about each.  They may distill down to even to two or three world comment.  Hopefully it will help someone along the way.

    So,  without furuther ado I present the First Edition of of Search Term Lightning Round

    Read the rest of this entry »