How to ensure data consistency when using Simulink External Mode to tune parameter under VxWorks RTOS ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!