Data Write Block

Data Write Block

The Data Write block will store the value of its input to a custom variable. This can be useful when needing to share data across States or Components.

You must create a custom variable in the scope of a Data Write block in order for this block to compile.

In general, Data Read/Writes within the same visual level of an app are discouraged. The example below is just meant to illustrate functionality in one screen capture. If your diagram is so convoluted that you want to use Data Read/Writes to avoid crossing signal wires, you should consider refactoring your diagram into smaller, cleaner components.

However, if you need to share data from one side of an app to another, and don't want to plumb in a bunch of signals to do so, Data Read/Writes are great. They are particularly powerful for State Machines, which otherwise don't have a means of sharing data. Eventually we will allow targetted data handoffs between States, but for now, use Data Read/Writes.

Examples

Counter Example