math functions inside TP program

  • Hi all,


    I am writing a TP program where I want to read a register value that can be real or integer. However, for any floating point values, I want to truncate the value into decimal and integral parts. For this, I have installed the math tools software option J539 to the virtual controller in Roboguide.


    The following thread Here inspired me to use this option


    There are some functions namely ABS, or TRUNC. I am unable to locate them when I am adding instructions to my TP program.


    Am I missing something here. Can somebody point me to the right options.


    thanks,


    Zahid

  • When you insert the Instruction, choose the ...=(...) statement under Registers, then when scrolling through the options make sure you keep clicking next page, there Are 6 pages, but only 4 stack on the screen at a time. Most likely those option are on page 5 or 6.

  • thanks pdl


    The option that you suggested is much simpler. However, do you know how to get rid of the decimal point. For example, if my register has the value 14.8721, I can get 14, and .8721 using the above method. Is there a way to get 14 and 8721. I tried multiplying by 1000 for example ( if I needed just 3 decimal places accuracy), but then, it will be 872.1.


    Zahid

Advertising from our partners