We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59349bf commit 740bdfbCopy full SHA for 740bdfb
src/main/kotlin/PlcSimulation.kt
@@ -97,14 +97,12 @@ class PlcSimulation(
97
println("ERROR: Add Operation - Unable to get value of ${element.symbol} address ${variable.address} ")
98
throw CancellationException("Error - Add")
99
}
100
- //Int16 VALIDATED!
101
var intValue = element.value.toInt()
102
intValue += currentValue.first().toInt()
103
setHoldingRegisterInt16(memory, variable, intValue.toShort())
104
105
106
AddressType.INPUT_REGISTER -> {
107
- //TODO NOT TESTED, NOT VALIDATED!!
108
val currentValue = memory.readInputRegister(variable.address.toInt(), 1)
109
val newValue = currentValue.first() + element.value.toShort()
110
memory.setInputRegister(variable.address.toInt(),newValue.toShort())
0 commit comments