Memory Considerations when Using Local Variables
- Updated2025-08-15
- 1 minute(s) read
Local variables make copies of data buffers. When you read from a local variable, you create a new buffer for the data from its associated control.
If you use local variables to transfer large amounts of data from one place on the block diagram to another, you generally use more memory and, consequently, have slower execution speed than if you transfer data using a wire. If you need to store data during execution, consider using a shift register.