Home Forums EXCHANGE CO-SIMULATION PYTHON OPTISYSTEM15 CIDF Scheduler error

CO-SIMULATION PYTHON OPTISYSTEM15 CIDF Scheduler error

Profile Photo
(joined September 2022)
Participant

Hello here, Please I need some help. I’m texting codes for co-simulation between Optisystem 15 and Python but while running the code I get a CIDF Scheduler error (see image erreur_code). I’m texting the PythonExample_ParallelToSerialConverterComponent.osd
Can you help me fixing this please? Thank you in advance

Attachments:

Responses (15):

    • #71168
      Profile Photo
      Claudette oza
      Participant

      Hello here, Please I need some help. I’m texting codes for co-simulation between Optisystem 15 and Python but while running the code I get a CIDF Scheduler error (see image erreur_code). I’m texting the PythonExample_ParallelToSerialConverterComponent.osd
      Can you help me fixing this please? Thank you in advance

      Attachments:
    • #71174
      Profile Photo
      Ahmad Atieh
      Moderator

      Dear Claudette,
      please refer to the readme files (Python Examples Calculation Instruction Readme file.txt and readme.txt) in the example library at the following location for guidance how to run python files.
      C:\Users\USER NAME\Documents\OptiSystem 19.0 Samples\PythonScripts
      regards,
      Ahmad

    • #71184
      Profile Photo
      Claudette oza
      Participant

      Hello thank you for your answer. Please I want to know if the version of python in the readme is necessarly the one I have to use with the anaconda. Because I’ve downloaded the latest version of anaconda with python 3.9.12. And after that I’ve tried to run the code but it was not working.
      And apart from the anaconda do I have to download something else ? Because most of the requirement where already in the anaconda I’ve installed.

      Thank you in advance for your answer

      Attachments:
    • #71189
      Profile Photo
      Ahmad Atieh
      Moderator

      Hello Claudette,
      you need to use Python version 3.87.
      regards,
      Ahmad

    • #71199
      Profile Photo
      Claudette oza
      Participant

      Thank you for your help. It’s working now.

    • #71268
      Profile Photo
      Claudette oza
      Participant

      Hello, hope you’re doing well. Please another issue. When I run a code in Optisystem with python co-simulation I don’t have a command window that can help me checking my values such as the command window of Matlab. Is there any way to have check my python script variable in a co-simulation with Optisystem? Thank you in advance;

    • #71269
      Profile Photo
      Ahmad Atieh
      Moderator

      Hello Claudette,
      There is no command window in OptiSystem software like Matlab.
      You may have extra outputs for the Python Component where you could monitor the output at different positions in your code using the different visualizers in OptiSystem.
      Regards,
      Ahmad

    • #71305
      Profile Photo
      Claudette oza
      Participant

      Hello, hope you’re doing well.
      I’m trying this time to recuperate the optical Sampled signal from a laser via a python code. Can you help me please?
      In the caption you can see via the component “View Signal Visualizer” the datas I’m trying to recuparate in the python code.
      My priority is mostly the complex datas displaying in the signal Visualizer

      Thank you in advance for your support

      Attachments:
    • #71307
      Profile Photo
      Ahmad Atieh
      Moderator

      Hello Claudette,
      could you please explain why do you need to use Python to get the data, although you may download the data using .txt or .csv file format?
      Regards,
      Ahmad

    • #71308
      Profile Photo
      Claudette oza
      Participant

      I writing a python code in cosimulation with Optisystem and the code needs these datas at each calculation(run). The solution of copying in a txt file is not dynamic. If you could help me with a way to recuperate theses informations in the python code.
      I’ve used your examples of cosimulation between and optisystem and in the file attached below, objOSignal is the signal in which I should be able to recuperate the datas I’ve shown you in the previous message.

    • #71322
      Profile Photo
      Claudette oza
      Participant

      Hello, any update please ?

    • #71328
      Profile Photo
      Alex Raytchev
      Participant

      Hi Claudette,

      Before you can retrieve data from the signal you first have to ensure that you calculated the project

      mydocument.CalculateProject(True, True)
      or
      mydocument.CalculateAllSweepIterations(True, True)

      depending on what type of simulation you are running.

      Then to send the data to a .txt file dynamically you can assign a value to a file location, ex. file = open(“SomeFilePath”),’w’), and then in a loop file.write(objSignal) to export the data.

      An example of this can be found in OptiSystemSDK_General (SDK_Result.py or SDK_OutputPort.py)

      Another possibility for why it isn’t working is that objOpticalSignalInput1 is not defined. If its copy and pasted from an example you would have to ensure that all variables are defined somewhere. ex objOpticalSignalInput1 = GetSampledSignalSignal()

      If you’re still having troubles you can either send me the exact error message or I can take a look at the code for you and debug it.

      Regards,
      Alex

    • #71363
      Profile Photo
      Claudette oza
      Participant

      Hello, me again with another problem with python cosimulation with Optisystem.
      My python code is compiling well but do not communicate with the rest of the optisystem code. Going through an optical fiber, the optisystem compilation was ongoing for 6hours and didn’t finish since. To see if the problem is with the output of my code, I have compiled (run) the program and sent the input signal at the output port the python code compile (run) well as always but the optisystem compilation through the fiber is still not working or will take at least 8min before finishing.
      Can you help me finding what is the problem? Is it a problem of storage not supported by optisystem regarding my python code or something else ? And how can I fix it ?
      Thank you in advance

      Ps: Even when I suppress my python code adds, and just set the code as a bridge (input=output), the compilation with the fiber will take at least 8minutes before working when usually it’sa matter of 5 to 10 secondes.

    • #71364
      Profile Photo
      Claudette oza
      Participant

      Also I unfortunately can not send the code since it’s a research work. Hope you’ll understand

    • #71365
      Profile Photo
      Ahmad Atieh
      Moderator

      Dear Claudette,
      We need to get valid maintenance and support license to provide extra support for your project. You may contact infor@optiwave.com to get a quote for this service. To get a quote, you need to provide the name of your university and the contact information.
      You need to acquire valid license of OptiSystem software and have valid maintenance license.
      Regards,
      Ahmad

Login You must be logged in to reply to this topic.