Omron programing problem only for gurus

Deep_arvind

Member
Join Date
Dec 2003
Location
india
Posts
26
hi all,
Is there some one there to help me out for this interesting omron logic??
the thing is that let us assume that i have D0 to D5000 memory area, i want to move data 0-->D0, 1-->D1,2-->D2and so on up to 5000-->D5000,
what i did is have some register say D6000 , and then start incrementing the value in D6000 starting from 0 to 5000 , and then write a rung which will compare the value of D6000 with 0,1,2,3.....5000. and when the condition comes true move the corresponding value to the corresponding register, that means 0-->D0, 1-->D1,2-->D2and so on up to 5000-->D5000,
But the big thing is that for doing this i have to write about 5000 rungs, Is there any way buy which we can either increament the register number or some instruction by which we can do this.....
waiting for the gurus to work out :)
thanks .....
 
Even a simple Omron PLC such as CQM1 or CPM1 is capable of indirect addressing the DM area.
This comes from the CQM1/CPM1/CPM1A/SRM1 Programming Manual:
When the DM area is specified for an operand, an indirect address can be used. Indirect DM addressing is specified by placing an asterisk before the DM: *DM.
When an indirect DM address is specified, the designated DM word will contain the address of the DM word that contains the data that will be used as the operandof the instruction. If, for example, *DM001 was designated as the first operand and LR 00 as the second operand of MOV(21), the contents of DM0001was 1111 , and DM1111 contained 5555, the value 5555 would be moved to LR00.
When using indirect addressing, the address of the desired word must be in BCD and it must specify a word within the DM area. In the above example, the content of *DM0000 would have to be in BCD between 0000 and 1999
Because I'm in no way an OMRON guru, I think this is the best answer I can give you.

Kind regards,
 
the indirect adressing is the way to go
use jvdcande descrption of inderict adressing


do a move then increment the pointer registor (*dmxxx)
redo the operation and then compare the value in *dmxx to the required number of operations
 
Hello Deep,

Am I correct in thinking that all you want to do is at a specific point in your program you want to move 0 into D0, 1 into D1, etc...
up to D5000?

If so, create a Structured Text Function Block.
Add two Internal Variables - "aa1" and "aa2" (or call them what you will).
Set "aa1" and "aa2" data type = INT.
Set Advanced Setting for "aa1" to Array of 5001, and AT address D0.
In the ST Editor enter...

For aa2 := 1 to 5000 Do
aa1[aa2] := aa2 ;
End_For ;

Add the function Block to your Ladder program, and when you enable the FB, BAM, in the blink of an eye, D0 to D5000 will fill with values 0 to 5000

Hope this helps
 

Similar Topics

Please suggest me programing cable for omron plc sysmac model no. Cpm2a
Replies
1
Views
1,127
Hi All, Can anyone tell me if its possible to program an Omron CS1G-CPU43H via an inserted CS1W-SCB41-V1 2 port communication module, on port 2...
Replies
5
Views
2,395
I am trying to scale my analog input from 1-5V to 0 to 1000. My parameters are D290 D290 + 1 = 0000 D290 + 2 = 0064 (1V) D290 + 3 = 1000 D290 + 4...
Replies
9
Views
4,122
Hi, I did a search forthis on the site and found a link to page 1728 but not post about this??? any answers? Thanks, Steve
Replies
3
Views
7,382
I need some help getting the TC102 module working. I want to ON/OFF regulate, and the transmitter is a PT100. When W0.00 (se picture below) is...
Replies
5
Views
3,414
Back
Top Bottom