Sign in to follow this  
Followers 0
INOhmboy

Devicenet Mapping in ControlLogix

2 posts in this topic

All, I should know this but just having a brain freeze. I have an analog point i/o module in my devicenet network. The data for ch0 is 2 bytes so it starts in the second half of the work. How do I filter to get just the part of the word? Thanks for any help and suggestions.

Share this post


Link to post
Share on other sites
The DeviceNet Tag Generator automatically generates logic that copies the data into a SINT[x] array, then copies the necessary bytes into a module-specific UDT. That's a good way to line up the 1756-DNB input data table byte-by-byte and just grab the data you want. If you're doing it yourself or for just a few devices, I typically use a three-instruction rung: 1. Move (MOV) a Zero into the destination tag to be sure it's empty. 2. Masked Move (MVM) the source into the destination with an appropriate constant mask. 3. Divide (DIV) the destination by the appropriate power of 2 in order to bit-shift the data to the desired location. Dividing by 65536 will shift your data by 16 bits to the right. Other folks prefer the Bit Field Distribute (BTD) but I am more comfortable doing it with masks and divides. Edited by Ken Roach

Share this post


Link to post
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
Sign in to follow this  
Followers 0