error dialog when timeout occurs
1 view (last 30 days)
Show older comments
hi
In my GUI application, its a single channel acquisition from serial port of a instrument using NI daq card in this way..
fopen(s); %%% open the serial port oject
start(ai); %%analog input object. wait(ai,10); %%%wait for 10 second for data to acquire..
data=getdata(ai,2000); %%no. of samples to acquire 2000 stop(ai);
fclose(s); %%%close the serial port object s delete (s); clear (ai) delete(ai)
I want to create a error dialog when timeout occurs i.e. signal doesn't come within the wait time(10 seconds). and it sould close the serial port and clear the ai object for the next acquisition.
how can I do this.. please help me.
Thank You.
2 Comments
Answers (0)
See Also
Categories
Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!