Ran Posted November 1, 2016 Share Posted November 1, 2016 Hi, I am currently using a serial based barcode scanner connected to the computer through a serial to USB cable. The COM # is setup correctly on the computer but from time to time DAQFactory seems to fail to read the port. Nothing shows on the Comm Monitor. The other still functions normally. This can be fixed by rebooting the computer or sometimes closing and opening the software. Any idea? Below is the code put in On Recieve: if (strIn == chr(13)) private string DataIn = ReadUntil(13) strTemp = DataIn beginseq(reset_strTemp) endif //reset_strTemp is to reset the variable back to 0 after 10 seconds. Ran Link to comment Share on other sites More sharing options...
AzeoTech Posted November 2, 2016 Share Posted November 2, 2016 Yeah, I'm not a fan of USB to serial converters (which is what is inside the barcode scanner). I'd rather have a true serial scanner and a real serial port, or an Ethernet to serial converter. But, that is not always the option. You probably just need to reset the port. Just do: device.mydevice.initcomm() Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.