Hey HawkME,
thanks for the advice. I did excaly what you mentioned because i got that error. First i try to get the integer Value of a Register and if its not possible have a catch where i get the float value.
Cheers
Hey HawkME,
thanks for the advice. I did excaly what you mentioned because i got that error. First i try to get the integer Value of a Register and if its not possible have a catch where i get the float value.
Cheers
Hey Erik, thanks for the help. The solution is quite simple
var numRegister = myRobot.RegNumerics[1].Value.RegLong; --> returns the long value
var numRegister = myRobot.RegNumerics[1].Value.RegFloat; --> returns the float value
Thank you.
Hello all,
I am trying to read the numeric registers of a robot via C#. The whole thing works as long as it is an integer. As soon as the register contains a floating point number an exception is thrown.
Code excerpt:
var numRegister = (myRobot.RegNumerics[1].Value.RegLong);
If register 1 is an integer (e.g. 100) it works. If not then the following message appears: System.Runtime.InteropServices.COMException: "Register value is not of Integer type.
Makes sense because the value is not an integer. Now my question.
Does anyone know how I can read floating point numbers ? Or is that not possible ?
Kind regards