BhushanVamsi Posted June 21, 2008 Share Posted June 21, 2008 Hi, I am using PHP 5.2 to read data from a serial port on Windows XP. I had downloaded serial class from PHP site and used it. But it gets hanged up at readport() function. So i decided to use DOS commands instead of serial class. -----After Initialising the port i had used the following code. $read=`echo "b">COM1 & type COM1>srldata.txt`; --------------------------------------------------------------------------------------------------------- When the control comes accross to the above code it is sending signal to the port as "b" and inflating the instrument. But after reading the data from the port into file it is not coming back into the PHp code and getting hanged up ---------------------------------------------------------------------------------------------------------- In order to stop i am going to the command prompt and issuing c:\pskill cmd then the control is getting back into PHP and displaying the data stored in the file. But i want the kill code to be worked out from PHP so that no other window can be opened and by staying in PHP file itself the data to be displayed. I need help from gurus in this matter. Thanking in advance. Link to comment https://forums.phpfreaks.com/topic/111240-serial-port-communication/ Share on other sites More sharing options...
BhushanVamsi Posted June 23, 2008 Author Share Posted June 23, 2008 Please help me out in this matter as this is most urgent. Thanks Link to comment https://forums.phpfreaks.com/topic/111240-serial-port-communication/#findComment-572058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.