0
Not a bug

Override values (Unity to PLC) does not work as expected

Gonçalo Nascimento 3 months ago in realvirtual.io Community updated by Support 2 months ago 2

Greetings.

I am using S7 TCP/IP connection on a Unity project and I am physically connected to an S7-1200.

I am using various PLC Inputs and Outputs (created automatically from the .sdf file).

The PLC outputs are being read correctly on Unity, but when I force (overrite) a BOOL input value, the PLC detects the change but does not hold the new value. For example, I can see on the TIA Portal monitor window that the value is FALSE. I press write to True on Unity but the monitor on TIA Portal still shows False, although it did acknowledge the pulse (mabye it was a very short pulse)? Is this the way writing to PLC inputs works? By pulses? Because I would like to change a boolean (or any other type) value and hold that state for long periods of time.

These are my settings for the S7 Interface

Image 1101

And this is an example of a PLC Input component (Is it normal that the component is deactivated during runtime??):

Image 1103


This is the correspondent GameObject during runtime:

Image 1102

Thanks for your time!

Answer

Answer
Under review

Hi, the deactivated components are in this case correct. We want to prevent the signal update method, which is not needed in this case. Are you maybe writing on PLC inputs which are also available in hardware. In this case you can't force or even set it from realvirtual because the real physical input value can't be changed.

Answer
Under review

Hi, the deactivated components are in this case correct. We want to prevent the signal update method, which is not needed in this case. Are you maybe writing on PLC inputs which are also available in hardware. In this case you can't force or even set it from realvirtual because the real physical input value can't be changed.