01-14-2014 01:05 PM
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
01-14-2014 01:59 PM
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.
01-14-2014 02:12 PM
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.
01-14-2014 02:43 PM - edited 01-14-2014 02:46 PM
@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.
01-14-2014 03:30 PM
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!
01-14-2014 03:32 PM
Besides, when this vi run with the version 7.1 labview in windows xp system, there is no problem.
01-16-2014 03:59 PM
Is there anybody can solve this problem?
Thanks!
01-17-2014 09:03 AM - edited 01-17-2014 09:04 AM
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.
01-21-2014 09:25 PM
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
01-22-2014 01:58 AM
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