Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
model:creating_a_model_in_python [2025/02/18 03:28] optrix |
model:creating_a_model_in_python [2025/02/18 05:02] (current) optrix |
||
---|---|---|---|
Line 8: | Line 8: | ||
import ardimodel as mdl | import ardimodel as mdl | ||
- | host = ardimodel.ModelHost(5225) #This is the port number that OPC-UA will run on | + | host = mdl.ModelHost(5225) #This is the port number that OPC-UA will run on |
# Add Models Here | # Add Models Here | ||
Line 32: | Line 32: | ||
< | < | ||
#My Tank Model | #My Tank Model | ||
- | @mdl.part(" | + | @mdl.part(" |
def TankModel(mod): | def TankModel(mod): | ||
pass | pass | ||
</ | </ | ||
- | Once we've created | + | The '@part' decorator marks the function defines a **model**. Inside the function, we can define which specific inputs, outputs, constants and calculations we need. |
- | This defines | + | The human readable name for our model is 'Online |
===Filling in the Inputs=== | ===Filling in the Inputs=== | ||
Line 88: | Line 88: | ||
For example, the function here will be... | For example, the function here will be... | ||
- | < | + | < |
- | //Note that the 'num' | + | //Note that data points aren't simple numbers |
==Used Points== | ==Used Points== |