Dbanks

Moving Blocks of Data in RsLogix500

4 posts in this topic

I'm trying to replicate something I've done in an RSLogix5000 file without the usage of those convenient arrays. 

I have 24 counters, for 24 hours in a day. I have a MapleSystems screen relaying this data in the warehouse. The logic I've tried to implement is as such

If bit (HMI assigned for shift start) = 6 --------- Copy C5:78 to C5:130 with a length of ten. I'm trying to copy the 10 counters that will be displayed on the MS monitor into the part of the counters that are connected via tags. It's done like this so that if someone starts the shift at 8, it'll take from 8 + 10 hours into the same C5:130 ten registers to display it on any shift.

When I copied c5:78 --> c5:130 w/ len:10 it copies the first value C5:78 into the tenth register C5:130, when I'm trying to have it copy those ten into the C5:130 starting ten, to display on the screen. What am I doing wrong here? It's as if that length of ten is acting as an indexer and if that's the case, do I have to do 10 copy lines for each hour I want to utilize this logic on?

Thanks so much in advance!

Share this post


Link to post
Share on other sites

Posted (edited)

Can you post a screenshot of your logic?

Look at some of the examples in the Instruction Help for the COP instruction.

You probably need something like this:

 

pic1.png

Edited by AndrewG
Forgot attachment

Share this post


Link to post
Share on other sites

Are you saying that the contents of C5:78 are copied into C5:130 but the others (C5:79 - C7:87) are not copied into C5:131  - C5:139?

Is your instruction  COP #C5:78 #C5:130 10 ? (Double click at the left hand of the rung to see the mnemonics)

Is it possible that something else is overwriting C5:131 - C5:139?

Are you perhaps modifying C5:78 - C5:87 just before the Copy?

Please post what code you can to help.

Share this post


Link to post
Share on other sites

This seems to work for me (in a MicroLogix 1400):

CopyCounters.PNG.3b4fa0d350b7e8f8afa0403

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