フィルターのクリア

How to ensure data consistency when using Simulink External Mode to tune parameter under VxWorks RTOS ?

1 回表示 (過去 30 日間)
Parameters can be tuned using Simulink External Mode, which is very helpful for developing. But data consistency may be not guaranteed when using VxWorks RTOS.
The RT task runs at higher priority and "rt_PktServer" task runs at background which used to tune parameter. When a "tune command" is received from Simulink, "rt_PktServer" just find the address of that parameter, and copy new value to the address like this: (void)memcpy(address, newValue, nBytes); No mutex is used to protect, consistency problem occur if RT task preempt this copy process.
How to ensure data consistency under this situation ?

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by