- This topic has 18 replies, 6 voices, and was last updated 8 years, 7 months ago by SAHIL SINGH.
-
AuthorPosts
-
-
March 19, 2016 at 2:48 pm #33212Ranjeet KumarParticipant
Hi everyone,
Could anyone explain the application of Co Simulation Library in optisystem.
How could i use it and where.
If possible please upload osd and cpp dll file of the design. Which type of file is loaded in cpp component.
Is it support C program code or other.
seeking for quick response from you. -
March 20, 2016 at 2:10 am #33239FAYIQA NAQSHBANDISpectator
HI RANJEET
As far as i know Cpp component will allow for the direct co-simulation of customized models (using dynamic link libraries) with any other OptiSystem component. It includes an open signal architecture interface to allow users to input and/or output any of OptiSystem’s signal types and complex waveform data arrays. I am posting a link where you can get a clear idea about how to use C++ modules. I hope it helps you.
https://optiwave.com/pdf/OptiSystem_14_New_Features.pdf?683531
Thanks & regards -
March 20, 2016 at 2:23 am #33243SAHIL SINGHParticipant
Hi Ranjeet,
I agree with the point of view of Fayiqa about the direct Co-smulation of customised models with any other optisystem component…
Infact i was also going through the same link as posted by fayiqa… Try to go through the link.. Hope it helps..Regards
Sahil Singh
-
March 20, 2016 at 2:39 am #33246Aabid BabaParticipant
Hello Ranjeet,
As far as C++ co-simulation with Optisystem is concerned , I think it is same as co-simulation with Matlab. All you need to do is just write a C++ code for any component you wish to use just like we use to do in Matlab and then proceed similarly as we do in interfacing the Matlab with Optisystem. I feel there shouldn’t be any problem in doing that and i think the link provided by Fayiqa just serves your purpose. you can refer to it to learn about it. I hope you find it useful.
Regards -
March 20, 2016 at 2:41 am #33248SAHIL SINGHParticipant
Hi aabid baba,
Indeed i agree with your view… Thanks for the information..
Regards
Sahil Singh
-
March 20, 2016 at 4:25 am #33268MHD NAParticipant
i know Cpp component will allow for the direct co-simulation of customized models (using dynamic link libraries) with any other OptiSystem component. It includes an open signal architecture interface to allow users to input and/or output any of OptiSystem’s signal types and complex waveform data arrays.
-
March 20, 2016 at 5:29 am #33276FAYIQA NAQSHBANDISpectator
HI MHD
Well you are copying and pasting the above comments…It’s a duplicate comment you are posting…You can join the discussions by putting forth your own views and experiences so that we learn those things…This form is about sharing information and more importantly knowledge..i hope you don’t copy paste the same which is posted in above comments…atleast try to add new points..
Thank and regards
-
-
March 20, 2016 at 7:27 am #33283burhan num mina llahParticipant
Hi All
As of now i have worked on Matlab co-simulation and i believe that C++ co-simulation is equivalent to the MATLAB co-simulations. All you need to do is write a c-code and then call the same code by giving the specific path of that code including its file name as well. In that manner u can co-simulate the c-code. for your reference i am attaching a pdf that is on this c++ component in optisystem and it in details mentions about its usage. hope it helps.
-
March 20, 2016 at 10:33 am #33312Aabid BabaParticipant
Hello Burhan num mina llah,
Thank you for sharing important notes regarding co-simulation of C++ with Optisystem. It is worth mentioning here that be it Matlab code now or C++ code , we can easily interface both with Optisystem now. It has made Optisystem very flexible now. If i remember rightly, burhan num you had to convert Simulink block into Matlab asnd you were able to convert it into C++ only but now your problrm will be solved as you rightly said , you can co-simulate it with Optisystem.
Regards
-
-
March 20, 2016 at 7:31 am #33287burhan num mina llahParticipant
Hi Ranjeet
adding to the above comment i infact think that since we can generate C++ code out of simulink model and also the matlab code could be converted into c++ code so i believe vice versa would be possible as well. i am refeering a link please see we have discussed about generation of C++ code from simulink model. may be this might help u.
Regards
Burhan
-
March 20, 2016 at 10:38 am #33313SAHIL SINGHParticipant
Hello Burhan num mina llah,
Thank you for sharing such valuable information regarding co-simulation of C++ with Optisystem…. Indeed the link provided by you is very helpful..
Regards
Sahil Singh
-
March 20, 2016 at 11:44 am #33327burhan num mina llahParticipant
Hello Aabid baba
Yeah since you are to some extent aware of my project i was to opt for that method of co-simulation but i managed to have a matlab code now and i am co-simulating that now but i had researched about this simulink and matlab co-simulation. That is why i was bale to provide this basic information. Anyways it feels good if somebody gets the help they require as i better know how it feels when u desperately require help and forum plays the role for us. I highly Appreciate this concept of help.
Regards
Burhan
-
March 20, 2016 at 1:13 pm #33339Aabid BabaParticipant
Hi Burhan num mina llah,
Yes i had some idea as we have had a discussion regarding it sometime ago and that’s the reason i mentioned it. Anyways, it good to share things and learn new things. I appreciate your efforts.
Regards
-
-
March 20, 2016 at 2:35 pm #33360FAYIQA NAQSHBANDISpectator
HI ALL..
Thanks burhan for sharing such valuable inputs…..I think Burhan has put forth an important observation and i think it should be clear to ranjeet now how he can co-simualte C++ with optisystem..i had mentioned it should not be problem at first place but now the discussion has already…i hope it will clear now..
Thanks & regards -
March 21, 2016 at 1:26 am #33383SAHIL SINGHParticipant
HI ALL..
Infact very valuable information put forward by Burhan regarding how to co-simualte C++ with optisystem… Highly appreciate your efforts…
Thanks & regards
Sahil Singh
-
March 21, 2016 at 5:49 am #33444burhan num mina llahParticipant
Hi All
You are welcome. This is what this forum is meant to be for . We learn and provide information to others as well. Such discussions are always appreciated.
Regards
Burhan
-
March 21, 2016 at 1:58 pm #33516Ranjeet KumarParticipant
Thank you everyone for sharing such important and wonderful information.
as from above links i have come across the following informations:OptiSystem’s Cpp Component allows users to create their own custom components in C++ for use in OptiSystem in a similar manner to the MATLAB component. The user can also create their own internal graphs and results that can be displayed within OptiSystem.
The project is large with many classes available to the user. Due to the number of configuration settings involved, it is recommended to create a copy of this default project and add code to it for each component the user wishes to define. The user may add as many classes as they wish to this project but it is not recommended that they remove or alter the classes already provided other than at the defined entry point: Calculate_API() in class DS_SystemManager.cpp.
The component can be configured in two modes:
Release mode. The component project is compiled as a dynamic link library (.dll). OptiSystem will load this “.dll” in during runtime. The signal data is passed directly from OptiSystem to the “.dll” and then, after processing, from the “.dll” back to OptiSystem. This is the mode to use when you wish to run OptiSystem and your C++ component within it.
Debug mode. The component project is compiled as a stand-alone application (.exe). Running the component project from within the developer environment will allow the user to enter the code, set breakpoints and examine their data. OptiSystem creates copies of the signal data in various text files which will be loaded by the project. The project knows where to obtain these files and their formatting by an XML data file it loads at runtime.
The project has been set up so that very little changes must be made to switch between the two modes. The user will not need to alter any of their code, just change some configuration settings and add a line of code to tell the project where to find the XML file mentioned above. The two different modes are explained in detail in Tutorial 1: Binary Signal Manipulation.
The most effective way to learn how to use the Cpp component is to follow the tutorials in the documentation. They will teach the user how to access and manipulate the basic data structures, configure the project for release and debug mode, and use many of the convenience functions built into the project. It is recommended that the user create a copy of the default project available at http:/optiwave.com/?p=28551 for each tutorial, then follow along for the manipulations of the C++ code and the creation of the OptiSystem project.http:/optiwave.com/?p=28551
-
March 22, 2016 at 5:08 am #33531burhan num mina llahParticipant
Hi Ranjeet
i appreciate your such an elaborate explanation. it shows how we can interface a c++ component or we can say a code with the rest of the components in optisystem. It would be quite easy for u infact now to co-simulate the code now. appreciated!
Regards
Burhan
-
March 22, 2016 at 6:52 am #33535SAHIL SINGHParticipant
Hi Ranjeet
I completely agree with Burhan Num Mina Llah and really appreciate your such an elaborate explanation. … It would be quite easy now for u to co-simulate the code.Thanks for such valuable information…
Regards
Sahil Singh
-
-
AuthorPosts
- You must be logged in to reply to this topic.