Nhãn hiệu của chúng tôi

Impact-Company-Logo-English Black-01-177x54

Chào mừng bạn đến với Trang web của Schneider Electric

Chào mừng đến với trang web của chúng tôi.
		
Hôm nay chúng tôi có thể giúp gì cho bạn?
How to script a multi-condition IF/ELSE statement in EcoStruxure Operator Terminal Expert
Issue:
Looking for an example on how to script an IF/ELSE statement in Blockly script in EcoStruxure Operator Terminal Expert

Product Line:
EcoStruxure Operator Terminal Expert (formerly known as Vijeo XD)

Resolution:
Take for example that we need to script the following block of code in Blockly script in EcoStruxure Operator Terminal Expert:
/**********************************************/
if((Var1==1) || (Var2==2) || (Var3==3))
{
Var4 = 1
}
else
{    Var4 = 0
}
/*********************************************/

We can make use of the following items in EcoStruxure Operator Terminal's Blockly script to establish the same multi-conditon IF/ELSE statement:

Blockly

1) First we start with an Orange Trigger Block. For our example, I have chosen the Periodic - When - Do block. This will run every 100 ms.
2) The next block is the Purple If/Do/Else Block.
3) For the Logical "OR" of the 3 conditions, we need to snap two Blue Logicial Conditon Blocks together. If you had more conditions, you would use more of the same blocks.
4) Going deeper into the Logical Condition Blocks, we need to establish our comparison blocks. For this, we will three Blue Comparison Blocks.  Note that these blocks need the blue Variable and Constant blocks as well. The Variable block is used to define the HMI variable and the Constant block is used to define the value to compare the HMI variable to.
5) Finally, we need to make our Do/Else operations. For these, we will use the Bronze Value Change blocks. Again, this block will need the blue Variable and Constant blocks as well. Remember to set the appropriate value to set Var4 to for the Do and Else conditions.

Schneider Electric Việt Nam

Tìm hiểu thêm
Phạm vi:
Tìm hiểu thêm
Phạm vi:

Bạn cần trợ giúp?

  • Công cụ chọn sản phẩm

    Nhanh chóng và dễ dàng tìm được sản phẩm và phụ kiện phù hợp cho các ứng dụng của bạn.

  • Nhận báo giá

    Bắt đầu gửi yêu cầu bán hàng trực tuyến và chuyên gia sẽ liên hệ với bạn.

  • Nơi mua hàng?

    Dễ dàng tìm nhà phân phối Schneider Electric gần bạn nhất.

  • Trung tâm Hỗ trợ

    Tìm sự hỗ trợ cho mọi nhu cầu của bạn tại một nơi.

  • Tài liệu về Sản phẩm
  • Tải xuống phần mềm
  • Công cụ chọn Sản phẩm
  • Thay thế và thay đổi sản phẩm
  • Trung tâm Hỗ trợ
  • Tìm Văn phòng của chúng tôi
  • Nhận báo giá
  • Tìm Nhà Phân phối
  • Cơ hội nghề nghiệp
  • Hồ sơ doanh nghiệp
  • Báo cáo hành vi sai trái
  • Khả năng truy cập
  • Phòng tin tức
  • Nhà đầu tư
  • EcoStruxure
  • Tìm việc
  • Blog
  • Chính sách bảo mật
  • Thông báo về Cookie
  • Điều khoản sử dụng
  • Change your cookie settings