Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [4diac-dev] Support for OPC UA events

Hi Matthias,

 

it sounds very interesting. We were also thinking in the same direction. I know, there was some ongoing work on implementing OPC UA Events in forte [1], but I don't know its current status.

 

I would propose to use SUBSCRIBE_0 (and PUBLISH_0 on the server side) for handling OPC UA events. I don't think there should be a generic FB for state machines as I can imagine those will be quite different in each particular case. But if we have methods and events support, one can already create a subapp to control a state machine.

 

One other thing that is missing in forte but might be useful for controlling an OPC UA state machine is references support. Events can carry some data. In OPC UA it is realized by a reference from the Event instance to an object, which client should check for updates, whenever an Event is triggered. For doing that, 4diac should be able to browse the OPC UA namespace and find out these kind of "bindings" and then create a subscription to this data (or simply read it after Event notification occurs). But one can also add this manually on the first step, I see references as more like “nice-to-have”, not desperately needed.

 

Here, for example, how I'd see an implementation for controlling an OPC UA Programs State Machine in 4diac

 

Each Transition Event gets a Subcribe_0 with an ID

opc_ua[SUBSCRIBE_EVENT;<endpoint_address>#;<browse_path_to_object>;ReadyToRunning]

 

Each control method gets a Client FB with an ID

opc_ua[CALL_METHOD;<endpoint_address>#;<browse_path_to_ method>]

 

To sum up: I think, you’re on the right way of implementing it. Just subscribe to a particular event type -- as each of your StateMachine transitions will have its own type – and it should work. Something like ReadyToRunning in case of OPC UA Programs. So you just specify the particular type in your SUBSCRIBE ID, and you’ll have one SUBSCRIBE FB per each transition (see my example above). Btw, you don’t have any RD_x in SUBSCRIBE_0, so I was a bit confused when you describe that you will have some flags for each RD.

 

This will be a generic implementation of OPC UA Events in forte without any state machines specifics.

 

Hope it makes sense and helps somehow.

 

Cheers,

Kirill

 

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=553521  

 

-----Original Message-----
From: 4diac-dev-bounces@xxxxxxxxxxx <4diac-dev-bounces@xxxxxxxxxxx> On Behalf Of Matthias Konnerth
Sent: Saturday, April 18, 2020 12:44
To: 4diac-dev@xxxxxxxxxxx
Subject: [4diac-dev] Support for OPC UA events

 

Hi,

we want forte connect to a opc ua statemachine and gather the transition events of it. To interact with opc ua statemachines the mechanisms of method calls (supported by forte) and events (currently not supported by forte) are needed.

 

I've done a little prototype implementation and now able to get notified when a event is triggered on an opc ua object. (I don't filter the event type or any other member of the event type).

 

Now I'm thinking about the interface, how it could be used in the 4diac ide.

 

Currently I'm using a SUBSCRIBE_0 FB with ID:

 

opc_ua[SUBSCRIBE_STATEMACHINE;<endpointurl>;<browsePath to Object I want to monitor>;<NodeId of EventType I'm interested in>]

 

Next step would be to map the opc ua TransitionIds to the RD_1 ...RD_n outputs as boolean flags for signaling which transitionEvent has been fired.

 

You see, the interface is quite narrowed for supporting statemachines.

 

Do you think, this can be done in a more generic way?

 

Best regards,

Matthias.

_______________________________________________

4diac-dev mailing list

4diac-dev@xxxxxxxxxxx

To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/4diac-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top