Due to the R2020b changes to Simulink Real-Time, the workflow depends on the product version being used. To learn more about the changes to Simulink Real-Time, refer to the release notes documentation:
For R2020a and earlier, you can integrate a USB camera into your model using the USB camera blocks, "From USB Video Device" and "USB Video Device List". To access the release-specific documentation, execute the following command in the MATLAB R2020a command window:
>> web(fullfile(docroot, 'xpc/io_ref/usb-video-display-on-target-computer.html'))
For R2020b and later, connect the USB webcam to the development PC and stream the data to the target machine using the Simulink Real-Time UDP blocks, "UDP Send" and "UDP Receive". To learn more about these blocks, you can refer to the documentation by executing the following commands in the MATLAB R2020b command window:
For "UDP Send":
>> web(fullfile(docroot, 'slrealtime/io_ref/udpsend.html'))
For "UDP Receive":
>> web(fullfile(docroot, 'slrealtime/io_ref/udpreceive.html'))
For an example of transmitting data via UDP, use the following command in the MATLAB R2020b command window:
>> web(fullfile(docroot, 'slrealtime/ug/target-to-host-transmission-using-udp.html'))
Please follow the link below to search for the required information regarding the current release: