Welcome, Guest
Username: Password: Remember me

TOPIC: setting decimal place value in tag

setting decimal place value in tag 2 years 2 months ago #1826

Hello
I'm trying to set float type tag to have 2 decimal places and write its value in alarm. but there's no decimal property in a tag and in the manual, only exist the instruction to set decimal places of a visual object. is there a way to do this or maybe some kind of function to do this in script before assigning value to tags?
The administrator has disabled public write access.

setting decimal place value in tag 2 years 2 months ago #1827

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 826
  • Thank you received: 123
  • Karma: -107
Hello,

It's not possible to do directly. You can do it only by using intermediate tag. And in the script * 100 and get integer part by assigning to int value and then divide to 100 and bind this value to the tag you want to display alarm with 2 decimal places.

Best regards,
Ruslan
Last Edit: 2 years 2 months ago by fatkhrus.
The administrator has disabled public write access.
The following user(s) said Thank You: kurotsubaki
Go to top