Hello,
I am creating a custom module for the first time and would like to know how to add
pin and variables.
I wrote the following in the m file:
PT=new_pin_type([], [], [], '*32', []);
PT2=new_pin_type([], [], [], '*32', []);
add_pin(M, 'input', 'in', 'check', PT);
add_pin( M, ‘input’, ‘pin2’, ‘mycheck2’, PT2);
When placed in the AWE designer, I get the following:
mod_to_canvas.p(0):. RenderPins failed: failed,-50,pin2,,
mod_to_canvas.p(0):. UpdateProperties failed: failed,-13,no such property as 'var.gain
Do I need to do any additional work after writing this in the m-file?
Could you please help me find out where the problem is?
best regard.
9:52am
Hi Sone-san,
See the definition of the add_pin function here.
Add Pin
One thing to notice, although it would not cause this problem, is that PT and PT2 have the same arguments and are creating an identical pin "type". There's no need to do this, as you can reuse a pin type to create more than 1 pin with the same type.
Do you know where this is coming from?
var.gain
Is that somewhere in your module.m file? Can you post the entire file?
Thanks,
Gary
7:44pm
Hello DSPC_Gary.
Thank you for taking the time to answer our questions.
I have attached the
file and error log with the script modifications I made following your advice.
I have written a test code to verify that Properties and variables can be displayed in AWE Designer.
BEST regards.
8:25pm
Hi Sone-san,
I took your module.m file and built a module using the default process() inner C file and I commented out the Inner post constructor file. There is no problem or error when dropping the module into my layout or running it. This suggests that the MATLAB code is OK. Do you make reference to "var.gain" anywhere in your C code? If so, can you show me that line?
You may wish to view the Example code supplied here to see how to access module variables in your code:
C:\DSP Concepts\AWE Designer 8.2025.1 Pro\AWEModules\Source\Examples\Inner
Thanks,
Gary
8:42pm
Hello, DSPC_Gary.
Thanks for showing me the steps and where to find the samples.
I will try your advice.
thank you
12:08am
Hello, DSPC_Gary.
Thank you for addressing this issue.
I tried to create a new custom module but it did not work as I expected
I am very sad.
The steps would be as follows
1. Start AWE Designer and AWE Server by typing “awe_designer” in the command window of MATLAB 2025a.
2. Selected [Tool]->[Module Pack Creator Wizard] in AWE Designer.
3. Specify “testoutmodule2” as the name of the Module pack and ‘60002’ as the classid, and press “create”.
4. The solution created in step 2 was built with Visual Studio 2019 to create a dll.
4. added add_pin to testoutmodule2_module.m in MATLAB 2025a.
5. Type “awe_designer” in the command window of MATLAB 2025a again to launch AWE Designer and AWE Server.
6. When I use a custom module registered in AWE Designer with AWE Designer, an error is displayed in matlab.
AWE Designer also shows only one pin diagram for input.
Please tell me what is wrong with my procedure, such as a bad version of MATLAB.
If you have a sample custom module with more than 2 INPUT PINs defined, I would like it.
I will give you the image and m-file.
Please help me.
Thank you.
12:20pm
Hi Sone-san,
Thank you for the additional detail. It could be the version of MATLAB. I am using r2022b. If possible, please try that.
Our "minimum requirements" as shown on the Downloads page indicate MATLAB r2021 through r2024b. For MATLAB, it should really say "absolute requirements".
Thanks,
Gary
12:57am
Hello,DSPC_Gary.
I appreciate your correspondence.
I tried AWE Designer Pro with MATLAB r2024b and MATLAB r2022b.but, It occurred same issue.
By the way, if I comment out the code of including add_pin line, it will show pin properly reduced.
So, I would like to try it with a version older than AWE Designer 8.2025.1 Pro.
Would you please provide me with a software version older than ver 8.2025.1 via your company's representative?
Thank you,
Sone
6:40am
Here are some additional things I found out.
1.m file as follows
PT=new_pin_type([], [], [], '*32', []);
add_pin(M, 'input', 'in', 'Input signal', PT);
add_pin(M, 'input', 'micin', 'Input signal', PT);
add_pin(M, 'input', 'mic2in', 'Input signal', PT);
add_pin(M, 'output', 'out', 'Output signal', PT);
2. When I press the Run button in AWE Designer, I get an error like error2.png. The error is intentionally made for the sake of explanation.
I know AWE Designer recognizes micin and mic2in, but
PIN is not drawn. I would like to solve this .
Thank you in advance for your help.
8:58pm
Make sure that when you make changes to the Module Code:
If you are not sure, update all 3 items.
Does it help?
Thanks,
Gary
10:48pm
Hello, Mr.Gray.
With your advice I noticed that the xml was not updated.
Then I noticed that running make_*.m updates various files.
Unfortunately, the Guide didn't mention that I need to run make_*.m after updating *_module.m.
(I read the Guide in auto-translation, so that part might have disappeared).
Thank you, I will try to fix the problem.
I just solved the problem and the PIN is now displayed
You responded to me and I was able to solve it.
Thanks.
Sone