Listener OnChange

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

Listener OnChange

Post by bernd.parchmann »

hello,

is there an example (just unified automation, not prosysopc) for a java listener that listen to changes of variables(nodes)?

thx!

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

Re: Listener OnChange

Post by bernd.parchmann »

Nobody has some expample for a changeListener?!

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

Re: Listener OnChange

Post by Support Team »

Hello Bernd,

actually I am not sure what you are asking for. Monitoring some Nodes for changes is one of the basic functions in any OPC (and OPC UA) communication szenario. With "listening for changes" you are talking about the client side?
1) connect
2) create subscription
3) create monitored items (monitoring mode set to value changes)
>> wait for publish responses containing your value change notifications

Is that what you are looking for?

Best Regards
Support Team

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

Re: Listener OnChange

Post by bernd.parchmann »

hi,

yes, thats exactly what i am looking for.
the prosysopc example/tutorial contains this functionality. but in the unified automation example i just found code to read values...

greetings!

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

Re: Listener OnChange

Post by bernd.parchmann »

hi again,

yes, i want to write an client. this client should connect the (beckhoff) opc ua server, "extract" the variables in the global variable lists on the plc. this variables should be monitored an if some changes happen on the plc, i want to handle this changes.

in the examples for java i cannot find something like that. the examples just containing connecting to a server, browse some nodes an reading a value of a node.

is there an java example for subscription/monitoring?

greetings

Post Reply