Sign in to follow this  
Followers 0
Teropod

Question about DM.

10 posts in this topic

Can value of one DM be address of another DM???? for example value of D100 is 0001 can that 0001 be somehow presented like D1 or if i change it like DY= X then i could read or write in DX? Is that somehow possible in CJ1G series?

Share this post


Link to post
Share on other sites
Indirect addressing is possible. By using @ or * infront of Dxxxxx in a command the PLC looks at value in Dxxxxx and uses it as the address @ is for decimal numbers (range 0- 32k) * is for BCD (range 0- 9999) For your example D100 = 1 If you use @D100 in a command the command will use the data in D1

Share this post


Link to post
Share on other sites
Hello Teropod, If you mean indirect addressing, then the answer is yes. Using either @ or * in front of the D address, will make the address act as a pointer. @ for HEX, * for DEC I.e. - MOV &100 *D0 If D0 has a value of 99 This will move value 100 into D99 MOV &100 @D0 If D0 has a value of 99 This will move value 100 into D153 Hope this helps

Share this post


Link to post
Share on other sites
Try this document found right here at MrPLC. A very good tutorial with pictures. Indirect Addressing

Share this post


Link to post
Share on other sites
And if i wanna display DX value it would look like ---[ = ]--------------------------[@MOV] ....[D0 (As screen number]..[ Min (minimum number for DX as i dont wanna display incorrect values] ....[screen number].............[DX] ---[>=]------l W0.00 (For next) l-------------------[@+B] ....[DX].............................................................[DX] ....[Max (Idont wanna go out of range)]..........[s(value depends on how much DMs will my data use)] ........................................................................[DX] ---[<=]-----l W 0.01 (For previous) l---------------------[@-B] ....[DX].......................................................................[DX] ....[Min (Idont wanna go below range)].................... .................................................................................[DX] ---[ = ]------------------------------[ XFER ] ...[D0]......................................[ *DX (In these case variant D address) ] ...[screen number]...................[ n (As number of words)] ................................................[D100 (As data that will be on display] Is these right use of * in front D?

Share this post


Link to post
Share on other sites
See Jay Hughes excellent article in the Downloads section for Omron for a concise description of Indirect Addressing. http://forums.mrplc.com/index.php?autocom=downloads&showfile=195 Edited by BITS N BYTES

Share this post


Link to post
Share on other sites
I saw! ^^ Really nice article. At least it will help! Thanks people!

Share this post


Link to post
Share on other sites
Im not shure ive really got these? Shouldn't *Dmx with value 5032 be same thing as D5032? in one case it pass <> in other it dont! untitled.bmp Edited by Teropod

Share this post


Link to post
Share on other sites
Yes, *Dmx with value 5032 will be same thing as D5032. CX Programmer does not have the ability to show the power flow (green lines) for comparison instructions that use indirect addressing. That is why the <>L is shown in Yellow. The ladder code will still execute properly, even though the <>L is shown in yellow.

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
Sign in to follow this  
Followers 0