Target Language Compiler | ![]() ![]() |
Caution Against Directly Accessing Record Fields
When functions in the block target file are called, they are passed the block and system records for this instance as arguments. The first argument, block
, is in scope, which means that variable names inside this instances Block record are accessible by name. For example,
%assign fast = SFcnParamSetting.Fast
Block target files could generate code for a given block by directly using the fields in the Block record for the block. This process is not recommended for two reasons:
model
.rtw
file can change from release to release. This can cause block TLC files that access the model
.rtw
file directly to no longer work.![]() | Using Library Functions to Access model.rtw Contents | Exception to Using the Library Functions | ![]() |