Skip to main content

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

- assetIdIntegerRequired. The asset the tool is mounted on (not a tool)
- toolingAssetIdIntegerRequired
- cycleRateFloatRequired, more than 0
- itemPeriodIdIntegerRequired. Minute or Hour
- enabledBooleanDefaults 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)