Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
samplestream:lc_amount [2024/04/24 00:41]
optrix
samplestream:lc_amount [2024/04/25 23:43]
optrix
Line 7: Line 7:
 This function is used to calculate a [[data-driven lag|data-driven lag time]] based on a //counter// This function is used to calculate a [[data-driven lag|data-driven lag time]] based on a //counter//
  
-Use this if the source of your lag is being **counted** or **totalised** instead of being measured as a **rate**. Note that in many industrial applications, field-based counters or totalisers are more accurate that performing calculations on rates.+Use this if the source of your lag is being **counted** or **totalised** instead of being measured as a **rate**. Note that in many industrial applications, field-based counters or totalisers are more accurate than performing calculations on rates.
  
 For example, you might have a conveyor system measuring how many meters you've moved. If Sensor X is 50m away from Sensor Y, you can calculate the //time lag// between Y and X by going backwards and finding out how long it took for 50m of conveyor to pass. For example, you might have a conveyor system measuring how many meters you've moved. If Sensor X is 50m away from Sensor Y, you can calculate the //time lag// between Y and X by going backwards and finding out how long it took for 50m of conveyor to pass.
Line 35: Line 35:
 <code python> <code python>
     srv = ardiapi.Server('demo.optrix.com.au/s/pl')     srv = ardiapi.Server('demo.optrix.com.au/s/pl')
-    query = "'Paint Line' ASSET 'Distance' PROPERTY VALUES"+
     lc = samplestream.LagCorrection()     lc = samplestream.LagCorrection()
-    diff = lc.Amount(srv,query,25)+    diff = lc.Amount(srv,"'Paint Line' ASSET 'Distance' PROPERTY VALUES",25) 
     print("Roller 2 Lag Correction - " + str(dt))     print("Roller 2 Lag Correction - " + str(dt))
  </code>  </code>