To learn OPC UA with components for c++ i was going through the opc ua example. (https://github.com/PLCnext/CppExamples/tree/master/Examples/OpcPlcManager) I did every step with c++ on eclipse in a acf library, but i do not know what do next with the component and how to deploy it in the plcnext engineer platform.
Can somebody explain how i can deploy the example?
because what i got is a datatype that can’t be used to be deployed and i did not get any components to deploy either
With kind regards,
Patrick Jacobs
Hi Patrick.
At the end of the build process you should have a .so (shared object library) file containing the component. This can be deployed to the PLCnext Control device in the same way as any other ACF component. And, just like for other ACF components, an .acf.config file must also be deployed to the device.
The basics of ACF component deployment are included in this tutorial:
If you still have questions after working through that tutorial, please let us know.
Dear Martin,
I have done everything what was asked in the tutorial, but i get a Fatal error:
03.02.23 21:38:00.287 Arp.System.Acf.Internal.ApplicationBase FATAL - Fatal error occurs in application ‚MainProcess‘:
03.02.23 21:38:00.288 Arp.System.Acf.Internal.ApplicationBase FATAL - Exception occurs: Exception of type ‚Arp::System::Commons::InvalidConfigException‘ was thrown
The configuration ‚/opt/plcnext/projects/Default/OpcPlcManager.acf.config‘ is not valid.
at /usr/lib/libArp.System.Commons.so(+0x14de2a) [0x7fe7cf212e2a]
at /usr/lib/libArp.System.Commons.so(+0xa4de5) [0x7fe7cf169de5]
at Arp::System::Commons::Xml::XmlConfigDocument::TryLoad(Arp::BasicString<char, std::allocator > const&)
at Arp::System::Commons::Xml::XmlConfigDocument::Load(Arp::BasicString<char, std::allocator > const&)
at Arp::System::Commons::Xml::MultiXmlConfigDocument::ReadDocument(Arp::System::Commons::Xml::XmlReader&)
at Arp::System::Commons::Xml::XmlConfigDocument::TryLoad(Arp::BasicString<char, std::allocator > const&)
at Arp::System::Commons::Xml::XmlConfigDocument::Load(Arp::BasicString<char, std::allocator > const&)
at Arp::System::Acf::Internal::Sm::Config::AcfConfigurationLoader::Load(Arp::BasicString<char, std::allocator > const&, Arp::BasicString<char, std::allocator > const&, Arp::System::Acf::Internal::Sm::Config::AcfConfiguration&)
at Arp::System::Acf::Internal::Sm::Config::AcfConfigurationLoader::Load(Arp::BasicString<char, std::allocator > const&, bool, bool, Arp::System::Acf::Internal::Sm::Config::AcfConfiguration&)
at Arp::System::Acf::Internal::Sm::SystemManager::LoadConfig()
at Arp::System::Acf::Internal::Sm::SystemManager::SetupSystemSettings()
at Arp::System::Acf::Internal::Sm::SystemManager::SetupSystem()
at Arp::System::Acf::Internal::ApplicationBase::Main(int, char**, Arp::System::Commons::Diagnostics::Logging::LogLevel)
at Arp.System.Application(+0x40cbc) [0x559cc90c0cbc]
at /lib/libc.so.6(+0x2d57b) [0x7fe7ce61e57b]
at /lib/libc.so.6(__libc_start_main+0x80) [0x7fe7ce61e630]
at Arp.System.Application(+0x38625) [0x559cc90b8625]
and i do not know why this happens because i have deployed it in the default with format and information given in the how to deploy.
Hope you can help me with this.
With kind regards,
Patrick Jacobs
I’ve just tested this with AXC F 1152 FW 2023.0, and I don’t get that error. The .acf.config file in Github needs to be edited slightly for more recent FW versions, but that doesn’t explain the error you reported.
Here is the .acf.config file I used (with a .txt extension to make this Forum accept it). The only change from the one in Github is that type="OpcPlcManager::OpcPlcManagerComponent" has been changed to type="OpcPlcManager.OpcPlcManagerComponent"OpcPlcManagerLibrary.acf.config.txt
OpcPlcManagerLibrary.acf.config.txt