逻辑判断执行赋值操作

DEMO:
var Tag_1=ReadFromTag('simulator.Channel_1.Device_1.Tag_1');
if(Tag_1==1)
{
WriteToTag('simulator.Channel_1.Device_1.Tag_8',100);
WriteToTag('simulator.Channel_1.Device_1.Tag_7',100);
}
else
{
WriteToTag('simulator.Channel_1.Device_1.Tag_8',0);
WriteToTag('simulator.Channel_1.Device_1.Tag_7',0);
}
Demo 说明:
读取外部变量 simulator.Channel_1.Device_1.Tag_1 的值,然后进行判断,如果值为 1 将其它的点位赋值 100,如果为 0 将其他点位赋值 0。
2023-08-08
0 0