(1)| 11/17/2010 1:14 AM | |
|
Joined: 10/7/2005 Last visit: 12/19/2025 Posts: 3052 Rating:
|
Hello lidumazie I agree in principle with smiffy's example, buthave oneword of caution: The example FB is NOT Multi Instance capable. If you require this, you will need to take the (AR2 based) Multi Instance offset value into account. How this can be done isdescribed at the end ofthe FAQ below which also has other useful tips and tricks on how to handle ANY Pointer based Parameters (note too the additional indirect addressing related FAQ links at the top of that page): How do you parameterize blocks, which have "ANY"-type or "Pointer" type parameters? I hope this helps |
|
Cheers |
|
This contribution was helpful to
|
|
| 10/12/2017 4:09 PM | |
|
Joined: 9/19/2016 Last visit: 5/15/2025 Posts: 66 Rating:
|
Actually I don't understand why single instance is working without offseting any-pointers with datablock instance address. Correct me where I'm wrong : Before calling, datablock is filled with parameters (IN/OUT/IN_OUT). FB Code is then called at runtime with AR2 register to point datablock used. AR2 is used to copy data over code instance ones. As it is a copy over, any-pointer adresses are wrong. So why single instance is working without AR2 offset ? |
Last edited by: -dFx- at: 10/12/2017 4:15:16 PMWhy does it is so hard to make it simple ? |
|
Follow us on