system.kanoa.tooling.setCycleRate(rateInfo, userId)
Sets a tool's cycle rate on an asset, replacing the one they already have. On a frame, a frame's own rate overrides the slowest of its mounted inserts' rates. A mount, unmount or blocked position that changes an asset's standard rate starts a new run (modeEvent) at that time. Each run keeps the rate it was stamped with when it started, so the change applies to the asset's run in progress, not earlier runs.
Parameters
rateInfo Dictionary
| - assetId | Integer | Required. The asset the tool is mounted on (not a tool) |
| - toolingAssetId | Integer | Required |
| - cycleRate | Float | Required, more than 0 |
| - itemPeriodId | Integer | Required. Minute or Hour |
| - enabled | Boolean | Defaults to True |
userId Integer: The user making the change
Returns
(assetToolingRateId, message)
Example
rateInfo = {'assetId': 1, 'toolingAssetId': 1, 'cycleRate': 1.0, 'itemPeriodId': 1, 'enabled': True}
userId = 5
assetToolingRateId, message = system.kanoa.tooling.setCycleRate(rateInfo, userId)