Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Some idea about how to implement persistence of input parameters in 4diac-forte(Some function blocks need persistence to retain last values changed through SUBSCRIBE FBs)
Some idea about how to implement persistence of input parameters in 4diac-forte [message #1808263] Thu, 20 June 2019 17:57 Go to next message
Felipe Adriano da Silva Gonçalves is currently offline Felipe Adriano da Silva GonçalvesFriend
Messages: 35
Registered: February 2017
Location: Brazil
Member
Hi everyone,

Imagine that you have a SUBSCRIBE FB (e.g. opc ua) used to set some values in a Proportional Integral Derivative FB. How to retain the last change if forte service running in some DEVICE restart for some reason?

Ps.: One idea is always change of forte.fboot always that SUBSCRIBE FB generate a IND event, connecting the output of this SUBSCRIBE FB in a block that changes the forte.fboot file.

Does anyone else have an idea to share?

Thanks

[Updated on: Thu, 20 June 2019 18:55]

Report message to a moderator

Re: Some idea about how to implement persistence of input parameters in 4diac-forte [message #1808286 is a reply to message #1808263] Fri, 21 June 2019 05:54 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Maybe you could have two FBs: one to read from files and another to write on them. When you get the value from the subscribe, you write it in the file. And at the beginning of your forte, you could read from the file.

In the lms_ev3 module there are examples of these FBs called fileReader and fileWriter. Unfortunately, the FBs for the IDE are not present and I think these FBs should be moved to utils modules and made generic. Here's the bug about the missing FBs in the IDE: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547248
Re: Some idea about how to implement persistence of input parameters in 4diac-forte [message #1808551 is a reply to message #1808286] Wed, 26 June 2019 17:27 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

This is an interesting use case. I like Jose's approach because it is very generic and can be applied for different things. The only thing you have to ensure is that the value in the OPC UA server is also updated so that a remote configuration tool will always see the correct value.

This brings me to another Idea which I don't know if it is possible and if it makes sense: As the for your application the main source of the config value is OPC UA should OPC UA be in charge of managing the persistence of such values? Is this foreseen in OPC UA or even possible? Or is this the wrong place for doing such things?
Re: Some idea about how to implement persistence of input parameters in 4diac-forte [message #1808576 is a reply to message #1808263] Thu, 27 June 2019 05:42 Go to previous message
Felipe Adriano da Silva Gonçalves is currently offline Felipe Adriano da Silva GonçalvesFriend
Messages: 35
Registered: February 2017
Location: Brazil
Member
I spend some time trying understand lms_ev3 module, but due the lack of example/hardware to test the FB I could not clear understand how to use fileRead and fileWriter to figure out the persistence problem.

I think that the fileWriter and fileReader is related with some IO functionality reading a linux device (e.g. /dev/gpio) and updating IO Function Blocks. As said by Alois in the previous message the main drawback is ensure that OPC UA Variable in the server will be updated in the INIT sequence (after forte starting up again), with the values stored in some file after forte has been restart for some reason (e.g. from some error).

I also don't know if is a good idea OPC UA manage this persistence. I think that the forte.fboot and back initialization is the solution (mainly based in my experience of retain variables in IEC 61131-3, which is not managed by communication protocols*) because if the forte.fboot file is updated (internally due the information that FB Input is retentive or using a FB to write in the forte.fboot XML) the back initialization will initialize output of predecessor FB (OPC UA Subscribe) using the values of successor FBs like example bellow.

index.php/fa/35829/0/

Due the back initialization the OPC-UA SUBSCRIBE Will be initialized with the values of KP, KI and KD from PID function block in the INIT sequence (OPC UA server is also updated so that a remote configuration tool will always see the correct value).

The forte.fboot file have the following lines related with this values in a kind of XML format.

EMB_RES;<Request ID="3" Action="WRITE"><Connection Source="1.9" Destination="PID.KP" /></Request>
EMB_RES;<Request ID="4" Action="WRITE"><Connection Source="2.5" Destination="PID.KI" /></Request>


If the OPC UA Variable (in subscribe FBs) already is initialized using back initialization, is not a good idea have some functionality to make PID.KP, PID.KI and PID.KD variable in PID FB as Retained variables and provide some way update the forte.fboot always that this value is changed?

Thank you for the attention to the problem.

* In IEC61131-3 RETAIN is used to indicate retentive variables, i.e. variables whose values are to be retained during a loss of power.

[Updated on: Thu, 27 June 2019 16:19]

Report message to a moderator

Previous Topic:Building 4diac FORTE for Wago issue
Next Topic:IEC 61850 Sampled Values
Goto Forum:
  


Current Time: Tue Apr 16 13:58:19 GMT 2024

Powered by FUDForum. Page generated in 1.73182 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top