Chapter 5 Generated Code ArchitectureAutoCode Reference 5-4 ni.com• Write-To Variable Block (ALL Addressing mode)—These blocksexecute after all other types of blocks within the subsystem, procedureor sequence frame.• Read-From/Write-To Variable Block (Element/Bit Addressingmodes)—These variants to access variable block information aresequenced just like any other block; that is, it is sequenced after itsinputs have been computed.Global Variable Block and %var EquivalenceIf a Global Variable Block and a %var use the same name, only onevariable is generated and that variable will be used for all instances of the%var and Variable Block.Optimization for Read-From Variable BlocksAutoCode supports an optimization for Read-From Variable Blocks(Global and Local) that eliminates the copy and directly accesses the localor global variable. This optimization is optional and the optimization ofglobal and local variable blocks can be separately controlled. Globalvariable block optimization works only if variable blocks are not sharedbetween multiple subsystems and when the -vbco option is not used.Global Scope Signal CapabilityThe memory and performance requirements of real-time production codeforce the issue of global variables. AutoCode does not generally use globalvariables; rather, it creates and uses stack variables and explicit interfaces.While that architecture is perfectly sound, it does cause overhead in aproduction system. Therefore, AutoCode supports direct use of globalvariables for local block outputs within a subsystem. Extending thatconcept allows global variable(s) to be used as the inputs and outputs of aprocedure.Chapter 9, Global Scope Signals and Parameterless Procedures, providesinformation about using global scope signals and using global variables asthe input(s) and output(s) of a procedure. Such a procedure is called aparameterless procedure.