0 of 4 lessons complete
Script Parts and Stock
The earlier chapters used the Kanoa Inventory screens. Everything those screens do runs through the system.kanoa.inventory functions, and you can call the same functions from your own scripts.
Script instead of clicking when you need to:
- Build your own screen. A technician screen or scanner workflow that issues parts without opening the Inventory pages.
- Load data in bulk. Add the same bill of materials to many machines, or load a parts list from a file.
- Report. Send purchasing the list of parts to reorder.
- Integrate an ERP. Keep the parts catalog in step and record deliveries as they arrive.
You run these scripts from the Ignition Designer: the Script Console to try them, then project script libraries, gateway scripts and Perspective views to run them for real. Each function returns a value, or a (value, message) pair where message is None on success. The reference page for each function is embedded in its lesson.
Before you start
Complete the earlier Inventory chapters first. These lessons use the parts, the Parts Room storeroom and the Machine 1 bill of materials you built there.
Lessons
- Issue Parts from Your Own Screen: issue a part to a work order from a script, and read back the parts used.
- Load BOMs by Script: add bill of materials items to many assets in one run.
- A Reorder Report by Script: list the parts below their reorder point for purchasing.
- Sync Parts and Receipts from an ERP: add or update parts, and record deliveries as receipts.