Automation Studio:4.12;Automation Studio target for Simulink:6.9.1.
Matlab/Simulink:R2021a.
When I finish configuring the Simulink B&R Config function block, the following error is reported in the Matlab window, the corresponding screenshot is attached. But when I select the ZIP mode, there is no such error.
Hi @hua.wang
I just tried replicating this with a fresh install of Automation Studio Target for Simulink version 6.9.1, Automation Studio version 4.12.6, and Simulink version 2023a. I was successfully able to create a model, configure the B&R Config block using your screenshots, and generate the code for the AS project without errors.
A couple of questions for you:
- Have you been able to use the plugin in the past, or is this happening right after a fresh install?
- Can you please translate the red error messages in your screenshot? Iām not sure if the Chinese characters hold important information or if theyāre just saying āhereās an errorā.
Iām not a Matlab expert, but I thought I could at least try to replicate your process. I have a few ideas of things that might help you:
- Try running Matlab/Simulnk as an administrator
- Automation Studio 4.12.6 has a new default install directory (C:\ProgramFiles instead of C:\BrAutomation). The Target for Simulink installer needs to know the AS directory. If youāve recently updated to AS 4.12.6 but havenāt re-run the Target for Simulink installer, Iād recommend that to make sure that it has the correct Automation Studio directory.
- To that end, if youāve recently updated MATLAB, you might want to re-run the Target for Simulink installer to make sure it is installed in the correct MATLAB directory
- Iām not sure what the backwards compatibility is like when it comes to MATLAB. Target for Simulnk v6.9.0 supports R2023b and v6.4.0 was released to support R2021a. You could try installing an older version (e.g. v6.4.0) just to see if you get the same errors.
@Marcus Mangel
1.This is happening right after a fresh install.
2.Matlab Error:
Function or variable ānodeInvalidā not recognized
Error burblks.classes.blks.BR_CfgBlockApp/ProjectPathValueChanged
Error burblks.classes.blks.BR_CfgBlockApp/ParameterCheckup
Error burblks.classes.blks.BR_CfgBlockApp/ApplyButtonPushed
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallBack(line 410) to calculate Button PrivateButtonPushedFcn is an error.
I have tried old matching versions of Simulink (2020a) and AST (6.4), still the same error!
Similarly, mingw64(6.3 and 8.1) has been modified for different versions of SIMULINK ļ¼still the same error!
AS:4.12.6 AST:6.9.1 Matlab/Simulink:2023a: still the same error!
Iāve tried replicating these errors using the same settings as you. Unfortunately, Iām not able to, but I do have a general theory as to what may be happening.
Based on the error messages (and your observation that everything works okay when you create a zip package rather than linking the B&R Config block to an actual Automation Studio project), I think that there is an error in the process that checks and validates the linked project.
When you browse for an Automation Studio project, you must select a directory that has an apj file. The project youāre selecting seems to be valid because the Config block has found the CPU and cycle time information. One test I did was to select a project, and then disable all permissions to the project directory from Windows explorer. When I clicked āApplyā in the B&R Config block, I got an error that my project directory wasnāt valid (because an apj file couldnāt be found. It was there, but not accessible). This confirms that a checking process is triggered when you click the Apply button. I think that your error messages mean that something is going wrong in that process. My first guess is some sort of antivirus or permissions problem thatās not allowing the plugin access to the project directory, but thatās just a first thought.
Hopefully someone with more Matlab/Simulink experience than me sees this and has another idea. However, Iād also recommend you get in touch with your local B&R team or create a support ticket. Iām not able to find any reference to these errors, but theyād be able to help you track down some more information.
@marcusbnr
Client computers do not contain antivirus software, while there are no restrictions on directory permissions. I have created a Ticket, but no reply yet!
Hi @hua.wang,
Did you ever find a solution to this?