Bobodopalus

floating point shift register

4 posts in this topic

hi all, i'm currently trying to shift register some data in the floating point (double word) format, just for an example i,m using a 0-20mA 0-40 bar pressure sensor to gather information from a can filler and want to log the data for lets say the previous 20 cans.

i understand how the shift register works and can get it to work with single word just fine, im using floating point to make my life a bit easier by using sleepy wombat's scaling function block, i need decimal points as i will be expecting reading around 4.5 or so bar and expected to be within .2 tolerence

this will then have to displayed on a HMI, which i assume will be easy enough

Edited by Bobodopalus

Share this post


Link to post
Share on other sites

Take a look at the XFER instruction.

gtsuport

Share this post


Link to post
Share on other sites

i did take a look at that, it can move an amount of words but only to a fixed data location right? so i could move my doubleword from d120 to d220, but it would not shift upon more entries, i would always be replacing d220 and not shifting from d220-d222-d224 etc

Share this post


Link to post
Share on other sites

N = size of data required, 40 for 20 cans.

Source D120  Destination D122

After XFER, move new data into D120

After XFER is executed again, all data is shifted by 2 registers.

gtsuport

Edited by gtsuport
Incorrect value for N

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