# Reading a structure format with ANSL library

**URL:** <https://community.br-automation.com/t/reading-a-structure-format-with-ansl-library/8587>\
**Category:** HMI & Visualization\
**Tags:** pvi\
**Created:** [October 3, 2025, 4:53pm UTC](https://community.br-automation.com/t/reading-a-structure-format-with-ansl-library/8587 "2025-10-03T16:53:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Illia\_Antipov](https://avatars.discourse-cdn.com/v4/letter/i/FF8800/32.png) [@Illia\_Antipov](https://community.br-automation.com/u/Illia_Antipov)\
**Post date:** [October 3, 2025, 4:53pm UTC](https://community.br-automation.com/t/reading-a-structure-format-with-ansl-library/8587/1 "2025-10-03T16:53:13Z")

</div>

[pvi](https://community.br-automation.com/tag/pvi)

Hello,  
I am trying to use ANSL library for reading variables from PLC.  
All works with simple data types, but it’s not clear how to get a format of structures.  
For structured variables ANSL\_RESP\_GET\_FORMAT event also has a pointer to ANSL\_VARIABLE\_DATA\_TYPE, m\_DataType indicates it’s a structure, but m\_pTypes (`/* the element types for structures */`) is 0.  
Can anyone advise how to get structure format with ANSL API ?  
Thanks.

Also comment in `ANSLUIF.h` seems has a typo: `/* the total number of bytes for this nesting level (nested elements will structures will be)*/`

---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [October 10, 2025, 9:04am UTC](https://community.br-automation.com/t/reading-a-structure-format-with-ansl-library/8587/2 "2025-10-10T09:04:28Z")

</div>

Hi @Illia_Antipov, obviously no one from the Community has an idea. Can you please get in contact with the support team at your local B&R office and update us when you have a solution?

---

<div class="post-metadata">

**Author:** ![Illia\_Antipov](https://avatars.discourse-cdn.com/v4/letter/i/FF8800/32.png) [@Illia\_Antipov](https://community.br-automation.com/u/Illia_Antipov)\
**Post date:** [October 10, 2025, 1:27pm UTC](https://community.br-automation.com/t/reading-a-structure-format-with-ansl-library/8587/3 "2025-10-10T13:27:29Z")

</div>

Hi @kovarj, according to support team this is not possible for structures.

”AnslUIF can only provide basic data type information but will not provide format information for structs.  
The structure of the data including the alignment must already be known to the client so that it can directly access the members.”

> [@How-to guide - all about Automation Net PVI](https://community.br-automation.com/t/how-to-guide-all-about-automation-net-pvi/4846):
>
> ANSL AR Support PVI supports ANSL CPUs since Automation Runtime V4.08. Older implementations where used for VC4 terminal applications and to speed up module transfer due the INA limitation of 255 byte payload per frame. In fact connecting with ANSL to older CPUs could cause PF on the target PLCs \< V4.08 and is not reccommended. Read codepaths Variables \> 64kB are read async \< 64kB are read sync. ANSL AR Logging Automation Studio 2.x Modify \_@cfxxxxx.xml of the hardware used. (Stored in t…

---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [October 10, 2025, 1:54pm UTC](https://community.br-automation.com/t/reading-a-structure-format-with-ansl-library/8587/4 "2025-10-10T13:54:10Z")

</div>

thanks for clarification, so others can benefit from it 🙂
