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 次查看(过去 30 天)
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.

采纳的回答

MathWorks Support Team
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Troubleshooting in Instrument Control Toolbox 的更多信息

产品


版本

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by