Creating K-Maps from Lua script
Lua scripting is good for truth table creation in cases then the logic function or functions has many inputs and has a simple algorithm for output values, for example, such a 8-to-3 encoder. The truth table for 8-to-3 encoder contains 256 rows and it is too long to create it manually.
Gorgeous Karnaugh Versions with Lua Support
Note: Not all versions of Gorgeous Karnaugh software supports Lua scripting. Check you version features here.
Creating function sets using Lua
For creating function sets using Lua select “File” — “New” — “Empty set for scripting” menu item. In appeared dialog window enter the name for the new logic function set or keep the default name untouched. Enter Lua script into text field on the “Lua” tab in the “Analytic & Scripting Input” pane, as shown on the next screen:
Executing Lua script
To execute Lua script select “Edit” — “Execute Lua script” menu item or press “Alt+Enter” key combination. Entered Lua script will be executed and truth table and K-Maps will be built as shown on the next screen: