Jump to content

Fail to read timer value


egoltzman

Recommended Posts

I'm trying to read a timer value from a V350 device and fail.

 

When I run this code I have no problem to read the MI101 value:

           rw[0] = new ReadOperands()
                {
                    OperandType = OperandTypes.MI,
                    NumberOfOperands = 1,
                    StartAddress = 101
                };

but if I try to read the TD1 value with  this code I get an InvalidCastException:

           rw[0] = new ReadOperands()
                {
                    OperandType = OperandTypes.TimerCurrent,
                    NumberOfOperands = 1,
                    StartAddress = 1
                };

How can I do it without getting the exception, if at all?

 

Thanks

Link to comment
Share on other sites

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.