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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...