LabVIEW ตัดทศนิยม

Started by robodceest, August 19, 2013, 02:11:50 PM

Previous topic - Next topic

robodceest

EX labview
มีข้อมูล อยู่ 4 ชุด

47.1272
17.72026
7.5502565
4.4402565
อยากตัด หลังทศนิยมทิ้งไป หรือให้เหลือ1-2 ตำแหน่ง
ใช้วิธีไหนได้บ้างครับ

wlasoi

ทำให้เป็น srting แล้วจัดการสอยซ่ะ ... เพราะ function จัดการ string จะเยอะ

dynamic

สร้าง Numeric indicator มารับค่า แล้วกำหนดใน Properties ของมัน

ที่แท๊ป Display Format
  - Type = Floating point
  - Digits = 2
  - Precision type = Digits to precision





robodceest

Quote from: wlasoi on August 19, 2013, 02:39:25 PM
ทำให้เป็น srting แล้วจัดการสอยซ่ะ ... เพราะ function จัดการ string จะเยอะ
ขอบคุณครับ

robodceest

Quote from: dynamic on August 19, 2013, 03:32:23 PM
สร้าง Numeric indicator มารับค่า แล้วกำหนดใน Properties ของมัน

ที่แท๊ป Display Format
  - Type = Floating point
  - Digits = 2
  - Precision type = Digits to precision
ขอบคุณครับ