Error when access Register's value with RegLong using PCDK C#

  • Hi all,

    I am trying to access and manipulate FANUC V9.30P/08 controller's registers using PCDK (version V9.30(Rev.B)) in C#. Please help me understanding why the following code does not work:

    The outputs (belows) indicates that "RegLong" does not exist in "FRCVar" object.

      Message='System.__ComObject' does not contain a definition for 'RegLong'
      Source=<Cannot evaluate the exception source>
    <Cannot evaluate the exception stack trace>

    However, I have followed these threads and this seeing that the similar syntax work. Can anyone please help?

  • Place your Ad here!
  • I think I found the solution already. Since layer.Value returns back a dynamic object that does not support RegLong property, I had to transform it back to FRCRegNumeric first.

    The solution is:

                FRCVars robot_registers = myrobot.RegNumerics;
                FRCVar layer = robot_registers[6];
                FRCRegNumeric layer_value = layer.Value;

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners