The Blocks of the Vehicle Network Toolbox in Simulink do not output any Signal Changes

2 views (last 30 days)
Hi all,
I'm working with 'Vehicle Network Toolbox' in Simulink. My model is depicted in the following:
,
where the 'Configuration' and 'Receive' block have following settings:
,
.
The problem is that if 'CAN Msg' is readout, the signals 'CAN Receive/2.Data:7' and 'CAN Receive/2.Data:8' are constantly zero.
However, these signals must be non-zero which can be confirmed in different CAN-Bus tools. Moreover, if 'canTool' is applied in Matlab, the change of the 'Data' can be monitored:
If 'Out1' is readout in the Simulink model, the signals 'Function-Call Subsystem:7' and 'Function-Call Subsystem:8' are constantly zero again.
The block 'function()' is modeled as follows:
Thank you for your help!
Best regards,
Jochen

Accepted Answer

Jochen Schenek
Jochen Schenek on 11 Aug 2020
SOLVED
Solution:
  1. Uninstalling PEAK-System PCAN USB driver in the Device Manager. (Previously I had installed the official driver from PEAK-System. However, that driver is not helpful in this case!)
  2. Rebooting the system.
  3. Installing the Add-On "Vehicle Network Toolbox Support Package for PEAK-System CAN Devices".
Voila, it works!
Best regards,
Jochen
  2 Comments
Wen Yin Tay
Wen Yin Tay on 16 Dec 2020
I am developing the system that is monitoring the vehicle speed. I am using NI-XNET 8052 to get the signal from the vehicle with the help of Vehicle Network Toolbox. So far, I have identified the Standard CAN ID for the vehicle speed, as we can see from the picture below, the red box highlighted the vehicle speed. For now, I am not sure how to read the bit value only. If you happen to know the way, can you share it with me? Thanks.
Jochen Schenek
Jochen Schenek on 16 Dec 2020
Edited: Jochen Schenek on 16 Dec 2020
Hi Wen,
I don't know how to read the bit value only in this monitor after executing the command:
canTool
However, if you execute follwing commands:
canch = canChannel('NI','CAN1');
start(canch);
...
data = receive(canch,Inf,'OutputFormat','timetable');
stop(canch);
You will get the 'raw data' in the Workspace. Afterwards you can process the 'raw data' by using the standard commands in Matlab.
Best regards,
Jochen

Sign in to comment.

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!