Hi, Here I am in trouble I think, I have many Standard Blocks written in combination of STL and LAD, like following:
FB130:Valve(open/close)---100 numbers in total
FB230:Motor/Agitator------10 numbers
FB340:WeightScale---------10 numbers
Then I have called all this similar standard block in another FB to cleate a common Instance DB.
1.In FB100(,Instance DB 100) I have called all the valves with multiple instances.
2.In FB200(,Instance DB 200) I have called all the MOTOR/AGITATOR with multiple instances.
3.In FB300(,Instance DB 300) I have called all the WeightScale with multiple instances.
UPTO THIS I DIDN'T HAVE ANY PROBLEM.But now I need a procedural Standard Function Block FB100,(CLEAN).This FB will be standard & will be called 7 times.Just imagine Clean operation to be perfomed in 7 different Vessels with same logic but different Valve/Motor/Pump..etc.
4. In FB50( instance DB50), this FB 100 will be called multiple times(Instance-1 for Vessel-1, instance-2 for Vessel-2...& so on), then some parameters of different valve/motors need to be compared/checked or commanded to open/close/start/stop inside the FB100.I can do that if I use INPUT, OUTPUT, IN_OUT variable inside FB100 and then assign the corresponding parameters.But according to software specification we have more than 100s of things need to be passed into FB100 and dont want to many In/Out parameters to be seen when call them.So we have created a list of variable as STAT. So here I am in trouble. How I can send different parameters to FB100 in each call of FB100?
First I am thinking to use some indirect addressning like this:
When I will call this FB100(Vessel-1 as first instance) those STAT variales inside FB100 will indirectly read/write into/from destination defined in another DB(shared Db, DB10, 1st pointer Index table),When I will the 2nd Instance of FB100(Vessel-2) now the STAT variables will read/write indirectly from/into the destination that is defined in another(DB10, different location 2nd pointer Index table).And So on....
my english not so good, But I hope I cleared most of the things that this application needs.
FB130:Valve(open/close)---100 numbers in total
FB230:Motor/Agitator------10 numbers
FB340:WeightScale---------10 numbers
Then I have called all this similar standard block in another FB to cleate a common Instance DB.
1.In FB100(,Instance DB 100) I have called all the valves with multiple instances.
2.In FB200(,Instance DB 200) I have called all the MOTOR/AGITATOR with multiple instances.
3.In FB300(,Instance DB 300) I have called all the WeightScale with multiple instances.
UPTO THIS I DIDN'T HAVE ANY PROBLEM.But now I need a procedural Standard Function Block FB100,(CLEAN).This FB will be standard & will be called 7 times.Just imagine Clean operation to be perfomed in 7 different Vessels with same logic but different Valve/Motor/Pump..etc.
4. In FB50( instance DB50), this FB 100 will be called multiple times(Instance-1 for Vessel-1, instance-2 for Vessel-2...& so on), then some parameters of different valve/motors need to be compared/checked or commanded to open/close/start/stop inside the FB100.I can do that if I use INPUT, OUTPUT, IN_OUT variable inside FB100 and then assign the corresponding parameters.But according to software specification we have more than 100s of things need to be passed into FB100 and dont want to many In/Out parameters to be seen when call them.So we have created a list of variable as STAT. So here I am in trouble. How I can send different parameters to FB100 in each call of FB100?
First I am thinking to use some indirect addressning like this:
When I will call this FB100(Vessel-1 as first instance) those STAT variales inside FB100 will indirectly read/write into/from destination defined in another DB(shared Db, DB10, 1st pointer Index table),When I will the 2nd Instance of FB100(Vessel-2) now the STAT variables will read/write indirectly from/into the destination that is defined in another(DB10, different location 2nd pointer Index table).And So on....
my english not so good, But I hope I cleared most of the things that this application needs.