Your comments

Set it to "Read-Only (RD)" mode in the OPC UA Server Interface, and then it can be normally read as an input signal for Unity,sorry for my question

Okay, I understand that in Siemens PLCs the Input area (I) is normally read-only and should not be written from outside.

However, when I use PLCSIM Advanced together with Sharp7 (via realvirtual/Game4Automation), I sometimes see that I can temporarily write to Inputs from Unity — for example, the value switches to "True" for a short time before being overwritten again.

My questions are:

  1. Is this behavior officially supported in PLCSIM Advanced, or is it just a side-effect of the simulation?

  2. For stable and portable setups (especially when later connecting to a real PLC), should I always use M or DB addresses instead of I?

  3. If the recommended way is M/DB, is there any official guideline or example for this workflow in digital twin applications?

Thanks for your help in clarifying this, I just want to make sure I’m following the correct and future-proof method.

Hi, I have another question. Why is it that when I try to configure my signals like in the Game4Automation tutorial, after connecting to TIA Portal and starting the virtual simulation, the values sometimes aren't written properly? They switch signals briefly—like when I select "Value" and "Value Override" in Unity, the PLC only shows "True" for a moment before switching back to "False". But when I switched signals yesterday, it worked normally; today it’s back to this issue. I'm using InputBool, by the way. Sorry for asking so many questions.

My setup is Unity (realvirtual.io) connected to PLCSIM Advanced.
I can change the Input area (I) from Unity, and the change is visible in TIA Portal.
However, the Output (Q) does not change automatically.
I have learned that in Siemens PLCs, an Input does not directly modify an Output unless the program in TIA Portal explicitly contains this logic.
So if I want an Input signal to drive an Output, I need to add logic in TIA Portal, for example:

A I0.0  
= Q0.0

Without this kind of logic, simply changing an Input will never make the Output change.
Could you please confirm if my understanding is correct: that linking Inputs to Outputs always requires explicit logic inside the PLC program?

By the way, I have a few more questions. When I connect via Advanced, when PLCInputBools modifies PLCOutputBool, there is a switch in Unity, but the signal does not switch. Moreover, in TIA Portal, the signal sometimes switches to true and then switches back to false. Could you help me figure out the reason for this? 

Okay, thank you for your reply. I just got confused for a moment.

As you can see, I'm having an issue with the S7 interface. When I run my PLC on S7-PLCSIM Advanced, modifying this value allows it to be mapped into Unity. However, when I try to toggle the value in Unity, it cannot retain it—it switches briefly but immediately reverts back. The value is false by default; after clicking to toggle it, it briefly shows true but then goes back to false. Why is this happening? Modifying the value in the TIA Portal monitor table works fine, as it can be mapped into Unity and toggled normally. The option "Allow PUT/GET communication access from remote objects" is checked, and both "Full access rights" and "Compile simulation support blocks" are also checked. The TIA Portal settings seem to be correct; the only problem is that Unity cannot toggle the value in TIA Portal V20. The versions I'm using are realvirtual.io 6.2.1 and TIA Portal V20.