Return a value from Lua sequence

Hey guys,

Is there a way to return a value from a Lua sequence and read it in another sequence?

Let say I want to know which tool is mounted, I have the following Lua sequence.

return get_device("mounted_tool_id")

I want to reuse this sequence in another sequence which is not Lua, how can I do that?

Hi @nbourre return values of Lua blocks in Sequences are discarded I think. Lua code has access to an env() routine which stores and retrieves persisted key-value pairs but other Sequence blocks, which use CeleryScript implementation, can’t see those . . But there is a SysCall to read them . . Not sure how to invoke that from a standard CeleryScript node. Maybe @Gabriel knows ?