CNC Machine simulation OPC UA server
This program simulates a CNC machine that sends data to the portal. The CNC Simulation creates an OPC UA address space. You can connect to it via e.g. UaExpert. In order to use the program, proceed as follows:
1. Start the precompiled executable in a Java runtime environment. Typically, the command for this will look like java -jar cnc.jar
2. The program offers the following user interface, displaying sets (“main program”) of CNC jobs (“program”), which can be started and stopped:
3. By clicking on „Main Program“, it is possible to cycle through the main programs defined in cncSimulation.properties as “main”. In the picture above, the main program is currently “A320LavatoryJob”.
4. By clicking on „Program“, it is possible to cycle through the main programs defined in cncSimulation.properties as “program”. In the picture above, the main program is currently “Front”. Whenever the main program is changed, the program is set to the first entry in cncSimulation.properties.
5. “Run/Stop” controls the status of the program and main program. Whenever the program or main program changes, the “Run/Stop” state is set to “Canceled”. By clicking on “Run/Stop”, it changes to “Running”. Subsequent clicks allow to cycle through “Running” and “Stopped”. This can be summarized by the following state machine (labeled arrows indicate clicks on the respective buttons):
The current state of the main program, program, and production are reflected by a local OPC UA server, which makes use of an appropriate object type from the OPC UA for CNC Systems Companion Specification:
“ActMainProgramName”, “ActProgramName”, and “ActProgramStatus” are nodes of type String that contain the main program, program, and program status. The OPC UA server can be accessed on port 4840 by default.
6. The CNC Simulation can be configured cncSimulation.properties via the following entries:
-
main: An array of the main program names.
-
program: An array of the program names.
-
discovery: The URI of a local OPC UA Discovery Server, where the server shall register itself.
-
publicIPs: An array of endpoints that the OPC UA server shall expose.
-
port: The port number that the OPC UA server shall listen on.
-
name: The server endpoint name – the client has to append this string at the end of the OPC UA server URI (after a '/').