Hi everyone
First of all I’m beginner and it’s my first program with PLC and OP touch panel. This forum helps me a lot. Hope this time you can solve my problem.
I make a FC block (FC5) that control filling a tank. There are 9 tanks in the project. So I create 9 instances from FC5 and assign different input-output to the every function. Just one of the tanks should be filled at a time. So just one of the functions is running at the time.
I have a problem with “Temp Variable” in FC blocks. The problem is when instance#1 runs(instance#1 of FC5), after filling the tank, when system switches to the next tank (actually next instance of FC5), all temporary variable that defined in the FC, remains and they are not reset for new instance of FC. For example when tank #1 reaches to its full limit level, a temporary Boolean variable will set. Then, When system switches to tank #2 its temporary variable is set at beginning of FC!
I don’t know what to do. I tried my best! After all I decide to convert FC to FB and assign different DB to each instance. But I decide to hear from you experts.
First of all I’m beginner and it’s my first program with PLC and OP touch panel. This forum helps me a lot. Hope this time you can solve my problem.
I make a FC block (FC5) that control filling a tank. There are 9 tanks in the project. So I create 9 instances from FC5 and assign different input-output to the every function. Just one of the tanks should be filled at a time. So just one of the functions is running at the time.
I have a problem with “Temp Variable” in FC blocks. The problem is when instance#1 runs(instance#1 of FC5), after filling the tank, when system switches to the next tank (actually next instance of FC5), all temporary variable that defined in the FC, remains and they are not reset for new instance of FC. For example when tank #1 reaches to its full limit level, a temporary Boolean variable will set. Then, When system switches to tank #2 its temporary variable is set at beginning of FC!
I don’t know what to do. I tried my best! After all I decide to convert FC to FB and assign different DB to each instance. But I decide to hear from you experts.