Monitoring Documentation [message #1791460] |
Fri, 29 June 2018 15:03  |
Eclipse User |
|
|
|
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 15:05] by Moderator
|
|
|
|
Re: Monitoring Documentation [message #1791495 is a reply to message #1791468] |
Sat, 30 June 2018 16:30  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06940 seconds