PHP code example of erikwang2013 / industrial-protocols-hart-ip
1. Go to this page and download the library: Download erikwang2013/industrial-protocols-hart-ip library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
erikwang2013 / industrial-protocols-hart-ip example snippets
$conn = $kernel->getConnectionManager()->connect('hart-ip-gw');
$conn->read('pv'); // 主变量
$conn->read('loop_current'); // 回路电流
'devices' => [
'hart-ip-gw' => [
'protocol' => 'hart-ip',
'host' => '192.168.1.150', 'port' => 5094,
'timeout' => 5000,
],
],