Help - Search - Members - Calendar
Full Version: first cycle
Forums.MrPLC.com > PLCs and Supporting Devices > Omron > CX-Programmer
indepthmarine
I am using approximately 10 words for each of 5 serial devices, using RXDU, no protocol mode.

I am putting the result into the D area, which retains memory from last shutdown.

I am looking for a better way to enter #0 into all the fields on the first scan.

So far, I have thought of using W area instead of D area, then it is automatic, but for some reason I want to use the D area...I will think about this a bit more. Perhaps there is no good reason to use the D area.

Secondly, I might use MOV #0 D100, along with MOV #0 D101 and so on, up to D150, but this seems like a lot of unnecessary typing. Or am I just being lazy at this point?

What do other people do?



BobB
Use the BSET (block set) function.
First scan flag
BSET
Source word
Starting word
End word
If you use, say, D0000 as your source word, if there is 0000 in it you will write 0000 to the words you
specifiy.
For example
BSET
D0000 (0000 in register)
D100
D1000
will write 0000 to all data memories in the range D100 to D1000
The help file in CX-P has changed and does not show which words/typesd are applicable anymore.
I think the last time I used BSET I used #0000 as the source word but not sure - a long time ago.
indepthmarine
That is exactly what I was looking for. Thanks BobB.

(in the meantime, I typed in the 50 lines. I thought I was spending more time trying to get out of work than simply doing the work)
BITS N BYTES
If you use the CIO data area instead of D then they automatically are cleared at startup since they are non-retentive.
No need to use BSET at first scan.

smile.gif


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.