I've been trying to create a small program using a WebSocket to control 3 PES-2401 relay boards with the PHPoC blue and having issues.
Everything runs fine for a few seconds or even minutes and then it errors.
Output:
spc_request: set 0 output low - 1/4 slave timeout
spc_request: set 1 output low - 1/4 slave timeout
spc_request: set 2 output low - 1/4 slave timeout
spc_request: set 3 output low - 1/4 slave timeout
spc_request: set 2 output high - 1/4 slave timeout
Log:
[0116:16:17:25.922] php: run next relay_control.php
[0116:16:17:25.973] spc: start reset T1
[0116:16:17:25.980] spc: start reset T2
[0116:16:17:26.480] spc: reset completed
[0116:16:17:26.480] spc: start sync T1
[0116:16:17:26.484] spc: start sync T2
[0116:16:17:26.582] spc: restart sync T2 <== This doesn't look right
[0116:16:17:26.684] spc: restart sync T2 <==
[0116:16:17:32.492] php start index.php RUN
[0116:16:17:32.637] http_ws: http13 80 192.168.0.52 /relay csv.phpoc
The initial setup in PHP is:
<?php
if(_SERVER("REQUEST_METHOD"))
exit; // avoid php execution via http request
include "/lib/sd_340.php";
include "/lib/sn_tcp_ws.php";
include "/lib/sd_spc.php";
spc_reset();
spc_sync_baud();
$sid_one = 1;
$sid_two = 2;
$sid_three = 3;
When the error occurs the STS LED on the board stops blinking. I've tried swapping the boards around in the event I got a bad one but they all seem to do the same even with only two boards installed. Does anyone have any ideas? I initially thought wireless strength might be the issue but the signal is good and it looks like the PHPoC blue just stops talking to one or more of the relay boards since the STS LED goes dark.
Thank you,
Dave
Everything runs fine for a few seconds or even minutes and then it errors.
Output:
spc_request: set 0 output low - 1/4 slave timeout
spc_request: set 1 output low - 1/4 slave timeout
spc_request: set 2 output low - 1/4 slave timeout
spc_request: set 3 output low - 1/4 slave timeout
spc_request: set 2 output high - 1/4 slave timeout
Log:
[0116:16:17:25.922] php: run next relay_control.php
[0116:16:17:25.973] spc: start reset T1
[0116:16:17:25.980] spc: start reset T2
[0116:16:17:26.480] spc: reset completed
[0116:16:17:26.480] spc: start sync T1
[0116:16:17:26.484] spc: start sync T2
[0116:16:17:26.582] spc: restart sync T2 <== This doesn't look right
[0116:16:17:26.684] spc: restart sync T2 <==
[0116:16:17:32.492] php start index.php RUN
[0116:16:17:32.637] http_ws: http13 80 192.168.0.52 /relay csv.phpoc
The initial setup in PHP is:
<?php
if(_SERVER("REQUEST_METHOD"))
exit; // avoid php execution via http request
include "/lib/sd_340.php";
include "/lib/sn_tcp_ws.php";
include "/lib/sd_spc.php";
spc_reset();
spc_sync_baud();
$sid_one = 1;
$sid_two = 2;
$sid_three = 3;
When the error occurs the STS LED on the board stops blinking. I've tried swapping the boards around in the event I got a bad one but they all seem to do the same even with only two boards installed. Does anyone have any ideas? I initially thought wireless strength might be the issue but the signal is good and it looks like the PHPoC blue just stops talking to one or more of the relay boards since the STS LED goes dark.
Thank you,
Dave
Comment