Si variable write

From Sim Innovations Wiki
Jump to navigation Jump to search


si_variable_write(var_id, value)

si_variable_write is used write to an Air Manager variable. Global variables can be used to communicate between instruments.

Return value

This function won't return any value.


# Argument Type Description
1 var_id String Reference to a global variable. Can be obtained using si_variable_create.
2 value Object The new value to write. You have to obay to the data type you have chosen in the si_variable_create function. It is not allowed to change type at runtime.


-- Create a new variable
var_id = si_variable_create("my_variable", "FLOAT", 1.5)

-- Changed my mind, I want it to be 2.5
si_variable_write(var_id, 2.5)