Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
samplestream:lc_amount [2024/04/23 06:52] optrix created |
samplestream:lc_amount [2024/04/25 23:43] (current) optrix |
||
---|---|---|---|
Line 5: | Line 5: | ||
===Description=== | ===Description=== | ||
- | This function is used to calculate a [[lagged | + | This function is used to calculate a [[data-driven lag|data-driven lag time]] based on a // |
- | For example, you can use it if you have a sensor that counts | + | 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, |
+ | |||
+ | 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 | ||
===Parameters=== | ===Parameters=== | ||
^Parameter^Type^Meaning^ | ^Parameter^Type^Meaning^ | ||
- | |times|list of datetimes|The UTC dates and times for each sample| | + | |server|ARDI API Server|The ARDI server to query| |
+ | |query|string|The AQL Query to send| | ||
+ | |amount|float|The amount to lag the time by| | ||
+ | |origin|datetime|The ending/ | ||
+ | |seconds|int|The maximum number | ||
+ | |expected|int|The average amount of time in normal operation (default=10 minutes)| | ||
===Returns=== | ===Returns=== | ||
- | A list of samples - one for each requested | + | The number |
+ | |||
+ | ===Notes and Behaviour=== | ||
+ | |||
+ | The **expected** time should be the maximum amount of lag you'd //expect// to have during normal operation (ie. if your machines didn't stop in the mean-time). | ||
+ | |||
+ | The **seconds** time should be the maximum amount of lag you're willing to search for. | ||
===Example=== | ===Example=== | ||
<code python> | <code python> | ||
- | srv = ardiapi.Server("demo.optrix.com.au/ | + | srv = ardiapi.Server('demo.optrix.com.au/ |
- | | + | |
- | | + | |
- | | + | diff = lc.Amount(srv,"' |
- | samples = smp.GatherSamples(datesneeded) | + | |
+ | | ||
</ | </ |