Monitoring Documentation [message #1791460] |
Fri, 29 June 2018 19:03 |
Felipe Adriano da Silva Gonçalves Messages: 35 Registered: February 2017 Location: Brazil |
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 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03355 seconds