Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6211 - Getting Error 50103 when attempting to use two counter method

Hi Craig,

It could be possible that when you receive that timeout error your task is being stopped. Are you performing any sort of error handling that would clear the error?

I am unsure of how you might perform this in Agilent VEE, but in LabVIEW what you could do is perform a time elapsed function which you could then compare to your timeout value. You could then use a case structure (an If else statement), where if the time elapsed is greater than or equal to the timeout value, the frequency output is 0 Hz and you use the Clear Errors function on the error cluster line. Else, if the time hasn’t elapsed and a reading was returned before a timeout, the frequency output is passed through without issue and so is the error line. I attached screenshots of what this might look like in LabVIEW to illustrate my meaning. I think this is what Kevin P meant in his linked post when he said that you’d have to catch the error out cluster and then erase the error.

I hope this explanation helps, Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
Download All
0 Kudos
Message 11 of 12
(1,183 Views)

Mallori,

Thanks for you help.  Yes, I think some sort of error recovery is necessary and I'm not sure what can be done in VEE.

(Agilent VEE was not my choice and we are too far down the path to change now.)

I think I've worked out a different solution.  My new method is to change back to "infininte" (-1) for the timeout time

and to simply not allow the counter to run unless I know there are pulses coming in.  It's not perfect but I think it will be

OK for this situation.  I have worked out the basic code and it seems to be working OK. 

Thanks for your help.

-Craig

0 Kudos
Message 12 of 12
(1,176 Views)