Area-Crossing indirect addressing

Berra

Member
Join Date
Mar 2007
Location
Sweden
Posts
137
Hi guyes anyone who can give me a hint

i have done following program


l #Byte_nr
slw3
lar1


opn #DB_NR1
l db1.dbb1
l 1
==i
= m 10.0

A [Ar1,p#1.0]
jc db2
JN end


db2: opn #DB_NR2
l db2.dbb0
t #counting_value

end: nop0

And i get a cpu stop, and when i read in the Module information i can see this: Help on Event 2x24

Cause:
You have used an illegal address range for area-crossing indirect addressing. The area ID of the access address (bits 24 to 31) is not permitted.

To correct or avoid errors:
Use a pointer with a correct area ID.

How does a permitt the bits 24 to 31 ?
 
If you do not specify the area in AR1, you must specify it in the instruction, your code needs to be:

Code:
A [b]DBX[/b][Ar1,p#1.0]
 
When in the STL-editor, press F1, click on index, on new form click on find, enter "indirect", wait till it's done searching, then look for: Example of Area Crossing Register Indirect Addressing.

Pretty nice example of something similar.

Just can't seem to figure out why you:

OPN #DB_NR1
L DB1.DBB1

or

A [AR1,P#1.0]
jc DB2
jn end
DB2: .....

Easier to just make it:

A [AR1,P#1.0]
jcn end
DB2: .....

But thats just cosmetics, what L D said should fix your problem...
 
Thanks again L D.

i Should think about that you whas writing Jeebs, i have recently start with indirect adressing so all hints a can get i would be more than grateful.

Berra
 
On another note, in this bit

Code:
 opn  #DB_NR1
 l	db1.dbb1

You open #DB_NR1 data block, doesn't the next instruction open the data block DB1.
 
Ok there is someting more i don´t get

When i do like this

l #byte_nr (1)
slw 3
lar1

opn #db_nr
a dbx[ar1,p#0.0] (why does this bee 1 in the RLO?)
jcn end

a dbx [ar1,p#1.0](and why is this 0 in the RLO ? i thougt this should bee 1)
jcn end
jc b1

b1: l db2.dbb1
t #counting_value
 

Similar Topics

In my project i use an Anybus-X gateway for exchanging data with 3rd party as a modbus slave. Data is provided as means of PIW and PQW area and...
Replies
8
Views
5,886
Hi everyone, I hope you're all doing well. I'm currently working on updating an HMI project for the GP2500, and I've encountered a bit of a...
Replies
1
Views
94
Dear colleagues, hope you can help on that matter. We have a project where we need to control 3 servomotors to move a auger feeder system...
Replies
38
Views
1,169
Project involves updating a ~23 year old controller (C200HX CPU64). The HMI is a windows NT machine with the gui done with Delphi 5 (Pascal)...
Replies
1
Views
1,098
Hello, I am looking into a robotic sanding and grinding project where we would need area scanners. I just spoke with OMRON and they say that their...
Replies
11
Views
1,496
Back
Top Bottom