Ask our Experts
Didn't find what you are looking for? Ask our experts!
Share Your Feedback – Help Us Improve Search on Community! Please take a few minutes to participate in our Search Feedback Survey. Your insights will help us deliver the results you need faster and more accurately. Click here to take the survey
Support forum for Machine and Motion Control solutions, including Lexium MC12 and robotics, PacDrive, Modicon PLCs and I/Os, EcoStruxure Machine Expert Twin, … - from design, implementation to troubleshooting and more, by Schneider Electric
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-07-09 09:21 AM . Last Modified: 2025-07-10 07:11 AM
Hi!
TLDR;
How can I have an BOOL variable that is read/write in both modbus TCP server and from OPC UA at the same time?
Since the OPCUASymbolConfiguration forbids %QX addressed variables being in the list I can not use the build in modbus TCP server which uses %QX for modbus coils. I switched to using FB_ModbusTcpServer instead only to discover it can't use port 502 even when built in modbus TCP server is removed from the interface 😞
But anyway I changed my BOOLs to %MX.n addressing and added my array of BOOLs to the FBs coils pin and went back to the OPCUASymbolConfiguration only to discover that variables that has an %MX address is not allowed either 😞
So how should I do it then? It seems like an impossible combination. Since I want read/write access from both ways I can't just simply make a second variable and assign it the value of another since it would be a one way assignment. I also tried using VAR_CONFIG which then makes the address syntax %Q* or %M* in my main variable list and that fools OPCUASymbolConfiguration to allow it and then I add the complete %MX.n address of it in the VAR_CONFIG list. This semi works, I can toggle the BOOL from modbus but the OPC UA symbol seems to be read only. It displays symbol status but nothing happens when I toogle it 😞
Kind regards
David
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.