Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

1) I think your using the wrong calling point (you're setting a weather variable and then it is being reset from the weather file). Try begin_timestep_before_predictor.

2) This is probably best to show with an example:

In the IDF:

PythonPlugin:Variables,
  Python Variables,                       !- Name
  a01_t_supp_f;                           !- Variable Name 1

PythonPlugin:OutputVariable,
  a01_t_supp_f,                           !- Name
  a01_t_supp_f,                           !- Python Plugin Variable Name
  Averaged,                               !- Type of Data in Variable
  SystemTimestep,                         !- Update Frequency
  ;                                       !- Units

Output:Variable,
  a01_t_supp_f,                           !- Key Value
  PythonPlugin:OutputVariable,            !- Variable Name
  Timestep;                               !- Reporting Frequency

In the Python script:

self.a01_t_supp_f_hndl = self.api.exchange.get_global_handle(state, "a01_t_supp_f")
self.api.exchange.set_global_value(state, self.a01_t_supp_f_hndl, self.a01_t_supp_f)

Read the documentation for PythonPlugin:OutputVariable and Output:Variable for information on update and reporting frequency.

3) This is hard to answer without more detail. I would encourage you to read Section 6 of https://energyplus.net/sites/all/modules/custom/nrel_custom/pdfs/pdfs_v9.5.0/EMSApplicationGuide.pdf for information on calling points. The E+ examples files (C:\EnergyPlusV9-5-0\ExampleFiles\PythonPlugin*.idf/.py on Windows) will most likely show an example of what you're looking for.

Can you share you .py file?

1) I think your using the wrong calling point (you're setting a weather variable and then it is being reset from the weather file). Try begin_timestep_before_predictor.

2) This is probably best to show with an example:

In the IDF:

PythonPlugin:Variables,
  Python Variables,                       !- Name
  a01_t_supp_f;                           !- Variable Name 1

PythonPlugin:OutputVariable,
  a01_t_supp_f,                           !- Name
  a01_t_supp_f,                           !- Python Plugin Variable Name
  Averaged,                               !- Type of Data in Variable
  SystemTimestep,                         !- Update Frequency
  ;                                       !- Units

Output:Variable,
  a01_t_supp_f,                           !- Key Value
  PythonPlugin:OutputVariable,            !- Variable Name
  Timestep;                               !- Reporting Frequency

In the Python script:

self.a01_t_supp_f_hndl = self.api.exchange.get_global_handle(state, "a01_t_supp_f")
self.api.exchange.set_global_value(state, self.a01_t_supp_f_hndl, self.a01_t_supp_f)

Read the documentation for PythonPlugin:OutputVariable and Output:Variable for information on update and reporting frequency.

3) This is hard to answer without more detail. I would encourage you to read Section 6 of https://energyplus.net/sites/all/modules/custom/nrel_custom/pdfs/pdfs_v9.5.0/EMSApplicationGuide.pdf for information on calling points. The E+ examples files (C:\EnergyPlusV9-5-0\ExampleFiles\PythonPlugin*.idf/.py on Windows) will most likely show an example of what you're looking for.