PLC Boolean Output Signal - Represents a boolean output signal from simulation to PLC. More...

Public Member Functions | |
override void | OnToggleHierarchy () |
Virtual for toogle in hierarhy view. | |
override void | SetStatusConnected (bool status) |
Virtual for setting the Status to connected. | |
override bool | GetStatusConnected () |
Virtual for getting the connected Status. | |
override string | GetVisuText () |
Virtual for getting the text for the Hierarchy View. | |
override byte[] | GetByteValue () |
override int | GetByteSize () |
override void | SetValue (string value) |
Virtual for setting the value. | |
override void | SetValue (object value) |
Sets the value of the signal. | |
override object | GetValue () |
Gets the value of the signal. | |
void | SetValue (bool value) |
override void | SetValue (byte[] value) |
void | FixedUpdate () |
![]() | |
delegate void | OnSignalChangedDelegate (Signal obj) |
void | OnInspectValueChanged () |
bool | OnObjectDrop (Object reference) |
void | OnInspectedToggleChanged (bool arg0) |
string | GetSignalName () |
virtual bool | IsInput () |
Virtual for getting information if the signal is an Input. | |
void | Unforce () |
Unforces the signal. | |
void | DeleteSignalConnectionInfos () |
void | AddSignalConnectionInfo (GameObject behavior, string connectionname) |
bool | IsConnectedToBehavior () |
Returns true if InterfaceSignal is connected to any Behavior Script. | |
string | GetTypeString () |
Returns the type of the Signal as a String. | |
InterfaceSignal | GetInterfaceSignal () |
Returns an InterfaceSignal Object based on the Signal Component. | |
![]() | |
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) |
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 warinng 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 () |
Public Attributes | |
StatusBool | Status |
bool | ChangedToTrue |
bool | ChangedToFalse |
![]() | |
string | Comment |
string | OriginDataType |
SettingsSignal | Settings |
SignalEvent | EventSignalChanged |
bool | Autoconnected |
bool | UpdateEnable |
List< Connection > | ConnectionInfo |
InterfaceSignal | interfacesignal |
![]() | |
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 |
Properties | |
bool | Value [get, set] |
Additional Inherited Members | |
![]() | |
enum | ActiveOnly { Always , Connected , Disconnected , Never , DontChange } |
![]() | |
static bool | DirectionIsLinear (DIRECTION direction) |
Gets back if the direction is linear or a rotation. | |
![]() | |
void | SignalChangedEvent (Signal signal) |
new bool | hidename () |
![]() | |
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 () |
![]() | |
string | Visutext |
![]() | |
OnSignalChangedDelegate | SignalChanged |
Detailed Description
PLC Boolean Output Signal - Represents a boolean output signal from simulation to PLC.
PLCOutputBool is a core signal type for sending boolean (true/false) data from the Unity simulation environment to external PLC systems. This component acts as a digital output point that simulation components can write to, providing feedback and status information to PLC control programs.
Key Features:
- Sends boolean values to connected PLC systems through various industrial protocols
- Provides real-time value updates with automatic change detection
- Supports edge detection for state transitions within the simulation
- Includes override functionality for testing and manual control
- Tracks connection status for reliable communication monitoring
Signal Direction: Simulation → PLC (Output from PLC perspective) The signal flows from Unity simulation to the PLC controller, enabling the simulation to provide feedback about component states, sensor readings, and operation status to PLC programs.
Common Applications:
- Sending simulated sensor states to PLC (photoelectric sensors, limit switches)
- Providing component status feedback (motor running, valve open/closed)
- Signaling operation completion or error states
- Implementing virtual buttons and switches for HMI functionality
- Transmitting safety-relevant information like emergency stop acknowledgment
Interface Integration: PLCOutputBool supports all major industrial communication protocols:
- OPC UA: Writes to OPC UA boolean nodes with configurable update rates
- S7 TCP/IP: Direct writing to Siemens S7 PLC data blocks
- Modbus TCP/RTU: Updates Modbus coil or holding registers
- TwinCAT ADS: Writes to Beckhoff TwinCAT boolean variables
- MQTT: Publishes to MQTT topics for cloud and IoT connectivity
- Shared Memory: Provides high-performance local data exchange
Update Mechanism: The component monitors value changes in FixedUpdate() for physics-synchronized updates. When values change, the EventSignalChanged event notifies all connected interfaces to transmit the new state to the PLC. This ensures minimal latency between simulation state changes and PLC program reactions, critical for real-time control applications.
Virtual Commissioning: In virtual commissioning scenarios, PLCOutputBool signals replace physical sensors and actuator feedback, allowing complete PLC program testing without hardware. The override feature enables manual manipulation of signals for comprehensive test coverage.
Member Function Documentation
◆ GetByteSize()
|
virtual |
Reimplemented from realvirtual.Signal.
◆ GetByteValue()
|
virtual |
Reimplemented from realvirtual.Signal.
◆ GetStatusConnected()
|
virtual |
Virtual for getting the connected Status.
Reimplemented from realvirtual.Signal.
◆ GetValue()
|
virtual |
Gets the value of the signal.
Reimplemented from realvirtual.Signal.
◆ GetVisuText()
|
virtual |
Virtual for getting the text for the Hierarchy View.
Reimplemented from realvirtual.Signal.
◆ OnToggleHierarchy()
|
virtual |
Virtual for toogle in hierarhy view.
Reimplemented from realvirtual.Signal.
◆ SetStatusConnected()
|
virtual |
Virtual for setting the Status to connected.
Reimplemented from realvirtual.Signal.
◆ SetValue() [1/3]
|
virtual |
Reimplemented from realvirtual.Signal.
◆ SetValue() [2/3]
|
virtual |
Sets the value of the signal.
Reimplemented from realvirtual.Signal.
◆ SetValue() [3/3]
|
virtual |
Virtual for setting the value.
Reimplemented from realvirtual.Signal.