LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview vi can run at lower frequency but not high frequency

Hello,

 

in the VI I can specify the frequency lower than 1000hz. But if the frequency is higher than 1000hz, the error -805 will appear and the vi won't work normally.

Could anybody help me to fix this problem? My labview version is 2009.

You can find the vi in the attachment.

 

 

Thanks,

ppeng

0 Kudos
Message 1 of 14
(3,544 Views)

What sort of hardware are you using? The use of a timed loop does not make much sense unless you are running LabVIEW real-time. A single point acquisition does not use the built-in clock that most DAQ devices have. It would be much simpler to just use hardware timing.

Message 2 of 14
(3,516 Views)

Thanks for the reply! I'm using four multiplexer in my hardware. In order to control the time for these four multiplexer, the program used time loop. In fact, this program works well for 7.1 version labview, however, it does not function normally in 2009 version.

0 Kudos
Message 3 of 14
(3,501 Views)

@ppeng wrote:

in the VI I can specify the frequency lower than 1000hz. But if the frequency is higher than 1000hz, the error -805 will appear and the vi won't work normally.


That's because on Windows, the timed loop has a maximum of clock of 1kHz.  If need need control faster than that, you need to go to a real-time system.

 

But it seems more like what you need to do is get both your DIO and your Analog Input to use the same sample clock.  You can then have the mux switch (assuming the DIO is what is controlling the mux) based on when the sample clock of the analog input hits.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 14
(3,490 Views)

Thanks for the reply!

1). what do you mean a real-time system? do you mean i need to change from windows7 to windows xp or linex?

2). In order to get both your DIO and your Analog Input to use the same sample clock, what should I do? Sorry I'm pretty new to labview.

Any answer is appreciate!

 

0 Kudos
Message 5 of 14
(3,470 Views)

Besides, when this vi run with the version 7.1 labview in windows xp system, there is no problem. 

0 Kudos
Message 6 of 14
(3,464 Views)

Is there anybody can solve this problem?

Thanks!

0 Kudos
Message 7 of 14
(3,372 Views)

Hi ppeng,

 

As others have stated above, timed loops are designed for a real-time system. LabVIEW real-time allows for high levels of determinism and requires a real-time system, such as a cRIO. Also, the -805 error code corresponds to violating the timing requirements of the timed loop. This is due to the fact that you have exceeded the maximum clock frequency of a timed loop on a Windows operating system. For the full description of this error, please see the table linked below.

 

NI Timed Loop Error Codes:

http://zone.ni.com/reference/en-XX/help/371361G-01/lverror/timed_loop_error_codes/

 

Regarding the sample clock, you can use the NI DAQmx Timing VI to designate what sample clock each DAQmx task is using. Below you will find a great NI White Paper article discussing the Timing and Synchronization Features of DAQmx. Specifically, I would reference number 5, but it would be well worth your effort to read the whole article. 

 

NI White Paper: Timing and Synchronization Features of NI-DAQmx

http://www.ni.com/white-paper/4322/en/#toc5

 

Finally, it does not necessarily mean anything that the same program ran on LabVIEW 7.1. A lot of the LabVIEW architecture and driver API specifics have changed since then. The suggestions that Dennis_Knutson and crossrulz provided are great recommendations to improve your program and overcome your current issue.

 

 

Regards,

Mike Watts
Product Manager - Modular Instruments
0 Kudos
Message 8 of 14
(3,332 Views)

Mike,

 

Thanks very much for your reply. However, I still cannot run my VI since I'm very new to this software. 

"Regarding the sample clock, you can use the NI DAQmx Timing VI to designate what sample clock each DAQmx task is using". I have used that, but the error still exists. Could you explain more detailly on which DAQmx task I should designate a sample clock?

Thanks again!

 

 

ppeng

0 Kudos
Message 9 of 14
(3,257 Views)

I think you can simplify. Insert a DAQmx set timer to the AI-channel instead of trying to time the loop. As you read 1 sample per iteration it'll be the timed loop as samples are made.

It also looks like you should combine both loops into one.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 14
(3,242 Views)