PHP COM -Portverbindung mit DIOPhp

PHP-Programmierer chatten hier
Anonymous
 PHP COM -Portverbindung mit DIO

Post by Anonymous »

Ich versuche, die Gewichtungsmaschine mit PHP zu verbinden.

Ich habe mit hyperterminal getestet, dass es gut funktioniert. /> fopen Beispiel < /h3>

exec('mode com2: BAUD=2400 PARITY=N data=8 stop=1 xon=on');

$fp = fopen("COM2:", "r");
if (!$fp) {
echo "Uh-oh. Port not opened.";
} else {
echo fgets($fp);
fclose($fp);
}
< /code>

DIO Beispiel < /h3>

exec('mode COM2: baud=2400 data=8 stop=1 parity=n xon=off to=on');
$fd = dio_open('COM2:', O_RDONLY | O_NONBLOCK, 0644);
echo dio_read($fd, 256);
< /code>

Ich kann meine Versuche in beide Richtungen nicht nützliche Ausgaben sammeln.>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post