Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting data from BN device #15

Open
bistory opened this issue Aug 16, 2018 · 1 comment
Open

Not getting data from BN device #15

bistory opened this issue Aug 16, 2018 · 1 comment

Comments

@bistory
Copy link

bistory commented Aug 16, 2018

Hi,

I have 2 devices from EpSolar :

  • Tracer1210A
  • Tracer2215BN

The first returns its data, the second fails that way :

Info Data
----------------------------------
00 Manufacturer: EPsolar Tech co., Ltd
01 Model: Tracer2215BN
02 Version: V02.05+V07.12

int(0)
Cannot get Rated Data
Cannot get RealTime Data
Cannot get Statistical Data
Cannot get Settings Data
Cannot get Coil Data
Cannot get Discrete Data

Do you have an idea where it could come from ?

Thanks :-)

@ydniw
Copy link

ydniw commented May 25, 2019

Hi,
For others who share the same issue, I got mine working. The default wait reply for serial is 0.1 sec, I guess this is too fast for result to properly (crc'd properly) produce crc16.
I tweak the serial send message to 0.5 sec, and it works!

Open PhpSerialModbus.php, there are two sendMessage() you need to change the wait delay, change to 0.5sec, in sendRawQuery()

public function sendRawQuery ($string, $response = true) {
		$this->serial->sendMessage($string, 0.5);
		...		
	}

and in sendQuery()

public function sendQuery ($slaveId, $functionCode, $registerAddress, $regCountOrData, $response = true)
	{ ...
		// Send over serial port
		$this->serial->sendMessage($queryString, 0.5);
          ...
	}

Hope this help! Tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants