You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
record (opcuaItem,"CBS:IN-OPCUA-STRUCT"){
field(INP, "@PLC0 ns=3;s=\"SimInputs\".\"Inputs\".\"P101\" monitor=n")
field(DEFACTN, "write")
field(WOC, "immediate")
}
record (ao,"CBS:VAR1"){
field(DTYP, "OPCUA")
field(OUT, "@CBS:IN-OPCUA-STRUCT element=PG1.variable1 monitor=n")
}
record (ao,"CBS:VAR2"){
field(DTYP, "OPCUA")
field(OUT, "@CBS:IN-OPCUA-STRUCT element=PG1.variable2 monitor=n")
}
With the following initial setup, this is what occurs:
CBS:VAR1=0 #in IOC
CBS:VAR2=0 #in IOC
PG1.variable1=0 #in PLC
PG1.variable2=0 #in PLC
$caput CBS:VAR1 1 #old value=0; new value=1
CBS:VAR1=1 #in IOC
CBS:VAR2=0 #in IOC
PG1.variable1=1 #in PLC
PG1.variable2=0 #in PLC
$caput CBS:VAR2 2 #old value=0; new value=2
CBS:VAR1=1 #in IOC
CBS:VAR2=2 #in IOC
PG1.variable1=0 #in PLC, value reverted back!!
PG1.variable2=2 #in PLC
$caput CBS:VAR1 1 #old value=1; new value=1
CBS:VAR1=1 #in IOC
CBS:VAR2=2 #in IOC
PG1.variable1=1 #in PLC
PG1.variable2=0 #in PLC, value reverted back!!
Whenever I write a new value to a variable, the other variables get reset to their previous value on the PLC. This happens with more than 2 variables too, if I write to a third variable, the other two will also get reset back to 0.
The text was updated successfully, but these errors were encountered:
Reported by Mikel Rojo:
I have this db:
With the following initial setup, this is what occurs:
CBS:VAR1=0 #in IOC
CBS:VAR2=0 #in IOC
PG1.variable1=0 #in PLC
PG1.variable2=0 #in PLC
$caput CBS:VAR1 1 #old value=0; new value=1
CBS:VAR1=1 #in IOC
CBS:VAR2=0 #in IOC
PG1.variable1=1 #in PLC
PG1.variable2=0 #in PLC
$caput CBS:VAR2 2 #old value=0; new value=2
CBS:VAR1=1 #in IOC
CBS:VAR2=2 #in IOC
PG1.variable1=0 #in PLC, value reverted back!!
PG1.variable2=2 #in PLC
$caput CBS:VAR1 1 #old value=1; new value=1
CBS:VAR1=1 #in IOC
CBS:VAR2=2 #in IOC
PG1.variable1=1 #in PLC
PG1.variable2=0 #in PLC, value reverted back!!
Whenever I write a new value to a variable, the other variables get reset to their previous value on the PLC. This happens with more than 2 variables too, if I write to a third variable, the other two will also get reset back to 0.
The text was updated successfully, but these errors were encountered: