Why do I get errors when I try to use a Simulink block from Vehicle Network Toolbox 1.3 (R2010b) in a library?

4 views (last 30 days)
I am trying to use the CAN Transmit block from Vehicle Network Toolbox 1.3 (R2010b) in a library. When I do this, I get an error:
 
Warning: Error evaluating 'LoadFcn' callback of CAN Transmit block (mask) 'VNT_Library_Test/Transmit
Test/CAN Transmit'. Attempt to modify a locked (read-only) library.
> In vntcansfcnstart>localFindCurrentBlock at 108
In vntcansfcnstart at 35
I also see the following warning in the MATLAB prompt: ERROR: Error in 'Test_VNT_Blocks_with_lib/Transmit Test/CAN Transmit' while executing C MEX S-function 'svntcantransmit', (mdlStart), at time 0.0.
Variations of this error occur for the following VNT blocks:
'canlib/CAN Configuration';
'canlib/CAN Log';
'canlib/CAN Receive';
'canlib/CAN Replay';
'canlib/CAN Transmit';
The error messages look like the following:
  ERROR: Warning: Error evaluating 'LoadFcn' callback of CAN Transmit block (mask) 'canlib_issues/CAN Transmit'. Warning: Attempt to modify 'canlib_issues' which is a locked (read-only) library Warning: Error evaluating 'LoadFcn' callback of CAN Replay block (mask) 'canlib_issues/CAN Replay'. Warning: Attempt to modify 'canlib_issues' which is a locked (read-only) library Warning: Error evaluating 'LoadFcn' callback of CAN Receive block (mask) 'canlib_issues/CAN Receive'. Warning: Attempt to modify 'canlib_issues' which is a locked (read-only) library Warning: Error evaluating 'LoadFcn' callback of CAN Log block (mask) 'canlib_issues/CAN Log'. Warning: Attempt to modify 'canlib_issues' which is a locked (read-only) library Warning: Error evaluating 'LoadFcn' callback of CAN Configuration block (mask) 'canlib_issues/CAN Configuration'. Warning: Attempt to modify 'canlib_issues' which is a locked (read-only) library

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Nov 2016
These errors are caused by a bug in the Vehicle Network Toolbox (VNT). This bug has been fixed as of VNT 2.0 (R2013a). For earlier releases, you can install the attached patch, 'privatevntslinitlib.m’, by using the following instructions:
1. Go into the following folder: "<matlabroot>\toolbox\vnt\vntblks\vntmasks\private\". Here, matlabroot refers to the MATLAB installation directory. The MATLABROOT command can be used at the MATLAB prompt to show its location.
2. Rename the existing ‘privatevntslinitlib.m’ file so that you can restore it in case something goes wrong.
3. Drop the attached ‘privatevntslinitlib.m’ file into the folder.
If you still observe errors, you can also install the attached patches for 'vntcansfcnstart.m', 'privatecansladdconfig.m', and 'privatevntsfcnfindconfig.m' by using the following instructions:
1. Rename the existing vntcansfcnstart.m file under the “<matlabroot>\toolbox\vnt\vntblks\vntmasks\” directory. Drop the new ‘vntcansfcnstart.m’ into this directory.
2. Rename the ‘privatecansladdconfig.m’ and ‘privatevntsfcnfindconfig.m’ files under the “<matlabroot>\toolbox\vnt\vntblks\vntmasks\private” directory. Drop the two attached files of the same name into this directory.
3. Restart MATLAB.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2010b

Community Treasure Hunt

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

Start Hunting!