“ BLUE Basic Training Guide EP.9 การเปลี่ยนหน่วยแสดงผล เช่น หน่วยวัดอุณหภูมิ น้ำหนัก ส่วนสูง ด้วยฟังก์ชัน User-Defined Converters “
ตัวอย่าง User-Defined Converters ในบทความนี้ จะเป็นการเปลี่ยนหน่วยน้ำหนักจากกรัม (g) เป็นกิโลกรัม (kg)
Part 1 : User-Defined Converters
1. ไปที่ Converters ในแถบ Project Explorer
2. คลิกเลือก User-Defined Converters
3. เลือก Unit
![](https://i0.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/01/image-64.png?w=800&ssl=1)
4. ตั้งชื่อ Converter
5. เลือก Category -> Weight
6. เลือกหน่วยที่ต้องการแปลง (ex. g -> kg)
![](https://i2.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/01/image-65.png?resize=800%2C278&ssl=1)
Part 2 : ทดสอบการแสดงผล
1. สร้าง Numeric Display
2. Enable Input Mode
3. กำหนด Current Value
![](https://i0.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/01/image-66.png?w=800&ssl=1)
4. เลือก Variable
5. เลือก Converter -> User-Defined Converters
![](https://i2.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/01/image-67.png?w=650&ssl=1)
ตัวอย่างเปลี่ยนหน่วยกรัม (g) เป็นกิโลกรัม (kg)
![](https://i2.wp.com/www.kpt-machinery.com/wp-content/uploads/2023/01/image-68.png?w=650&ssl=1)
” Pro-face BLUE Basic Training Guide EP.9 by support K.P.T.”