LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Freuqency measurement error

Solved!
Go to solution

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.

 

 

Download All
0 Kudos
Message 1 of 15
(3,431 Views)
Solution
Accepted by topic author r.youden

You can put the timeout on -1 that way it will wait for ever.

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 2 of 15
(3,423 Views)

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).

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 15
(3,411 Views)

Thanks Koen.

 

I am still very new to this VI game, can you please explain how to adjust the timeout value.

 

Richard.

0 Kudos
Message 4 of 15
(3,400 Views)

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.

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 5 of 15
(3,391 Views)

@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

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 6 of 15
(3,378 Views)

@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

!0.png!1.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 15
(3,348 Views)

Thanks for your help everyone. I have managed to fix the issue by setting the timeout to -1.

 

Richard

 

0 Kudos
Message 8 of 15
(3,340 Views)

@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.


"Should be" isn't "Is" -Jay
Message 9 of 15
(3,329 Views)

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.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 15
(3,312 Views)