DialogCondition usage|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
DialogCondition usage
Avatar
Alexander Tyutik
Ukraine
Member
Members
Forum Posts: 15
Member Since:
07/21/2015
sp_UserOfflineSmall Offline
1
04/22/2020 - 11:04
sp_Permalink sp_Print

Hi!

I want to have DialogConditionType instance in my OPC-UA server and use it to show dialogs for clients. Test client is UAExpert.

It is not clear for me what exactly should i do for this.

I’ve made next steps:

1) Created model design xml for model compiler

2) Created TestObjectType with instance of DialogConditionType and ShowDialog method

3) Created TestObject as instance of TestObjectType 

4) Created TestNodeManager and loaded compiled uanodes file in it

5) override AddBehaviourToPredefinedNode method and set ShowDialog.OnCallMethod handler, Dialog.OnRespond method handler and some parameters for dialog as in samples

6) In ShowDialog.OnCallMethod i do next things:

Dialog.Message.Value = “The dialog was activated”;
Dialog.Retain.Value = true;
Dialog.SetEnableState(context, true);

// activate the dialog.
Dialog.Activate(context);

7) In UAExpert i made subscription to TestObject

 

And here i have problems. If i call ShowDialog before subscription then dialog shown only once after i made subscription. If i call ShowDialog after subscription then it has no effect. Also i can’t show dialog second time in any case.

Maybe someone can give advice about what i’m doing wrong…

Best regards!

Avatar
Randy Armstrong
Admin
Forum Posts: 1580
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
04/22/2020 - 15:05
sp_Permalink sp_Print

The dialog is a state machine like any condition or alarm.

Clients depend on events being raised whenever there is a state change.

They also depend all active conditions getting returned in ConditionRefresh.

i.e. when UAExpect creates an event subscription it calls ConditionRefresh.

The server needs to return all conditions with Retain=true.

If your server is not returning the dialog state then UAExpert will not know about until the state changes again.

Avatar
Alexander Tyutik
Ukraine
Member
Members
Forum Posts: 15
Member Since:
07/21/2015
sp_UserOfflineSmall Offline
3
04/23/2020 - 04:24
sp_Permalink sp_EditHistory
Awaiting Moderation

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 18
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1446
Posts: 4891