Basic-ex3
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[Basic-ex1]]
objectPage http://www.yama-lab.org/fwb4pi/index.php?Basic-ex3 or http://www.yama-lab.org/fwb4pi/index.php?Basic-ex3
device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min.
command: set readInterval=60000
command: set execInterval=0
command: program ex1
program: def abs(x)= if x>=0 then x else -x
program: ex("service","clear sendBuffer")
program: 's=0
program: 'for i=0 to 10
program: ' s=s+i
program: ' ex("service","putSendBuffer "+s)
program: 'next i
program: 't1=abs(1-2)
program: 'ex("service","putSendBuffer t1="+t1)
program: d=ex("service","getCurrentDate.")
program: ex("service","putSendBuffer d="+d)
program: ld=date2l(d)
program: ex("service","putSendBuffer ld="+ld)
program: dl=l2date(ld)
program: ex("service","putSendBuffer dl="+dl)
program: rd=date2l("2019/7/01 22:05:00")
program: ex("service","putSendBuffer rd="+rd)
program: ddx=abs(rd-ld)
program: ex("service","putSendBuffer ddx="+ddx)
program: if abs(rd-ld)<300 then
program: {
program: ex("service","putSendBuffer it is almost "+d)
program: }
program: else
program: {
program: ex("service","putSendBuffer it is not "+d)
program: }
program: ex("service","sendResults.")
command: end ex1
command: run ex1
result:
d=2019/7/1/ 22:9:14
ld=1561986554000
dl=2019/07/01/ 22:09:14
rd=1561906800000
ddx=79754000
it is not 2019/7/1/ 22:9:14
currentDevice="yamaRasPiDp1_1",Date=2019/7/1/ 22:9:14
終了行:
[[Basic-ex1]]
objectPage http://www.yama-lab.org/fwb4pi/index.php?Basic-ex3 or http://www.yama-lab.org/fwb4pi/index.php?Basic-ex3
device yamaRasPiDp9_1 or yamaRasPiDp9_2 start after no write for 10 min.
command: set readInterval=60000
command: set execInterval=0
command: program ex1
program: def abs(x)= if x>=0 then x else -x
program: ex("service","clear sendBuffer")
program: 's=0
program: 'for i=0 to 10
program: ' s=s+i
program: ' ex("service","putSendBuffer "+s)
program: 'next i
program: 't1=abs(1-2)
program: 'ex("service","putSendBuffer t1="+t1)
program: d=ex("service","getCurrentDate.")
program: ex("service","putSendBuffer d="+d)
program: ld=date2l(d)
program: ex("service","putSendBuffer ld="+ld)
program: dl=l2date(ld)
program: ex("service","putSendBuffer dl="+dl)
program: rd=date2l("2019/7/01 22:05:00")
program: ex("service","putSendBuffer rd="+rd)
program: ddx=abs(rd-ld)
program: ex("service","putSendBuffer ddx="+ddx)
program: if abs(rd-ld)<300 then
program: {
program: ex("service","putSendBuffer it is almost "+d)
program: }
program: else
program: {
program: ex("service","putSendBuffer it is not "+d)
program: }
program: ex("service","sendResults.")
command: end ex1
command: run ex1
result:
d=2019/7/1/ 22:9:14
ld=1561986554000
dl=2019/07/01/ 22:09:14
rd=1561906800000
ddx=79754000
it is not 2019/7/1/ 22:9:14
currentDevice="yamaRasPiDp1_1",Date=2019/7/1/ 22:9:14
ページ名: