手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

timestampconstant以及转化为浮点数的特点(1)

时间:2024-10-12 22:06:29

timestamp constant 对于研究时间戳和浮点之间关系提供了非常好的桥梁,本经验就借助timestamp constant 根据几个例子展示它的特点。

工具/原料

labview2015

一:VI的获取

1、打开程序的后面板,此依次通过:programming-timing获取timestamp constant;通过:programming-numeric-conversion获取DBL。

timestampconstant以及转化为浮点数的特点(1)
timestampconstant以及转化为浮点数的特点(1)

二:浮点0对应的timestamp

1、我们直接将默认的时间戳常量转化为浮点数,可以看到结果显示为0;注:但是默认的时间戳常量我们不知道数值是多少。

timestampconstant以及转化为浮点数的特点(1)
timestampconstant以及转化为浮点数的特点(1)

2、如果我们将timestamp const设置为:19040101 00:00:01:000;浮点数显示为负数。

timestampconstant以及转化为浮点数的特点(1)
timestampconstant以及转化为浮点数的特点(1)

3、如果我们将timestamp const设置为:19040101 00:00:00:000;我们可以看到浮点数仍然为负数,并且负数更小了。注:前后我们只是减少了时间;

timestampconstant以及转化为浮点数的特点(1)
timestampconstant以及转化为浮点数的特点(1)

4、因此我们试图增加时间:我们将timestamp const设置为:19040101 08:00:00:000;此时可以看到浮点数变为了0;注1:当输入19040101 08:00:00:000 后,timestamp const会变成默认形态;注2:可以看到我们已经设置了系统默认的绝对时间原点。

timestampconstant以及转化为浮点数的特点(1)
timestampconstant以及转化为浮点数的特点(1)

三:绝对原点的验证

1、我们在绝对原点的基础上添加1s,可以看到浮点数变为了1;至此,我们已经找到了timestamp 和浮点数转化的规律。

timestampconstant以及转化为浮点数的特点(1)
timestampconstant以及转化为浮点数的特点(1)
© 手抄报圈