2 Replies Latest reply on Aug 7, 2012 12:34 PM by gkrueger

    Set scan classes of multiple interfaces on the same node to ensure proper offsets

    gkrueger

      Does anyone know if it is possible to set scan class offsets of multiple interfaces on a particular node so that they are relative to the nodes absolute time and not the time the interface is started?

       

      I have a situation where I have multiple OPC interfaces on a single PI Interface node.  I would like to ensure that the scanning of the tags among the interfaces happens in a specific sequence (ie interface 1 at 5 seconds past every minute, interface 2 at 10 seconds past every minute, etc.).  It's fairly straight forward to setup offsets among multiple scan classes within a particular interface, but I haven't seen a way to have the scans start with an absolute time reference.   From what I've observed, scanning is always based off when the interface starts, which can vary (ie if the interface starts at 10:14:14 and is scanning every 10 seconds, then I'll get samples at :24, :34, etc....but if I restart the interface and it happens to start at 10:20:21, then my scans are happening at :21,:31, :41, etc.)  I'd like to be able to ensure a particular interface is always scanning at :05, :15, :25, etc.  

       

      Thanks in advance for any info.

       

      -Greg

       

       

        • Re: Set scan classes of multiple interfaces on the same node to ensure proper offsets
          MIPAC

          Scan class offsets should cause the interface to scan at a specific point in time. A scan class without offsets will be scheduled to execute immediately at a time relative to the interface startup - an interface starting at 10:14:14 with a 10 second scan class will give you results at 10:14:24, :34, :44 etc. Adding an offset to a scan class makes the interface execute the scan at the appropriate offset from midnight on the day the interface was started. A scan class of 10,5 (being 10 seconds with a 5 second offset) would be executed at 5 seconds past the minute. If our interface starts at 10:14:14, the first execution of that scan class would be 10:15:05, then 10:15:15, :25, :35 etc.

           

          The UniInt End User documentation describes this as follows:

           

          When no offset is specified, the scan class will be scheduled for immediate execution.  That is, the interface will not wait for a well-defined moment in time before scanning when no offset is specified.  

           

          When an offset is specified, the scans occur at well-defined moments in time according to the formula:

           

          scan times = (reference time) + n(frequency) + offset

           

          where n is an integer and the “reference time” is midnight on the day that the interface was started. In the above example, “frequency” is 60 seconds and “offset” is 5 seconds for the first scan class. This means that if the interface was started at 05:06:06, the first scan would be at 05:07:05, the second scan would be at 05:08:05, and so on.

           

          There is one caveat mentioned here, and that is interface loading. If the interface has a large load, then it is possible for some scans to be executed late or even missed.

           

          Hope this helps.

           

          John