aldas / modbus-tcp-client

PHP client for Modbus TCP and Modbus RTU over TCP (can be used for serial)
Apache License 2.0
191 stars 55 forks source link

Call to undefined function ModbusTcpClient\Network\mb_strtolower() #109

Closed Elmatbaisaad closed 2 years ago

Elmatbaisaad commented 2 years ago

require DIR . '/../vendor/autoload.php';

$ip = 'tcp://127.0.0.1:12345'; $unitID = 0; $fc3 = ReadRegistersBuilder::newReadHoldingRegisters($ip,$unitID) ->int16(0,'Register:') ->build(); $reponseContainer = (new NonBlockingClient(['readTimeoutSec' => 0.2]))->sendRequests($fc3); print_r($reponseContainer->getData()); print_r($reponseContainer->getErrors());

aldas commented 2 years ago

You need to have PHP mbstring extension installed