I am getting a "INVALID VALUE FOR A MASK PARAMETER". What should i do?

7 views (last 30 days)
Error evaluating registered method 'CheckParameters' of MATLAB S-Function 'msfun_arduino_digitalwrite' in 'motorPulseFilt2/Arduino Digital Write'. The following is the MATLAB call stack (file names and line numbers) that produced this error: ['C:\Users\MPK\Documents\MATLAB\Add-Ons\Collections\Legacy MATLAB and Simulink Support for Arduino\code\simulink\msfun_arduino_digitalwrite.m'] [56] Caused by: Invalid value for a mask parameter Component:Simulink | Category:Blockerror
  5 Comments
mahdi nasserifar
mahdi nasserifar on 15 Apr 2018
Edited: mahdi nasserifar on 15 Apr 2018
you probably are using a file which has been compiled in earlier version of matlab. However, as the newer versions are being released some capabilities are omitted, and some are added for better performance. as far as i know some MEX files and S-functions compiled in matlab 2015b and earlier are not supported any more in matlab 2016a and on. specially in your case "Legacy MATLAB and Simulink Support for Arduino" the codes are written and compiled in 2014 edition which are now unsupported in newer versions. to resolve the issue try to use earlier matlab version like 2015a which has came into result for me. but mathworks says it can be used in new released versions if the files are recompiled from their sources in newer versions but i have not tried it yet. FYI arduino boards in newer versions like 2017 and on are supported only in "external mode". which i have faced it as a great drawback for the ones who want to use their simulation in "normal mode".Although it might be some solutions to regain data from arduino boards in normal mode in earlier releases but till now I could not find the way .... Anyway, if you really persist on using arduino board in normal mode in the simulink; try using previous matlab versions,otherwise; get the new support package for your matlab version through the main menu in matlab base mode: HOME tab/ADD-ONs/ get hardware support packages/install from internet ( another note: for myself" download from internet" always showed an error in the last step and my download faild.so it is better and recommended to use "install from internet") then you can use arduino blocks in simulink more easily but unfortunately only in external mode :-(

Sign in to comment.

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!