Skip to main content

Scaling Check

What is the recommended overall approach to scaling a Kanoa implementation?

Build a good reference implementation for an asset type first, then reuse it with import/export, asset duplication, or scripts, and review and adjust whatever must be unique for each copy (name, tag paths, ERP name, schedule settings, and so on). Scale a validated pattern rather than copying incomplete configuration. See Scaling Across the Enterprise.

You need to migrate an existing asset hierarchy from another system. What approach does the course recommend?

Export the hierarchy to a flat file, convert it into Kanoa's asset export JSON structure (using an existing asset export file as the template, for example with AI), and import the file on Configuration → Ops → Assets. The more you export (assets, items, states, modes, links), the more you can import. See Create Assets with Scripting.

How does the rollout script decide which asset to copy, and why does that depend on asset groups?

It looks up the assets in the Machines asset group, picks the template by name (Machine 1), and copies it with system.kanoa.asset.copyAsset. The group holds more than one asset (each copy the script makes joins it too), so the script doesn't just take the first one. Asset groups let a script find the template for a type of asset without hard-coding an asset ID. See Create Assets with Scripting.

What does system.kanoa.asset.copyAsset copy?

An identical copy of the asset, including its child assets and its links to modes, states, items, and attributes. See Create Assets with Scripting and copyAsset.

After copying Machine 1, why does the rollout script still write to tags in Ignition?

Copying the asset doesn't connect the new asset to its own equipment data. The script writes each new asset's MQTT path parameter (Line/Parameters.MQTTPath under the asset's tag path) to its matching [Kanoa]CoreForge Sim/Site/Machining/Machine N/assetInputs path. Without that, the copy would not read its own simulator tags. See Create Assets with Scripting.

Why is the system.kanoa API preferred over direct SQL for bulk configuration?

It follows Kanoa's data model, executes application logic consistently, reduces the risk of missing related records, and uses supported functions that behave the way the product itself does. See Create Assets with Scripting.

In what order must downtime configuration be created, and where is the state code assigned?

State categories must exist before states can be created in them, and states must exist before they can be linked to assets. The state code is assigned on the asset-state link, by system.kanoa.asset.linkAssetStates, not on the state itself. See Create States with Scripting.

How does the generateStates script avoid assigning a state code that is already in use on the asset?

It reads the states already linked to the asset, including disabled links, before linking anything. Machine 1's states have fixed codes (61 to 114) because the simulator sends those codes, so a state whose fixed code is already used on the asset is skipped and reported. Manual Pack 1's states have no fixed codes: the script takes the highest existing code and numbers the new links from the next unused value up, starting at 1 if the asset has no linked states. See Create States with Scripting.

Why do the scripts look up IDs by name or path instead of hard-coding them?

Database IDs may differ between development, test, and production systems. Names and paths, like CoreForge\Philadelphia\Machining\Machine 1, are more portable, so the same script works on any gateway that has the same configuration. See Create States with Scripting.