Copying integer values

gbradley

Lifetime Supporting Member
Join Date
Apr 2002
Location
Corona, Ca.
Posts
1,637
I have a question on Copying integer values?

Let’s say that I am making an Icee machine.

I have three flavors.

Apple, Grape and Cherry.

The Mix times and amounts for:
Apple are in Integer file N10
Grape are in Integer file N11
Cherry are in Integer file N12


*********MixTime******** CoolTime ******* Amount

Apple0 *****N10:0 ******** N10:1 ******** N10:2

********** 5 ******** 20 ********10

Grape1*** N11:0 ***** N11:1 ******** N11:2

********* 8 ********* 30 ******** 20

Cherry2***** N12:0 ******** N12:1 ******* N12:2

********* 4 ********** 25 ******** 15

When I start the machine, If Apple is selected, I copy the integer files from N10, and put them into N50.

I did this two times, once for the first 128, and then again for the second 128.

It wouldn’t let me do all 256 at once. (I’m sure that there is a good reason for this)

CopyExample2.jpg

SOR XIC B3:0/0 EQU N7:220 0 BST COP #N10:0 #N50:0 128 NXB COP #N10:128 #N50:128 128 BND EOR


I set the timer presets using the resultant N50 values.

Does this scheme seem reasonable?

Is there a way to use indirect addressing with different integer Files?

That is… instead of copying and using the N50 values, use a value like {N1[N7:220]:0}


Thanks

GBradley
 
Yep, you can do that...at least in my SLC5/04 it works...

indirect_file_000.JPG


indirect_file_001.JPG


So, you can use indirect file addressing instead of moving the recipe values if you so desire, but each reference to an indirect address will increase cycle time over a direct reference.
 
For Batching purposes, this is perfectly fine. And, you WOULD NOT want to use indirect addressing as what happens if someone selects grape in the middle of an apple run. You want to control when the new recipe becomes active, and the easiest way to do that is as you've done. By copying the values at an initial or safe state.

BTW, your logic above, I assume you meant to change the EQU statement to 0, 1 and 2 for the three different setups.
 
I did this two times, once for the first 128, and then again for the second 128.
It wouldn’t let me do all 256 at once. (I’m sure that there is a good reason for this)

If you are using an SLC500 with the # file statement then you are restricted to 128 words
PLC5 I think is 1000 words and Logixs 5000 I dont know but its a large number


Is there a way to use indirect addressing with different integer Files?

Okie PC has you on the right track here
 
Thanks.
Why are you copying 256 words when you are only using 3? Am I missing something?
I just used 3 in the example to simplify the question. Actually I am not using 256 either, but I want to keep the tables aligned.

BTW, your logic above, I assume you meant to change the EQU statement to 0, 1 and 2 for the three different setups.
Yes Exactly

Yep, you can do that...at least in my SLC5/04 it works...
That was my first thought, but I couldn't get my 5/03 to cooperate so I decided to try and copy the files once for each "flavor".
 
gbradley said:
... I couldn't get my 5/03 to cooperate so I decided to try and copy the files once for each "flavor".

That is why I posted the pics to show you how to format it.

Put the file type character "N" immediately followed by the square bracket to indicate indirection...

It should work in a 5/03 too, unless there is a firmware limitation I don't know about.

Another reason to keep it how you have it is so that you have a "working" file that can be edited/adjusted without losing the original recipe.

So, when done with a "batch", you can revert to the original recipe or provide an option to save the settings and overwrite the original, or create a new file.

Paul
 

Similar Topics

I'm not super familiar with the Micrologix line of processors, but I am pretty familiar with RSLogix 500. I'm trying to simply copy a string to...
Replies
4
Views
260
Hi All, I am looking to copy and paste a routine. I know this has to be done offline. My question is, when I go back online, these tags are...
Replies
6
Views
480
Hello everyone, friends. I need help with something related to SCL. In a FB, I need to copy the value in the DB to the DB at another address. I...
Replies
3
Views
1,350
Hello all! Is it possible to COP a SINT array to a UDT structured the same as a SINT array, except all BOOL bits? I have a module that has an...
Replies
5
Views
3,139
Hello, looking for a way to capture and display the accumulated time for a retentive timer in rslogix 500 on a microligix 1400 plc example move...
Replies
3
Views
1,632
Back
Top Bottom