Vehicle Network Toolbox CAN Receive/Unpack with Stateflow and SLDRT

2 views (last 30 days)
Charles Refvem
Charles Refvem on 15 Apr 2020
I'm working with several toolboxes and can get each one working just fine but they seem to play poorly with eachother. I'm using the Vehicle Network Toolbox, Simulink Desktop Real-Time and Stateflow.
My model uses the Real-Time Sync block and Accelerator mode for time-keeping because the Vehicle Network blocks don't support External mode. I am using the CAN Receive blocks to scan for CAN messages and them I'm using a CAN Unpack block inside a Function-Call Subsystem to decode the messages. This collection of blocks works exactly as expected when it is in the outermost system.
When I place these blocks inside a Simulink State in my Stateflow chart, they do not receive CAN messages anymore. Is there a known compatiblity problem between Stateflow and the Vehicle Network Toolbox? Do I need to set things up differently to receive CAN messages within Stateflow?
I will try to produce and attach a MWE to illustrate the problem I am having, but it will be challenging with external hardware dependencies like my CAN transceiver.

Answers (0)

Community Treasure Hunt

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

Start Hunting!