Why do I receive an error relating to INSTRGATE when I execute my application that uses a SERIAL object and was compiled with MATLAB Compiler 4.1 (R14SP1)?

1 view (last 30 days)
My application makes use of a SERIAL object and I have compiled it with MATLAB Compiler 4.1 (R14SP1). When executing my stand-alone application, the following error message is returned:
undefined function/command 'instrgate'
In my prorgam, I never make use of the INSTRGATE function.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in the Instrument Control Toolbox 2.1 (R14SP1) in the way that it determines whether it is licensed during the run-time of a compiled application.
Note that this error is purely cosmetic and that despite the message, serial port functions operate as intended.
This error message occurs only the first time you call a function related to serial ports. To prevent the message from appearing, simply put the first of such calls in a TRY...CATCH block. For example, in a GUI initialization function you might insert:
try
s = serial('com1');
catch
end
This code forces generation of the message, but catches the error, causing it to not be displayed. Any subsequent calls related to the serial port will not generate the message and do not require a TRY...CATCH block for suppression of the message.

More Answers (0)

Categories

Find more on Troubleshooting in Instrument Control Toolbox in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

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

Start Hunting!