data input with connection in CustomFB [message #1822566] |
Tue, 10 March 2020 01:54  |
Eclipse User |
|
|
|
\project\forte-incubation_1.11.0\src\core\dataconn.cpp
void CDataConnection::readData(CIEC_ANY *pa_poValue) const{
if(m_poValue){
if(!mSpecialCastConnection){
pa_poValue->setValue(*m_poValue);
}
else{
CIEC_ANY::specialCast(*m_poValue, *pa_poValue);
}
}
the m_poValue is always false when there is data connection
plz see the attachement, each time i trigger event REQ of b1, then the Reqval of b1 is FALSE, if there is not data connection, the Reqval is TRUE,
|
|
|
|
|
|
|
Re: data input with connection in CustomFB [message #1822578 is a reply to message #1822576] |
Tue, 10 March 2020 04:54   |
Eclipse User |
|
|
|
This is the attachment, i didn't pack all the template fbs, just my own
After deploying, i just triger the First FB's Req event by manually.
Attachment: M35.7z
(Size: 5.19KB, Downloaded 76 times)
Attachment: 1.jpg
(Size: 29.81KB, Downloaded 95 times)
Attachment: 2.jpg
(Size: 28.52KB, Downloaded 80 times)
Attachment: noconn1.jpg
(Size: 27.00KB, Downloaded 88 times)
Attachment: noconn2.jpg
(Size: 27.52KB, Downloaded 87 times)
[Updated on: Tue, 10 March 2020 05:00] by Moderator
|
|
|
|
|
|
Re: data input with connection in CustomFB [message #1822602 is a reply to message #1822598] |
Tue, 10 March 2020 08:34  |
Eclipse User |
|
|
|
this is perfectly correct behavior of 4diac FORTE. The value that you see is the value at the FB's data store. However this is not the value available for other FBs, as it is defined in IEC 61499. The value is only made available when you send an event. In 4diac FORTE this is solved such that we have a data buffer in the connection. On the occurrence of the output event the FB's value is copied to the connection. On the occurrence of the input event the value is copied from the connection to the value.
When we implemented the monitoring we discussed a long time what values we should show to the users. After weighing all the pros and cons we decided to always show the values at the FB. Although this may lead to a strange situation like in your case you always get the values that are available in your FB for ECC and Algorithms. Maybe we should add a feature to monitor the connection. But I'm not sure if this adds any value.
|
|
|
Powered by
FUDForum. Page generated in 0.05452 seconds