This project has moved. For the latest updates, please go here.

about PowerCalculations.AverageFrequency... again

Apr 15, 2011 at 1:12 PM

oh, again spent some hours trying to figure how to set these calculations, namely average frequency. I see at least 5 cryies in here, all with http://openpdc.codeplex.com/wikipage?title=Connection Strings&referringTitle=Documentation#PowerCalculations.AverageFrequency link as solution. It not helps for dummies, like me! see:

<tfoot></tfoot>
NodeID ID Acronym Name AssemblyName TypeName ConnectionString ConfigSection InputMeasurements OutputMeasurements MinimumMeasurementsToUse FramesPerSecond LagTime LeadTime UseLocalClockAsRealTime AllowSortsByArrival IgnoreBadTimestamps TimeResolution AllowPreemptivePublishing PerformTimestampReasonabilityCheck DownsamplingMethod LoadOrder Enabled CreatedOn CreatedBy UpdatedOn UpdatedBy
{E7A5235D-CB6F-4864-A96E-A8686F36E599} 1 AVGFREQ4 Konst_FAVG PowerCalculations.dll PowerCalculations.AverageFrequency inputMeasurementKeys={FILTER ActiveMeasurements WHERE SignalType = 'FREQ'}; outputMeasurements={AVERAGE:1; AVERAGE:2; AVERAGE:3} Calcs

-1 25 3 1 No Yes No 330000 Yes No LastReceived 0 Yes 2011.04.15. konstancij 2011.04.15. konstancij
CalculatedMeasurement

 

not working because:

Status of IActionAdapter component 2, AVGFREQ4:
    Last average frequency: 0
    Last maximum frequency: 0
    Last minimum frequency: 0
     Configuration section: Calcs
       Data source defined: True
    Referenced data source: Iaon, 12 tables
    Initialization timeout: 15000 milliseconds
       Adapter initialized: True
         Parent collection: Action Adapter Collection
         Operational state: Running
                Adpater ID: 10001
         Connection string: 12 key/value pairs

     InputMeasurementKeys = FILTER ActiveMeasurements WHERE SignalType = 'F...
       OutputMeasurements = AVERAGE:1; AVERAGE:2; AVERAGE:3
     ConfigurationSection = Calcs
 MinimumMeasurementsToUse = -1
          FramesPerSecond = 25
                  LagTime = 3
                 LeadTime = 1
      IgnoreBadTimestamps = 0
           TimeResolution = 330000
AllowPreemptivePublishing = -1
PerformTimestampReasonabi = 0
       DownsamplingMethod = LastReceived

       Output measurements: 3 defined measurements

                AVERAGE:1 00000000-0000-0000-0000-000000000000
                AVERAGE:2 00000000-0000-0000-0000-000000000000
                AVERAGE:3 00000000-0000-0000-0000-000000000000

Usee - See all zeros, nice? What else it6 whants me to do, a bellydance?

 

c'mon people, for mercy of osiris and buddha, please can anybody publish a complete example of how to set this working, and why. I remember i've got it working myself months ago, now wit6h update all the same. In return, I promise to write as complete tutorial as possible on it  

Coordinator
Apr 15, 2011 at 5:40 PM

The zeros you see mean the output measurements are undefined.

You must define any output measurements for the system to use; this is a manual step for calculations.

In the case of of the average frequency power calculator you need three measurements defined to hold the "results" of the calculation which represent the average, maximum, and minimum of the input frequencies, respectively.

You told the system to use the measurements "AVERAGE:1" to hold the average, "AVERAGE:2" to hold the maximum and "AVERAGE:3" to hold the minimum, however these measurements will not exist until you create them (perhaps in a future version we can get the system to dynamically generate them upon request, but for now...)

To add a new measurement

  1. Go to the "Manage / Measurements" screen.
  2. Press the "Clear" button to create a new record.
  3. For "Historian" drop down, make sure and select your primary archive (no need to send the results to the statistics archive)
  4. For "Device" drop down, leave it blank (i.e., "Select Device")
  5. For "Signal Type" drop down, select "Calculated Value"
  6. For "Point Tag" field, create a representative tag name (e.g., "KONST_AVGFREQ")
  7. For "Signal Reference" field, type something like "AVGFREQ4-CV1" (meaning avg freq 4 calculated value 1) - this field not so important for calculated values
  8. Leave other fields blank, see "creating new measurements" for help on field values / meaining.
  9. Make sure you check "Enabled" then,
  10. Click the "Save" button.

These steps will allow you create a new measurement. You need to do this "three" times, once for each of the average, maximum, and minimum measurements.

Once these measurements are defined, change "AVERAGE:1" to the measurements new ID, it will look similar to"PPA:46".

That will allow outputs to be "defined" in the system the they can be archived and calculated...

Hope that helps you along your way and thus you can avoid bellydancing classes :-)

Thanks!
Ritchie

 

 

Apr 18, 2011 at 2:42 PM

Oh, many thanks Ritchie, It was truly the reason for pdc being not that kind to me. Now it's much better? and i even see measurment names, but the short answer is still "NO", zeroz. Well I have a suspicion, that some of my (perfectly good) measurments are thrown away by calculator. In fact all of them. Not good eh?:

Status of IActionAdapter component 2, KONST_FREQAVG:
    Last average frequency: 0
    Last maximum frequency: 0
    Last minimum frequency: 0
     Configuration section: KONST_FREQAVG
       Data source defined: True
    Referenced data source: Iaon, 12 tables
    Initialization timeout: 15000 milliseconds
       Adapter initialized: True
         Parent collection: Action Adapter Collection
         Operational state: Running
                Adpater ID: 10004
         Connection string: 12 key/value pairs

     ConfigurationSection =
 MinimumMeasurementsToUse = 1
          FramesPerSecond = 25
                  LagTime = 3
                 LeadTime = 1
     InputMeasurementKeys = FILTER ActiveMeasurements WHERE SignalType = 'F...
       OutputMeasurements = PPA:121;PPA:122;PPA:123
      IgnoreBadTimestamps = -1
           TimeResolution = 400000
AllowPreemptivePublishing = -1
PerformTimestampReasonabi = 0
       DownsamplingMethod = LastReceived

       Output measurements: 3 defined measurements

KONST_AVGFREQ_AVG [PPA:12 914929af-0f70-4559-9606-ffe6353d58c0
KONST_AVGFREQ_MAX [PPA:12 ec46f787-043a-4008-a9d9-66dfe4b62119
KONST_AVGFREQ_MIN [PPA:12 ff6f6486-71af-454a-90d8-2cf3c9e513f7

        Input measurements: 4 defined measurements

                      PPA:90
                      PPA:53
                      PPA:83
                      PPA:46

 Minimum measurements used: 1
     Data concentration is: Enabled
    Total process run time: 2 Minutes 5 Seconds
    Measurement wait delay: 3 seconds (lag time)
     Local clock tolerance: 1 seconds (lead time)
   Maximum time resolution: 400000 ticks
       Downsampling method: LastReceived
    Local clock time (UTC): 18-apr-2011 13:50:10.719
  Using clock as real-time: False
      Local clock accuracy: -0,1596 second deviation from latest time
     Ignore bad timestamps: True
    Allow sorts by arrival: False
 Use preemptive publishing: True
  Time reasonability check: Disabled
     Received measurements: 11980
    Processed measurements: 11976
    Discarded measurements: 4
  Downsampled measurements: 0
    Published measurements: 11972
     Expected measurements: 11972 (4 / frame)
Last discarded measurement: PPA:53 - 18-apr-2011 13:48:01.440
 Latency of last discarded: 3,2658 seconds
  Average publication time: 0,0543 milliseconds
  Pre-lag-time publication: 100,0334%
  Downsampling application: 0,0000%
 User function utilization: 0,1355% of available time used
Published measurement loss: 0,0334%
    Total sorts by arrival: 0
 Measurement time accuracy: 100,0000%
   Missed sorts by timeout: 0
      Loss due to timeouts: 0,0000%
       Wait handle timeout: 40 milliseconds
   Wait handle expirations: 3012
    Total published frames: 2993
        Defined frame rate: 25 frames/sec, 400000,00 ticks/frame
    Actual mean frame rate: 24,35 frames/sec
     Timer reference count: 2 concentrators for the 25fps timer
   Total frame rate timers: 2
        Queued frame count: 1
      Last published frame: 18-apr-2011 13:50:10.520
   Last sorted measurement: PPA:53

Output measurements signal type summary:

              3 Calculated signals

 -------------------------------------------------------

So, I really have no idea, why it's happening. And by the way, there is cute little bug, i think. Over countless restarts that I did today, I made 3 absolutely adentical Calcilation adapters, know why - i've got these pessage from pdc

[Action Adapter Collection] Failed to load adapter "KONST_FREQAVG" [PowerCalcula
tions.AverageFrequency] from "c:\program files\openpdc\PowerCalculations.dll": A
n item with the same key has already been added.

A this while there was only one Calculation Adapter with ID 1. Hmm, I made another and it recieved ID 3, nice but lately I was forced to create ID 4. ID's 1 and 3 was disabled ofcourse.

Coordinator
Apr 25, 2011 at 7:46 PM

Did you ever get this working?

Thanks!
Ritchie