View Single Post
Old January 16th, 2022, 07:27 AM   #7
United Kingdom

mad4x4 is offline
mad4x4's Avatar
Join Date: Mar 2009
Location: ST CYrus
Posts: 277
Originally Posted by Hal9000 View Post
Hi there,

I have an array of 44 words that contain the two parts of a set of real numbers. I want to copy these words over to my Struct which contains the 22 Reals.

I've tried all the obvious Block Move type instruction options in TIA portal but non of them seem to work for me.

Can anyone suggest away to do this?

The image should make things clearer.

Many thanks,

You should be able to set up a function to do it, I found this coded on another forum and it is similar to how I used to do it on Allen Bradley. I assume these are Modbus registers coming in, only problem might be the big endian / little endian fromat ( BCDA v CBAD)

If those 2 words contain floating point number formatted as IEEE 754, then proceed as follows:

L FirstModbusWord

T MW20

L SecondModbusWord

T MW22


L MD20
  Reply With Quote