Fcmcua Workbench: Virtual Commissioning using OPC UA

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
heissgetraenk
Posts: 1
Joined: Sat Jan 14, 2023 2:47 pm
Contact:

Fcmcua Workbench: Virtual Commissioning using OPC UA

Post by heissgetraenk »

Hello everyone,

I have been working on a workbench to link an OPC UA server to an Assembly4 model:
https://github.com/heissgetraenk/fcmcua

The workbench works by updating the Attachment Offsets of the assembly's Local Coordinate Systems to match the target position values provided by the OPC UA server.

The idea is to visualize PLC motion control code on a mock-up of a target machine before testing it on the real hardware. This is especially useful if you want to program the PLC before the physical machine is fully built or even fully designed. Many modern PLCs posses OPC UA servers that can be activated to read data from the controller. Configure the OPC UA server, connect the FreeCAD assembly to your PLC (or its digital twin/simulation) and take a look at what the PLC code is doing, even without access to a physical prototype of the target machine.

You can also write your own OPC server and use it to manipulate a model, which is what I have done for the demo project featured on the github repo.

Please let me know if you encounter any bugs or have a feature you think would be cool to have in this workbench. Any feedback is welcome!
dtay
Posts: 20
Joined: Fri Jan 17, 2020 12:52 pm

Re: Fcmcua Workbench: Virtual Commissioning using OPC UA

Post by dtay »

This looks amazing! It would be really cool to see some collaboration from the Path workbench on this.

Thank you for sharing your work.
dtay
Posts: 20
Joined: Fri Jan 17, 2020 12:52 pm

Re: Fcmcua Workbench: Virtual Commissioning using OPC UA

Post by dtay »

To anyone wanting to test this, I needed to resolve the dependency for "asyncua".

From freecadcmd.exe I was able to install this module. Albeit with a some warnings.

Code: Select all

import pip
pip.main(["install", "asyncua"])
#and
pip.main(["install", "aioconsole"])
FWIW running the weekly build "FreeCAD_weekly-builds-31695-2023-01-26-conda-Windows-x86_64-py310". I am having trouble getting the server running.
Post Reply