RSLogix 5 - CPT dest. adress - help

ason

Member
Join Date
Oct 2005
Location
Home
Posts
317
Hi im going to change addresses in a sample project,
so i can use it in a project that my costumer have.

In this picture im going to change source N11:3 to N49:3
But what is in the dest?
is´t indirect address? N12:[N9:0]

Is this right, i change N12 to N50 and [N9:0] to N47:0 (are this the length?)

CPT.jpg
 
That's not a CPT, (Compute) that's a COP (Copy).

They are copying to a variable destination. N9:0 is determining where it is being copied to. If you change that to N47:0 you will have to make sure that N47:0 contains the correct number as well.

We can't tell you what needs to be changed without knowing what it is and why you are changing it.
 
Sorry wrong tittle,

Here is the sample project for a RIO - DP adapter
I need to change the addresses in the project
Code:
From   To 
N7      46
8        47
9        48
10      49
11      50
12      51
16      52
And in the COP function i dont relay understand whats
#N12:[N9:0] means
 
Ason,

If it is a direct copy you need then it needs to be changed to N51:[N48:0]

But you need to ensure that your data table sizes are correct.

In your case N48:0 is used alongside N51: as an indirect address.

This means that if the value of N48:0 is 7 then you are actually addressing N51:7.

Like wise if N48:0 is 12, then the address is N51:12

Hope this helps

Mark
 
Ason,

If it is a direct copy you need then it needs to be changed to N51:[N48:0]

But you need to ensure that your data table sizes are correct.

In your case N48:0 is used alongside N51: as an indirect address.

This means that if the value of N48:0 is 7 then you are actually addressing N51:7.

Like wise if N48:0 is 12, then the address is N51:12

Hope this helps

Mark

Thanks, that is what i was looking for! (y)
 
It means that whatever value is in N9:0 is to be substitued into the address. For example if N9:0 contains the value 20 then the address becomes N12:20. If N9:0 contains the value 100 then the address becomes N12:100. Your instruction copies 60 words of data, beginning at N11:3 and ending at N11:62 and puts those 60 values at N12:[N9:0] up through the next 60 memory addresses. The # in front of the address indicates that this is a file addressing function that operates on a large area of memory, not just a single address.
 

Similar Topics

I am having problems with (invalid expression or tag) I want to do the following: Cut_Count[1].ACC multiplied buy Read_Data[0] multiplied by 31.5...
Replies
3
Views
2,551
This should be a simple one. I'm trying to use a boolean value in a CPT instruction to either add a value or not. This is the statement...
Replies
7
Views
6,374
I was pleasantly surprised to learn that the Micrologix 1400 has the Compute (CPT) instruction available. But my problem is this: The two...
Replies
23
Views
9,467
Hi folks, I'm back again with a new question to you....While testing a code I made, I've noticed something I can't explain. I'm using the CPT...
Replies
2
Views
3,949
I am trying to interpret a compute function in RSLogix 500. This seems like a stupid question but it has me stumped. Maybe someone can help. The...
Replies
3
Views
13,444
Back
Top Bottom