MRPLC82

Moving INT[32] value to DINT

6 posts in this topic

I need to message across analog value from one controller to second one on site. 
I have tried it but message config doesn’t like it. 
I never had problems with moving DINT to DINT. 
Just this INT[32]

Share this post


Link to post
Share on other sites

@MRPLC82 So are you trying to move all 32 INTS of the array or just one?  An Analog would be type REAL on both ends and should transfer fine with a message as I recall.  Haven't done one in a while myself either.

Share this post


Link to post
Share on other sites

I will be moving for 1 element. 
Real value cannot be messaged across directly between PLCs , it has to be DINT to DINT. I have done it a number of times but not sure how to do INT32 to DINT
PLC 1 is 1769-L35

PLC 2 is 1769-L33 both CompactLogix

Edited by MRPLC82
Spelling

Share this post


Link to post
Share on other sites

I've never done that, but I'm not surprised you're having trouble using MSG to get data between different data types.

I'm a little confused... You said you need to move an analog value that's typically a REAL. A REAL uses the IEEE floating point format, which is 32 bits. Is the analog value a single 16-bit integer? If so, just MOV its value to a DINT tag in the source PLC and then MSG it to a DINT tag in the destination. If you need to transfer the whole INT[32] array tag, use a COP instruction first, with length 16, to pack it into a DINT[16] array. Then use a COP instruction in the destination with length 32, to transfer it back into an INT[32] array if needed.

Share this post


Link to post
Share on other sites

I have done some research today and found that COP instruction can not be used in this situation as it will pack two INT tags in one DINT tag.

Share this post


Link to post
Share on other sites

That is correct. If you need the value of a single INT tag to end up in a single DINT tag, use MOV.

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