Jump to content

Devicenet output to OPC server


Recommended Posts

I'm posting this for a co-worker:

I am in need of some technical assistance with the FusionUV Lighthammer H10 devicenet communications.

I am able to successfully write and read 4-byte DUINT (Data Word 0 & Data Word 1) from the LH10 using a NI PCI-DNET card according to the document you sent. However, your documentation states there is data out to the 46th byte. My question is: How do I access the data past the 4th byte?

I am using the OPC server from NI, which gives me several data types (see attached document). I have been using the DUINT data type to read the above mentioned word0 & word1. There is a REAL and a LREAL data type as well, but I do not know how to decipher these outputs. Is there some algorithm used to convert this floating point number into something I can use?

Some examples:

At Reset State:

DUINT = 2294016 decimal = 230100 hex (makes sense

Link to comment

SOLVED

After some more research and additional help, the problem is solved. I

will post the details for posterity.

The UDINT data type contains an integer index after it (e.g. UDINT0,

UDINT1, etc). This integer refers to the start byte to read, while the

data type determines the width. So a UDINT4 will read from byte 4 to

byte 7.

I had though this integer was simply for book keeping purposes, but this

was not the case.

Perhaps NI will spend a little more time to document the OPC server

better, and maybe even give some usage examples.

Thank you, Eric

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...

Important Information

By using this site, you agree to our Terms of Use.