Hi, I seem to be getting a Value error when attempting to use the NumToStr function on a num value with an exponent. Below is an example of my code, to give you an idea of what I am trying to do.
VAR robtarget currentPosition;
VAR num anglex;
currentPosition := CRobT(\Tool:=tool, \WObj:=workobject);
anglex := EulerZYX(\X, currentPosition.rot);
Write CalibrationLog,“Euler angle: X:” + NumToStr(angleX, 7);
The value inside angleX is -4.00217E-7, so I assume the fact that it is formatted this way is what is causing the value error in the NumToStr function. I tried using the Round function in hopes of getting rid of the exponent but this also throws a value error.
Does anyone have any ideas how I might be able to log this value?