使用局部变量时应考虑内存
- 更新时间2025-08-27
- 阅读时长1分钟
局部变量复制数据缓冲区的数据。从一个局部变量读取数据时,便为相关控件的数据创建了一个新的缓冲区。
如使用局部变量将大量数据从程序框图上的某个地方传递到另一个地方,通常会使用更多的内存,最终导致执行速度比使用连线来传递数据更慢。如在执行期间需要存储数据,可考虑使用移位寄存器。
ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.