Cancel
Showing results for 
Search instead for 
Did you mean: 

Error Handling

Creator
Creator

Hello,

 

I am working with fluids class, and not able to understand the error handler application at all. I want to get rid of two types of error: inflow rate is less then the outflow, tank A can accept only single type of material.

 

I am working on a process plant. In one of my module the fluid gets seperated into two different by-products which then needs to pass through the tanks following it .

 

I already tried usind waituntil commands to make sure fluid enters the tank only if it is empty, but in this I am exceeding the amount of call chains.

 

Can someone help me in this context.

 

Kind Regards,

Parag

4 REPLIES 4

Re: Error Handling

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

"inflow rate is less then the outflow rate"

- I know that Siemens needs it for calculate the flowrates, but it is nasty; one way is control it by open/close the entrance and exits of the tanks; before you start to refill the tank you can shortly close the exit of the tank (exitLocked:=true). Then you can use either a sensor in the tank to open the exit again or you can use a timeout to open the exit.

 

"tank A can accept only single type of material"

- the block for mixing materials is the mixer, the tank can only contain one type of material

I get this errormessage, if I forget to close the entrance of a tank. If I open the pipes for a new material these tanks are still open --> wrong tank. You can fix it by consequently close the entrance of the tanks after filling (entranceLocked:=true).

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Error Handling

Creator
Creator

Thanks a lot !

 

I tried this, when I use this my modules before and after the tank starts giving errors (call chains exceeded). Since I am a new user it is quite possible that my codes are not the ones best suited for the situation. 

 

Anyways for now I found a solution and created a black box with multiple mixers ( I have changing products with varying quantity and recipies ) to get rid of this error. Though I have not tested the solution with my main moddle, I will check that tomorrow and see if that works.

 

And thanks for writing that book, it really helped me a lot. 

Re: Error Handling

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you need to be carefully with waituntil, if the condition is not met, it starts waiting again. If you call the method in this time again, the method is several times suspended.

 

A better way especially for more complex controls is a PLC-like control. Let a generator call a main control in very short intervals (e.g. every second). In the control you can check all conditions and run once the necessary action. Most of the time the control will trigger nothing.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Error Handling

Creator
Creator
It worked I got rid of the error, I know I have a couple of different errors but it is managable.

Thanks!