Home Forums EXCHANGE CO-SIMULATION PYTHON OPTISYSTEM15 CIDF Scheduler error

Viewing 30 reply threads
  • Author
    Posts
    • #79896

      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

    • #80905
      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:UsersUSER NAMEDocumentsOptiSystem 19.0 SamplesPythonScripts
      regards,
      Ahmad

    • #83509
      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:UsersUSER NAMEDocumentsOptiSystem 19.0 SamplesPythonScripts
      regards,
      Ahmad

    • #80907
      Lonny Blaine
      Member

      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

    • #83511
      Lonny Blaine
      Member

      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

    • #80911
      Ahmad Atieh
      Moderator

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

    • #83515
      Ahmad Atieh
      Moderator

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

    • #80917
      Lonny Blaine
      Member

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

    • #83521
      Lonny Blaine
      Member

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

    • #80929
      Lonny Blaine
      Member

      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;

    • #83533
      Lonny Blaine
      Member

      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;

    • #80931
      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

    • #83535
      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

    • #80953
      Lonny Blaine
      Member

      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

    • #83557
      Lonny Blaine
      Member

      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

    • #80955
      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

    • #83559
      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

    • #80957
      Lonny Blaine
      Member

      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.

    • #83561
      Lonny Blaine
      Member

      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.

    • #80961
      Lonny Blaine
      Member

      Hello, any update please ?

    • #83565
      Lonny Blaine
      Member

      Hello, any update please ?

    • #80963

      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

    • #83567

      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

    • #80969
      Lonny Blaine
      Member

      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.

    • #83573
      Lonny Blaine
      Member

      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.

    • #80971
      Lonny Blaine
      Member

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

    • #83575
      Lonny Blaine
      Member

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

    • #80973
      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

    • #83577
      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

    • #80979
      Lonny Blaine
      Member

      Ok, thank you

    • #83583
      Lonny Blaine
      Member

      Ok, thank you

Viewing 30 reply threads
  • You must be logged in to reply to this topic.