02-16-2014 03:09 PM
i make a program which read data from serial port . when i press on the " stop " button the program dosent stop.
how can i solve this problem ?
02-16-2014 04:21 PM
02-16-2014 04:28 PM - edited 02-16-2014 04:33 PM
i divide the program to two photo....my program read RFID card from serial porthttp://www.mikroelectron.com/index.php?route=product/product&product_id=237&search=rfid
02-16-2014 04:48 PM
It is very difficult to troubleshoot an image and twice as hard to troubleshoot two images. Please post your VI.
What happens in the cases not shown?
My first guess would be that your serial port is waiting for a termination character or the 13th character. It is almost always better to configure the port and close the port outside the loop and only have the reads inside.
Infinite timeout (or whatever value is coerced to fit a U32) will have to expire before the loop completes its execution and stops. Also, the stop button is probably read immediately after the loop iteration starts, so the stop =True will not be read until the next iteration. So the time to stop is approximately 2*infinity if the VISA Read does not complete normally. Actually the largest possible timeout value is about 49 days, so your loop may stop somewhere near the end of May.
Lynn
02-16-2014 05:05 PM - edited 02-16-2014 05:06 PM
this is my program
02-16-2014 05:07 PM
02-16-2014 05:17 PM
i want this program work for long time because i put " open serial port " in the loop
....the close of serial port is found in my program
02-16-2014 05:22 PM
02-16-2014 05:31 PM
how can i make my program run for 24 hours
02-16-2014 05:48 PM