Simulates a PLC-controlled CNC loading and unloading station with robotic handling. More...
Public Attributes | |
| float | MachineCycleTime |
| Duration in seconds for the CNC machining operation cycle. | |
| bool | OnlyMachineControll |
| If true, only machine control is handled internally while rest is controlled by external PLC. | |
| string | RobotState |
| Current state of the robot (WaitingForLoading, LoadingMachine, etc.) | |
| string | EntryState |
| Current state of the entry conveyor system. | |
| string | MachineState |
| Current state of the CNC machine (Empty, Loading, Machining, etc.) | |
| string | ExitState |
| Current state of the exit conveyor system. | |
| bool | AutomaticMode |
| True when system is in automatic operation mode. | |
| PLCInputBool | OnSwitch |
| Main power switch input signal. | |
| PLCInputBool | EmergencyButton |
| Emergency stop button input signal. | |
| PLCInputBool | AutomaticButton |
| Automatic mode selection button input. | |
| PLCOutputBool | AutomaticButtonLight |
| Light indicator for automatic mode button. | |
| PLCInputBool | RobotButton |
| Manual robot operation button input. | |
| PLCOutputBool | RobotLight |
| Light indicator for robot button. | |
| PLCInputBool | ConveyorInButton |
| Manual entry conveyor operation button input. | |
| PLCOutputBool | ConveyorInLight |
| Light indicator for entry conveyor button. | |
| PLCInputBool | ConyeyorOutButton |
| Manual exit conveyor operation button input. | |
| PLCOutputBool | ConveyorOutLight |
| Light indicator for exit conveyor button. | |
| PLCOutputBool | StartLoadingProgramm |
| Output signal to start robot loading program. | |
| PLCOutputBool | StartUnloadingProgramm |
| Output signal to start robot unloading program. | |
| PLCInputBool | LoadingProgrammIsRunning |
| Input signal indicating robot loading program is active. | |
| PLCInputBool | UnloadingProgrammIsRunning |
| Input signal indicating robot unloading program is active. | |
| PLCOutputBool | StartMachine |
| Output signal to start the CNC machine operation. | |
| PLCOutputBool | MoveToolingWheel |
| Output signal to move the tooling wheel into position. | |
| PLCOutputBool | OpenDoor |
| Output signal to open the machine door. | |
| PLCInputBool | DoorOpened |
| Input signal indicating machine door is fully opened. | |
| PLCInputBool | DoorClosed |
| Input signal indicating machine door is fully closed. | |
| PLCOutputBool | StartMachining |
| Output signal to start the machining process. | |
| PLCInputBool | IsMachining |
| Input signal indicating machining operation is in progress. | |
| PLCInputBool | MachiningFinished |
| Input signal indicating machining operation has completed. | |
| PLCOutputBool | EntryConveyorStart |
| Output signal to start the entry conveyor belt. | |
| PLCInputBool | EntrySensorOccupied |
| Input signal indicating entry sensor detects a part. | |
| PLCOutputBool | ExitConveyorStart |
| Output signal to start the exit conveyor belt. | |
| PLCInputBool | ExitSensorOccupied |
| Input signal indicating exit sensor detects a part. | |
Public Attributes inherited from realvirtual.realvirtualBehavior | |
| string | Name |
| The name of the component if it should be different from the GameObject name. | |
| ActiveOnly | Active |
| GameObject | FromTemplate |
| realvirtualController | realvirtualController |
| bool | HideNonG44Components |
| bool | SceneIsAdditive |
| bool | ForceStop |
| bool | IsNetworkOwner |
| True when this component owns its simulation (local authority). Set to false by MultiplayerWEB on remote clients. | |
Additional Inherited Members | |
Public Types inherited from realvirtual.realvirtualBehavior | |
| enum | ActiveOnly { Always , Connected , Disconnected , Never , DontChange } |
Public Member Functions inherited from realvirtual.realvirtualBehavior | |
| virtual void | OnOwnershipChanged (bool isOwner) |
| Called when network ownership changes. | |
| void | SetNetworkOwner (bool isOwner) |
| Sets IsNetworkOwner and triggers OnOwnershipChanged callback. | |
| void | PreStartSim () |
| Is called by the realvirtualController before the component is started. | |
| void | StartSim () |
| Is called by the realvirtualController to start or stop the component. | |
| void | StopSim () |
| Vector3 | DirectionToVector (DIRECTION direction) |
| Transfers the direction enumeration to a vector. | |
| DIRECTION | VectorToDirection (bool torotatoin, Vector3 vector) |
| Transfers a vector to the direction enumeration. | |
| float | GetLocalScale (Transform thetransform, DIRECTION direction) |
| List< BehaviorInterfaceConnection > | UpdateConnectionInfo () |
| List< Signal > | GetConnectedSignals () |
| void | SetVisibility (bool visibility) |
| Sets the visibility of this object including all subobjects. | |
| List< BehaviorInterfaceConnection > | GetConnections () |
| List< Signal > | GetSignals () |
| GameObject | GetChildByName (string name) |
| Gets a child by name. | |
| List< GameObject > | GetChildsByName (string name) |
| Gets all child by name. | |
| GameObject | GetChildByNameAlsoHidden (string name) |
| List< GameObject > | GetAllMeshesWithGroup (string group) |
| List< GameObject > | GetAllWithGroup (string group) |
| List< GameObject > | GetAllWithGroups (List< string > groups) |
| List< GameObject > | GetAllMeshesWithGroups (List< string > groups) |
| List< string > | GetMyGroups () |
| List< GameObject > | GetMeshesWithSameGroups () |
| List< GameObject > | GetAllWithSameGroups () |
| MeshRenderer | GetMeshRenderer () |
| Gets the mesh renderers in the childrens. | |
| void | SetCollider (bool enabled, bool includeTriggers=true) |
| sets the collider in all child objects | |
| void | ErrorMessage (string message) |
| Displays an error message. | |
| void | ChangeConnectionMode (bool isconnected) |
| void | Log (string message) |
| Logs a message. | |
| void | Log (string message, object obj) |
| Logs a message with a relation to an object. | |
| void | Warning (string message, object obj) |
| Logs a warning with a relation to an object. | |
| void | Error (string message, object obj) |
| Logs an error with a relation to an object. | |
| void | Error (string message) |
| Logs an error. | |
| GameObject | DebugPosition (string debugname, Vector3 position, Quaternion quaternation, float scale) |
| Displays a gizmo for debugging positions. | |
| void | SetFreezePosition (bool enabled) |
| Freezes all child components to the current poosition. | |
| void | SetRbConstraints (RigidbodyConstraints constraints) |
| virtual void | AwakeAlsoDeactivated () |
Static Public Member Functions inherited from realvirtual.realvirtualBehavior | |
| static bool | DirectionIsLinear (DIRECTION direction) |
| Gets back if the direction is linear or a rotation. | |
Protected Member Functions inherited from realvirtual.realvirtualBehavior | |
| bool | hidename () |
| bool | hideactiveonly () |
| virtual void | OnStopSim () |
| virtual void | OnPreStartSim () |
| virtual void | OnStartSim () |
| MU | GetTopOfMu (GameObject obj) |
| Gets the top of an MU component (the first MU script going up in the hierarchy) | |
| void | InitGame4Automation () |
| Initialiates the components and gets the reference to the realvirtualController in the scene. | |
| virtual void | AfterAwake () |
| void | Awake () |
Detailed Description
Simulates a PLC-controlled CNC loading and unloading station with robotic handling.
This component demonstrates a complete industrial automation cycle including material handling, CNC machining, and robotic load/unload operations. It simulates the PLC logic for coordinating between entry conveyor, robot, CNC machine, and exit conveyor systems.
Key Features:
- Automatic and manual operation modes with emergency stop functionality
- State machine control for robot, conveyor, and CNC operations
- Configurable machine cycle times and operation parameters
- Safety interlocks and proper door control sequences
- Physics-based timing that respects Unity's Time.timeScale
Common Applications:
- Virtual commissioning of CNC loading systems
- Training operators on automated machine tending
- Testing PLC logic before deployment
- Demonstration of industrial automation workflows
Integration Points:
- Works with PLCInputBool and PLCOutputBool signals for PLC integration
- Can operate standalone or with external PLC control
- Compatible with robot programming interfaces
- Supports emergency stop and safety systems
For detailed documentation see: https://doc.realvirtual.io/demos/cnc-loading
Member Data Documentation
◆ AutomaticButton
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.AutomaticButton |
Automatic mode selection button input.
◆ AutomaticButtonLight
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.AutomaticButtonLight |
Light indicator for automatic mode button.
◆ AutomaticMode
| bool realvirtual.PLCDemoCNCLoadUnload.AutomaticMode |
True when system is in automatic operation mode.
◆ ConveyorInButton
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.ConveyorInButton |
Manual entry conveyor operation button input.
◆ ConveyorInLight
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.ConveyorInLight |
Light indicator for entry conveyor button.
◆ ConveyorOutLight
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.ConveyorOutLight |
Light indicator for exit conveyor button.
◆ ConyeyorOutButton
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.ConyeyorOutButton |
Manual exit conveyor operation button input.
◆ DoorClosed
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.DoorClosed |
Input signal indicating machine door is fully closed.
◆ DoorOpened
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.DoorOpened |
Input signal indicating machine door is fully opened.
◆ EmergencyButton
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.EmergencyButton |
Emergency stop button input signal.
◆ EntryConveyorStart
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.EntryConveyorStart |
Output signal to start the entry conveyor belt.
◆ EntrySensorOccupied
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.EntrySensorOccupied |
Input signal indicating entry sensor detects a part.
◆ EntryState
| string realvirtual.PLCDemoCNCLoadUnload.EntryState |
Current state of the entry conveyor system.
◆ ExitConveyorStart
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.ExitConveyorStart |
Output signal to start the exit conveyor belt.
◆ ExitSensorOccupied
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.ExitSensorOccupied |
Input signal indicating exit sensor detects a part.
◆ ExitState
| string realvirtual.PLCDemoCNCLoadUnload.ExitState |
Current state of the exit conveyor system.
◆ IsMachining
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.IsMachining |
Input signal indicating machining operation is in progress.
◆ LoadingProgrammIsRunning
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.LoadingProgrammIsRunning |
Input signal indicating robot loading program is active.
◆ MachineCycleTime
| float realvirtual.PLCDemoCNCLoadUnload.MachineCycleTime |
Duration in seconds for the CNC machining operation cycle.
◆ MachineState
| string realvirtual.PLCDemoCNCLoadUnload.MachineState |
Current state of the CNC machine (Empty, Loading, Machining, etc.)
◆ MachiningFinished
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.MachiningFinished |
Input signal indicating machining operation has completed.
◆ MoveToolingWheel
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.MoveToolingWheel |
Output signal to move the tooling wheel into position.
◆ OnlyMachineControll
| bool realvirtual.PLCDemoCNCLoadUnload.OnlyMachineControll |
If true, only machine control is handled internally while rest is controlled by external PLC.
◆ OnSwitch
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.OnSwitch |
Main power switch input signal.
◆ OpenDoor
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.OpenDoor |
Output signal to open the machine door.
◆ RobotButton
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.RobotButton |
Manual robot operation button input.
◆ RobotLight
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.RobotLight |
Light indicator for robot button.
◆ RobotState
| string realvirtual.PLCDemoCNCLoadUnload.RobotState |
Current state of the robot (WaitingForLoading, LoadingMachine, etc.)
◆ StartLoadingProgramm
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.StartLoadingProgramm |
Output signal to start robot loading program.
◆ StartMachine
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.StartMachine |
Output signal to start the CNC machine operation.
◆ StartMachining
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.StartMachining |
Output signal to start the machining process.
◆ StartUnloadingProgramm
| PLCOutputBool realvirtual.PLCDemoCNCLoadUnload.StartUnloadingProgramm |
Output signal to start robot unloading program.
◆ UnloadingProgrammIsRunning
| PLCInputBool realvirtual.PLCDemoCNCLoadUnload.UnloadingProgrammIsRunning |
Input signal indicating robot unloading program is active.
Public Attributes inherited from