UDP Communication with Unity in Simulink Destkop Real-time Kernel Mode
Show older comments
I have a desktop real-time system executing on a single PC using kernel mode. I would like to be able to send to and receive data packets from unity through UDP. The unity program is also running on the same PC. The data in collected from a DAQ (NI PCI 6229). This is the block layout I'm using, which is similar to the one here. Note that the sine block is for testing; it will be replaced with the input source block

However, whenever I build the model in kernel mode, I get the following error:
.
.
.
### Writing source file rtGetNaN.c
### Writing header file DCMotor_Test_PWM_LF_Unity_private.h
### Writing header file rtmodel.h
### Writing source file DCMotor_Test_PWM_LF_Unity_data.c
### Writing header file rt_defines.h
### TLC code generation complete.
### Generating TLC interface API.
### Creating data type transition file DCMotor_Test_PWM_LF_Unity_dt.h
Warning:Matching "From" for "Goto" 'DCMotor_Test_PWM_LF_Unity/Goto3' not found
Top model targets built:
Model Action Rebuild Reason
=====================================================================================
DCMotor_Test_PWM_LF_Unity Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 6.582s
Error: Dot indexing is not supported for variables of this type.
Running the model in connected I/O mode works and the data is sent and received; however, it's not real-time (around 1-2 secs of delay) despite the present of the real-time sync block.
1 Comment
Amr Okasha
on 20 May 2022
Accepted Answer
More Answers (0)
Categories
Find more on System Configuration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!