Get Variables of PLC

Questions regarding the use of the Java SDK for Server or Client development or integration into customer products ...

Moderator: uasdkjava

Post Reply
bernd.parchmann
Full Member
Full Member
Posts: 9
Joined: 11 Mar 2014, 12:37

Get Variables of PLC

Post by bernd.parchmann »

Hi,

I want to get a list of the variables in a global variable list of a beckhoff plc.

Is there a simple and short sample of java code?!

I need a method to get a list or array of all nodes/variables. or a method to search a node/variable with the variable-name.

Thx for help!

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Get Variables of PLC

Post by Support Team »

Hi,

The only way to get a list of all available nodes in a server is to browse recursive through the server address space.

Just start from the browse sample code provided with the SDK.

!!!
You should be very careful with recursive browsing in OPC UA address spaces.
OPC UA address spaces can contain loops which leads to infinite recursive browsing. You need to check if you have already used a node as staring node.
!!!


Best Regards,
Unified Automation Support Team

Post Reply