User`s guide
14 Using the VideoDevice System Object
14-14
Code Generation with VideoDevice System Object
In this section...
“Using the codegen Function” on page 14-14
“Shared Library Dependencies” on page 14-14
“Usage Rules for System Objects in Generated MATLAB Code” on page 14-15
“Limitations on Using System Objects in Generated MATLAB Code” on page 14-15
Using the codegen Function
The VideoDevice System object supports code generation in MATLAB via the codegen
function. To use the codegen function, you must have a MATLAB Coder license. System
objects also support code generation using the MATLAB Function block in Simulink. You
can also use the System object with MATLAB Compiler™.
Note: The MATLAB Compiler software supports System objects for use inside MATLAB
functions. The MATLAB Compiler does not support System objects for use in MATLAB
scripts.
Note: If you use the codegen command to generate a MEX function on a Windows
platform, you need to perform imaqreset before running the generated MEX file.
Note: The codegen command can be used to generate executable files on non-Windows
platforms. However, generation of the MEX function is not supported on Linux and Mac
platforms.
For more information see the documentation for the MATLAB codegen function.
Shared Library Dependencies
The VideoDevice System object generates code with limited portability. The System
object uses precompiled shared libraries, such as DLLs, to support I/O for specific types
of devices. The shared library locations that the generated executable requires are as
follows: