Qizhen's profileLabVIEWPhotosBlogListsMore Tools Help

Blog


    定时结构

        定时结构是从 LabVIEW 7.1 开始出现的。一眼就能看出来,它在外观与其它结构的风格完全不同。倒是和 LabVIEW 7 力推的 Express VI,风格一致。打开定时结构的函数面板(图1),最上面两个分别是定时循环,和定时顺序结构。下面的是与控制时间结构相关的的一些VI。


    图1:时间结构的函数面板

        定时结构,顾名思义,与时间控制有关。LabVIEW 中原本有一些用于延时或定时的函数,比如 Wait, Delay Time 等,他们都位于 Time&Dialog 面板中。利用这些函数,基本可以实现与使用时间结构相同的功能。定时结构的最大改进在于,它可以选择使用哪个时间源(硬件)来定时。尤其是当你的 LabVIEW 程序运行在 RT、FPGA 等设备上时,这一点就特别有用了。使用定时结构指定使用硬件设备上,而不是PC机上的时钟来定时,可以使使运行时序更精准。
        即便同样都是在普通PC上使用,定时间结构的定时效果也要比 Wait 等函数精确的多。我曾经参与过的一个测试程序,开始使用 Wait 函数定时,运行一小时后,时间误差有几分钟。改用定时结构后,误差缩短到了几秒钟。

     我和 LabVIEW

    Comments (2)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    刘伟印wrote:
    我没用过定时结构,想不到wait的精确度那么差啊
    Aug. 20
    geon wangwrote:
    这条信息很重要
     
    我原来测试过wait的分辨率为1ms
    可是精度和最小wait时间都为2ms左右
    原来以为在windows系统的PC下
    wait和定时结构二者精度差不多呢
    Dec. 17

    Trackbacks

    The trackback URL for this entry is:
    http://ruanqizhen.spaces.live.com/blog/cns!5852D4F797C53FB6!2343.trak
    Weblogs that reference this entry
    • None