We are trying to set value '65534' on a Uint16 address but an exception occurred:
Uncaught ModbusTcpClient\Exception\InvalidArgumentException: value is not set or out of range (int16): 65534 in .../aldas/modbus-tcp-client/src/Packet/ModbusFunction/WriteSingleRegisterRequest.php:38
Function 6, file: src/Packet/ModbusFunction/WriteSingleRegisterRequest.php
public function validate()
{
parent::validate();
if ((null !== $this->value) && (($this->value >= Types::MIN_VALUE_INT16) && ($this->value <= Types::MAX_VALUE_INT16))) {
return;
}
throw new InvalidArgumentException("value is not set or out of range (int16): {$this->value}");
}
We are trying to set value '65534' on a Uint16 address but an exception occurred:
Uncaught ModbusTcpClient\Exception\InvalidArgumentException: value is not set or out of range (int16): 65534 in .../aldas/modbus-tcp-client/src/Packet/ModbusFunction/WriteSingleRegisterRequest.php:38
Function 6, file: src/Packet/ModbusFunction/WriteSingleRegisterRequest.php
public function validate() { parent::validate(); if ((null !== $this->value) && (($this->value >= Types::MIN_VALUE_INT16) && ($this->value <= Types::MAX_VALUE_INT16))) { return; } throw new InvalidArgumentException("value is not set or out of range (int16): {$this->value}"); }