Applies To:
  • CitectSCADA x.x

Summary:
I have looked for, but I cannot find an INT() function in citect. I need to be able to get only the integer portion from a value without rounding. 

Solution:
This can be acheived using the MOD operator as follows.

REAL Real1 = 1.99; // Define real with test value
INT Int2; // Define INT to store the INT portion of the Real

Int2 = Real1 - (Real1 MOD 1);

 

Keywords:
 

Attachments