Now I have a need to use the same var both ways (any instrument can read or write the var)
The wiki example only demonstrates the first case.
Code: Select all
-- Create a new AM variable
var_id = am_variable_create("my_variable", "FLOAT", 1.5)
-- Changed my mind, I want it to be 2.5
am_variable_write(var_id, 2.5)
This seems a little weird as I was expecting it to behave in a similar fashion to writing a sim variable such as xpl_dataref_write where the creation is already done within the sim and we write directly to it or subscribe to it for a read. IMHO It would simplify things if we could do this.
Code: Select all
am_variable_write("my_variable", 2.5)