“ BLUE Basic Training Guide EP.13 การใช้งาน Script เบื้องต้น พร้อมตัวอย่างการใช้งาน “
Part 1 : รูปแบบ Block Script
1. Trigger Blocks : บล็อกสำหรับ Trigger คำสั่ง Script เช่น คลิกปุ่ม, ตั้งรอบเวลา
![](https://i1.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-36.png?w=400&ssl=1)
2. Operation Blocks : บล็อกสำหรับดำเนินการตามที่เลือก เช่น เปลี่ยนหน้าสกรีน, เปลี่ยนค่าคงที่
![](https://i1.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-37.png?w=250&ssl=1)
3. Value Blocks : บล็อกเก็บค่า Object ต่างๆ เช่น เก็บค่าตัวแปร
![](https://i1.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-38.png?w=300&ssl=1)
4. Logic Blocks : บล็อกสำหรับกำหนดเงื่อนไขต่างๆ เช่น if-do
![](https://i2.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-39.png?w=250&ssl=1)
5. Expression Blocks : บล็อกสำหรับการดำเนินการทางคณิตศาสตร์
![](https://i1.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-40.png?w=180&ssl=1)
Part 2 : การใช้งาน Script
1. เลือก Screen
2. เปลี่ยนจาก Screen -> Script
![](https://i0.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-41.png?w=850&ssl=1)
3. ลาก Block จาก Tool Chest -> วางบนหน้า Script
![](https://i1.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-42.png?w=850&ssl=1)
ตัวอย่าง Script
เปลี่ยนหน้า Screen ด้วยปุ่มกด
![](https://i0.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-43.png?w=850&ssl=1)
ปุ่มบวกเลข-ลบเลข Variable
![](https://i2.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/02/image-44.png?w=1000&ssl=1)
” Pro-face BLUE Basic Training Guide EP.13 by support K.P.T.”