是德科技
直播中

武彩霞

7年用户 209经验值
私信 关注
[问答]

运行for循环计时器输出值出错

您好,我正在运行一个for循环,它激活VEE中定时器的终端T2。
在for循环开始之前首先激活终端T1。
当我运行它时,在for循环的每次运行中激活通常应该增加为T2的计时器输出值,不知何故似乎显示出一些异。
就像我一样,我希望输出值逐渐增加,如1.1us,3.9us,6.5us,7.9us,..我得到的值似乎表现出类似的趋势,但有时我会得到偶尔的错误,比如1.1us
,0.9us,3.9us,6.5us,....这在我正在努力开发的应用程序中尤为重要。你可以帮助我吗?
根据帮助,计时器忽略T2在T1之前到达的情况并且我已经验证了这一点。
所以,我认为没有任何理由可以解决这种情况。
我附上了我的意思快照,谢谢苏布

以上来自于谷歌翻译


     以下为原文

  Hello,

I am running a for loop which activates the terminal T2 of the timer in VEE. The terminal T1 is first activated before the for loop starts. When I run it, the timer output values which are normally supposed to be increasing as T2 is activated in each run of the for loop, somehow seem to show some discrepancies. Like for eg, I would expect the output value to be gradually increasing like 1.1us, 3.9us, 6.5us, 7.9us,.. The values I get seem to show a similar trend but sometimes I get this occasional error like say 1.1us, 0.9us, 3.9us, 6.5us,....

This is particularly very important in the app I am trying to develop.Can you help me out? According to the help, the timer ignores a case when T2 arrives before T1 and I have verified this. So, I don't see any reason as to how this would happen. I have attached a snapshot of what I mean

Image

Thanks
Subu   
附件

回帖(2)

武彩霞

2019-8-21 07:06:50
嗨,我也很困惑。
我不知道这是怎么发生的。
第一个情节是我期望的,但程序产生这样的结果只有一次是10次。
但大多数情况总是存在问题,并且在第二个图中显示了典型的情况。
看起来某些数据点因常数y偏移而不同。
定时器使用高精度时钟,具体取决于操作系统。
这可能取决于系统或VEE版本(我使用的是ver.8)?
ThanksSubu

以上来自于谷歌翻译


     以下为原文

  Hi,

I am confused too. I don't see how this is can happen. The first plot is something that I would expect but the program produces such a result only about once is 10 times. But mostly there is always a problem and a typical case is shown in the second plot. It looks like certain data points differ by a constant y offset. The timer uses a high precision clock depending on the OS. Could this then depend on the system or VEE version (I'm using ver.8 )?

Thanks

Subu
举报

董英灏

2019-8-21 07:22:38
我在Windows XP SP3上使用VEE 9.2。

以上来自于谷歌翻译


     以下为原文

  Iam using VEE 9.2 on Windows XP SP3.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分