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 » Monitoring Documentation
Monitoring Documentation [message #1791460] Fri, 29 June 2018 19:03 Go to next message
Felipe Adriano is currently offline Felipe AdrianoFriend
Messages: 26
Registered: February 2017
Location: Brazil
Junior Member
Hi there.

In the monitoring documentation [1] has a simple explanation about how to monitor FORTE applications using DTD XML.

I Tried run a simple python program to retrieve some data from my application runing in the FORTE RTE (whithout using additional function blocks as PUBLISH, SERVER, SUBSCRIBE) but the scritp was not able to comunicate.

I Have downloaded the 4DIAC source and add some prints to understand how the IDE create the watches. The XML sent by my script is the same sent by 4diac (Messages.TCPCommunicationObject_Monitoring_ADD_Watch)

The 4DIAC aplication is simple as in the figure.

My python script is:

import time
import sys

command1 = '<Request ID="1521" Action="CREATE"><Watch Source="E_SWITCH.G" Destination="*" /></Request>'
command2 = '<Request ID="1622" Action="READ"><Watches/></Request>'

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", 61499))

time.sleep(1)
s.send(command1)

s.send(command2)

time.sleep(2)
resp = s.recv(3000)

print resp


How correctly create a connection and retrive data? Is it possible to have multiple monitoring programs communicating with FORTE?

Thanks in advance.

[1] https://www.eclipse.org/4diac/documentation/html/development/forte_monitoring.html

[Updated on: Fri, 29 June 2018 19:05]

Report message to a moderator

Re: Monitoring Documentation [message #1791468 is a reply to message #1791460] Fri, 29 June 2018 20:40 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 667
Registered: January 2014
Senior Member
Hi,

first of all I want to point out that the monitoring interface is a basic debugging support. It is by no means suitable for retrieving runtime data during normal operation for SCADA like tasks. If you need a SCADA like interface I strongly recommend to use something like OPC UA.

Regarding your question on the communication. 4diac monitoring is an extension of the configuration interface defined in the "IEC 61499 Compliance Profile for Feasibility Demonstrations" under the section configurability provisions. There it is defined that two strings are received by a device following the encoding defined in the interoperability section of this spec and one string is returned. The encoding defined in the interoperability section has some headers (i.e., type and length for strings) for each data type. Furthermore for Ethernet it is defined that a SERVER_1_2 should be used, listening to the 61499 port.

Currently IEC 61499 and the compliance profile define that a server can only hold one connection at the same time. Therefore only one tool can connect to a 4diac device for monitoring and or configuration. We are currently reworking the ide to better utilize this connection. Because you may have noticed that when you are monitoring you can not deploy and vice versa. (see this metabug and its children on the progress for that). Furthermore there is also a proposal in IEC 61499-5 currently under development that would allow that more clients connect to a server. But this proposal is not finished and not implemented in 4diac.

Cheers,
Alois
Re: Monitoring Documentation [message #1791495 is a reply to message #1791468] Sat, 30 June 2018 20:30 Go to previous message
Felipe Adriano is currently offline Felipe AdrianoFriend
Messages: 26
Registered: February 2017
Location: Brazil
Junior Member
Thanks by the fast answer

I agree with the purpose of 4diac monitoring, but sometimes there are many parameters to tune in the application running in FORTE and many of these parameters will not be accessed in normal operation using SCADA software.
The main idea then is hide the complexity of the FORTE application (built in the 4DIAC IDE) and avoid unnecessary creation of communication function blocks (i.e SUBSCRIBE and PUBLISH) through a simple graphical interface made in python that is able to monitor and modify parameters in FORTE application like 4DIAC (of course with much less resources) with a user interface that depends of some specific application running in FORTE made in 4DIAC-IDE.

About the communication. I don't have access to the IEC 61499 docs but your tip about encoding made me realize that I was sending a string over the socket connection, when I serialized the string over a byte array before to sent to FORTE application everything worked out.

I saw the metabug, and I already had the problem of deploy while monitoring. But this information is for me be watchful, because 4DIAC will not work when I'm using the python communicating with FORTE application

Thanks a lot for the help.

Regards,

Felipe

Previous Topic:Check values of BOOL[16]
Next Topic:[SOLVED] SUBSCRIBE_2 and PUBLISH_2 issue
Goto Forum:
  


Current Time: Sun Nov 18 17:10:44 GMT 2018

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

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

Back to the top