Hi Łukasz,

Thanks for your reply.

It is Twincat 3 for me. 
I was able to get a connection for reading and browsing the PLC.

One of my problems have been related in the load-symbol-and-data-type-tables 
option. I had set it to false. I thought the driver would discover the symbolic 
addresses on a per variable bases while querying it, but it doesn't.
As soon as I set the options to true I can browse the variables.

Best regards,


Björn





-------------------------
Bjoern Haverland
Tel.: +49 171 7535 889
Mail: bjo...@b-have.de

-----Ursprüngliche Nachricht-----
Von: Łukasz Dywicki <l...@code-house.org> 
Gesendet: Mittwoch, 29. Mai 2024 16:13
An: dev@plc4x.apache.org
Betreff: Re: ADS

Hello Björn,
Symbolic variable names depend on twincat version.

For twincat 2.x you can use .<VAR_NAME> syntax, for 3.x you use 
<Task>.<VAR_NAME>.
Given your example, for TC2 symbolic address on plc4x side will be .GVL and 
.GVL_TEST. For fresh twincats it will be Main.GVL and Main.GVL_Test (assuming 
you have such task in your PLC project).

Best,
Łukasz

On 24.05.2024 15:34, bjo...@coding-nexus.com wrote:
> Hi,
> 
>   
> 
> Is someone able to provide me a small code example on how to query ADS 
> variable?
> 
>   
> 
> Say  I have a GVL called GVL_TEST how could I browse it or even read 
> GVL_TEST.test which would be a String(10).
> 
>   
> 
> My attempts to read it like I do read a Variable at the S7 are leading 
> to null…
> 
>   
> 
> Thank you very much!
> 
>   
> 
> Best regards and happy weekend
> 
>   
> 
> Björn
> 
>   
> 
> -----------------------------------------------------------------
> 
> Coding Nexus LLC
> 
> Björn Haverland
> 
> 2880W Oakland Park Blvd
> 
> Suite 225C
> 
> Oakland Park
> 
> 33311 Florida
> 
>   
> 
> Tel: +1 954 607 2347
> 
>   
> 
>   <mailto:bjo...@coding-nexus.com> bjo...@coding-nexus.com
> 
>   <https://www.coding-nexus.com/> https://www.coding-nexus.com
> 
>   
> 
>   
> 
> 

Reply via email to