I have a problem with Qt, I use QOpcUa with open 6254 to read and write tags on a PLC but sometimes the following error occurs: "error / client Inactivity for Subscription" and my program crash. I have identified the problem and this happens because the PLC is writing in this tag at the same time. I would like to know if there is a way to check the availability of the tag before writing?
I have already learned about the subject and there are functions like StatusCode or monitoringStatus but I can't use them properly.
void NodeLoad::writeOrderNumber(QString value)
{
//if("method that checks the availability of the tag" == true)
OrderNumber->writeAttribute(QOpcUa::NodeAttribute::Value,value,QOpcUa::Types::String);
//else qDebug() << "Error";
}
If the tag is not available at the time of writing, the following error occurs: [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 36.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 35.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 36.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 35.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 34.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 33.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 32.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 31.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 30.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 29.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 28.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 27.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 26.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 25.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 24.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 23.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 22.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 21.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 20.
- [2019-08-30 09:07:07.019 (UTC+0100)] error/client Inactivity for Subscription 19.
- 09:07:07: The program has unexpectedly finished.
- 09:07:07: The process was ended forcefully.