Search the Community
Showing results for tags 'custom block'.
Found 3 results
Submitted by Ric on Tue, 03/16/2010 - 01:58 I want to add a custom block that I write in C/C++ into the VisSim menu that can be used in a VisSim diagram just like all the other blocks. I want VisSim to send the wired input data to my block, have my block execute my C code and pass the results back into the VisSim workspace via output wires. I see that your DLL interface allows this. How do I create an MSVC 2008 C++ project to make a custom VisSim block?
Submitted by Joe on Sat, 09/29/2012 - 10:24 Thank you very much for the advice. I was able to start with your example and get everything working. Just a few more questions: Is there any way to left justify the block title for a userFunction? I list a bunch of parameters in the title of my block and it is very hard to read. If I left justify it, it would be easier. If this is not possible, is there a way to make it so that right clicking brings up the file chooser dialog (which I've already programmed) but then double left-clicking brings up a different dialog that would display the static parameter values? How do I add custom block menus to the VisSim drop down bar? I'd love to have custom submenus where I can select my custom .dll blocks. It would be great if they were accessible from the main Blocks drop down window. Every time I insert a userFunction block, I have to add in all of my connectors before linking it to the .dll because the connectors aren't automatically added when I load the .dll to accommodate the correct number of inputs and outputs. Is there a way to have this done automatically when the .dll is linked to the userFunction block?
Submitted by Joe on Fri, 02/15/2013 - 21:37 Hi, I've written some custom blocks in VisSim and they work great. I can simulate and generate code and it shows off our trajectory generation in a motion servo loop really well. My only problem now is that I would like to enter expressions that use variable names from the VisSim diagram in my parameter setup dialog box instead of just numeric constants. Can I do that? If so, how?