1

I am currently trying to setup the windows real-time kernel in Matlab r2013b, but the command rtwintgt -setup is giving me an error. I have read the following link and confirmed that I do have admin access and my license includes Real-Time Windows Target. rtwintgt install

My error is as follows: ``

rtwintgt -setup

There is a different version of the Real-Time Windows Target kernel installed.
Do you want to update to the current version? [y] : y
> Error using rtwintgt>ErrorDialog (line 363) Installer error: "Failed
> to copy the kernel to Windows system folder. The process cannot access
> the file because it is being used by another process.".
> 
> Error in rtwintgt>RunInstaller (line 280)   ErrorDialog(prompt,
> message('rtwin:installer:installererror',   errmsg));
> 
> Error in rtwintgt>rtwt_setup (line 119) result = RunInstaller(prompt,
> 'install');
> 
> Error in rtwintgt (line 68)   retval = feval(subfn, prompt);

From the line, "The process cannot access the file because it is being used by another process," I can understand that there is another program interrupting the file retrieval, but I do not know what program. I have tried ending as many tasks as I could and have restarted my computer . Any help would be much appreciated, as I am trying to get this to work for a project.

Community
  • 1
  • 1
azumakazuma
  • 63
  • 12

1 Answers1

0

I had the same problem and I managed to find a solution. The errors were most likely caused by a previously installed/uninstalled version of MATLAB which is different from your currently installed version. According to the MathWorks website, uninstalling the MATLAB environment does not uninstall the Simulink Desktop Real-Time kernel. Open your MATLAB command window and type "rtwho". If you see two different Real-Time versions, there lies the problem.

To solve the problem,

  1. Uninstall the Real-Time kernel version associated with the previous/uninstalled MATLAB environment by typing "sldrtkernel -uninstall" in the command window. If it doesn't work in the MATLAB command window like I experienced, type it in the Windows Run Dialog. If uninstalled successfully, you should see the message "The Simulink Desktop Real-Time kernel uninstalled successfully."
  2. Go back to the MATLAB command window and install the kernel using the command "sldrtkernel -install". You should get the message, "You are going to install the Simulink Desktop Real-Time kernel. Do you want to proceed? [y] :" Type "y" to continue the installation, and on successful completion, you should get the message, "The Simulink Desktop Real-Time kernel has been successfully installed."

This should solve the problem.

N/B: You can enter the "rtwho" command in the MATLAB command window afterwards to confirm that there is only one Real-Time version. I hope this helps. See this link for more: https://www.mathworks.com/help/sldrt/ug/real-time-windows-target-kernel.html