01-02-2014 04:25 AM
Hi.
I have a VI which records 4 frequency channels for an NI9411 and outputs an anologue 0-5V channel. This works great apart from when there is no frequency siganl present.
When my rig is first powered up there are no frequency signals present and after about 10 seconds I get the attached error message.
Is it possible to modify the Vi (attached) so I do not get this error in the future? I can not guarantee that there will always be a frequency signal present.
Solved! Go to Solution.
01-02-2014 04:46 AM
You can put the timeout on -1 that way it will wait for ever.
01-02-2014 05:06 AM
Since I don't have LV2013 I can't open the file.
You can check for the samples availablility and then read the signal instead of configuring defined timeout (10sec should be good enough then).
01-02-2014 05:54 AM
Thanks Koen.
I am still very new to this VI game, can you please explain how to adjust the timeout value.
Richard.
01-02-2014 06:23 AM
I am unable to open your vi.
Though the easiest way is to look at the help from DAQmx Read.
But just create a constant for the timeout input.
01-02-2014 07:36 AM
@r.youden wrote:
Thanks Koen.
I am still very new to this VI game, can you please explain how to adjust the timeout value.
Richard.
How new are you to this VI game? Perhaps you haven't taken a class from NI (or one of their associates) or worked through the tutorials available free on the Web? If not, the tutorials listed below are good ones to start with (there are also several others out there).
Cameron
01-02-2014 11:04 AM - edited 01-02-2014 11:05 AM
@r.youden wrote:
Hi.
I have a VI which records 4 frequency channels for an NI9411 and outputs an anologue 0-5V channel. This works great apart from when there is no frequency siganl present.
When my rig is first powered up there are no frequency signals present and after about 10 seconds I get the attached error message. -200284
Is it possible to modify the Vi (attached) so I do not get this error in the future? I can not guarantee that there will always be a frequency signal present.
Since you know error -200284 means signal not present IN THIS CASE. handle the error! If error in -200284 then error out =F and set freq to 0
01-02-2014 11:25 AM
Thanks for your help everyone. I have managed to fix the issue by setting the timeout to -1.
Richard
01-02-2014 12:03 PM - edited 01-02-2014 12:04 PM
@r.youden wrote:
Thanks for your help everyone. I have managed to fix the issue by setting the timeout to -1.
Richard
NO! you haven't. What you have done is stuck your counter loops without any means to exit if the signal is never detected or goes away. Since the DAQmx Read.vi's may never finish, those loops become stuck running unless a signal is present regardless of how many times you click the "Speed" booleans, pound your mouse, bang the keyboard or shake your monitor! Hitting the abort button will not let the "Clear Task.vi's" run at all! You've simply swapped one problem for a much larger bug.
01-02-2014 09:32 PM
As said, setting the timeout value to -1 is not the right solution. You can refer to the examples from NI for an effective way to implement your logic.