Welcome to the TRNSYS Users Forum.
The forum is a place where people can interact and have discussions about different topics involving the use of the TRNSYS software package. Here you can post topics for discussion or questions on using TRNSYS and get advice from other users or TRNSYS experts. This forum is not intended for detailed technical support. Users should contact their distributor’s hotline for such assistance.
Some tips for success on using the forum:
- Follow the Forum Rules posted in Forum Administration.
- There are categories for different types of topics and questions. Post your topic or question into the proper category.
- Before posting a topic or question search the existing topics (and the TRNSYS Users listserv archive or Post archive) to see if a similar topic or question has already been answered.
- Use a descriptive topic name. Don’t use attention getting subjects, they don’t get attention and only annoy people.
- State the version of TRNSYS and which add-ons your are using.
- Include enough specific details for your topic of question to be answered. Just posting “Why am I getting an error?” without describing the specific error and what you are trying to do when you get the error will not receive a response that fixes your issue.
- Remember when people help you, they are doing you a favor. Be patient, help people out by posting good descriptions of what you need help with, and be polite even if a response does not solve your issue.
- Moderators may edit your post for clarity or move your topic to a more appropriate category.
If (unit > 0 .and. Call(unit) .and. Call6(unit)) Then
If (unit > 0) Then If (Info(3,unit) <= 0) Then
Sorry, I have no idea why my post became all black...and why my previous post of the same title turned out empty.
See attached a screenshot of the stack when the crash occurred.
The reason why I was looking at the LOOP statement was that I'd like my iterative feedback controller (Type 22) to try out a control value and then wait for the system to converge for that value, before adjusting the control value - instead of adjusting the control value in response to the error changing due to the rest of the system trying to converge. I hope I'm making any sense. 🙂
Damian, if the LOOP command is not functioning in v18 it is a bug and not something intentional.
That said, Type22 has the concept of setting the number of allowed controller state changes to 0 for the case that you describe. In this mode, the controller will stick to its decision before the maximum number of allowable iterations so that the other components in the system can come to convergence without the controller causing problems.
You might also look at using Type23 (the PID controller). It has a mode in which it can make its control decision only after the other components in the system have converged. That control decision is then the starting point for the controller's state at the next timestep.
kind regards,
David