ใช้ GENESIS32 SCADA คำนวน Density

image

ดาวน์โหลดจาก ที่นี่

ตัวอย่างนี้จะทำการแปลงค่า OPC tag ใน ProcessPoint ตัวแรก(TTO12)ส่งให้กับ OPC tag ในProcessPoint ตัวที่สอง(Density)

เราสามารถเปลี่ยน OPC tag ใน ProcessPoint ทั้งสองตัวตามต้องการเมื่อนำไปใช้งาน

 

โค้ด

เราสามารถเปลี่ยน Timer Interval ในการคำนวนค่าและส่งค่าไปให้ OPC tag ได้โดยดับเบิ้ลคลิ้กที่ Timer แล้วเปลี่ยน Interval (ms) ดังรูป

image

เมื่อคลิ้กปุ่ม Edit จะปรากฏหน้า VBA แสดงโค้ด VBA ในการคำนวน Density

image

 

setvl "output1", densSatLiqTW(getvl("input1") + 273.16)

โค้ดดังกล่าวคือการคำนวนค่า Density ของ ProcessPoint ชื่อ input1 แล้วส่งค่าให้กับ OPC tag ใน ProcessPointชื่อoutput1

image

จากรูปจะเห็นชื่อของ ProcessPoint แต่ละตัวที่ได้กำหนดไว้เพื่ออ้างอิงในโค้ด VBA ได้

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment