8/29/2011 11:27 PM | |
Posts: 36 Rating:
|
Hello everybody Why we must use TEMPORARY variables in FC or FB as data block pointer? |
8/30/2011 8:15 AM | |
Posts: 2348 Rating:
|
You mean in case OPN DB[#DB_num] why #DB-num is accepted as TEMP, but not as INPUT or i miss something? |
8/31/2011 2:12 AM | |
Posts: 36 Rating:
|
Hello Darius Thanks for your attention I can not use any other kind of varible types like STATICas data block pointer. |
9/5/2011 3:00 PM | |
Posts: 36 Rating:
|
Hello Darius If we want to use pointer for data blocks in an FB ,we must use TEMP.variable too.We are not able to useSTATIC variable either,why? |
9/6/2011 2:01 PM | |
Joined: 10/7/2005 Last visit: 6/8/2023 Posts: 2968 Rating:
|
Hello alifaez let me start by stating that you can use an FB's STAT variable as a DB pointer. This is however only possible if you remove the Multi Instance capability from the FB when you create it. By default, Multi Instance capability is ticked when you create an FB, in which case Step 7 will NOT allow you to use a STAT variable as a DB pointer. Even though I suppose the Step 7 Editor could be changed to able to handle/allow this, it won't be an easy fix for Siemens as AR2 is taken into accountfor all accesses to FB variables with Multi Instance capability(AR2 contains the Multi Instance offset). What you can do though in a Multi Instance capable FB is use for example "DIW xyz" directly as the DB pointers address. Note that this though means that the FB will NOT work if called as a Multi Instance. I hope this helps and attached is a pic with an example for both cases which shallhelp in making sense out of what I'm trying to say. |
Cheers |
|
Follow us on