Introduction.
Introduction.
Introduction.
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Workshop PG5<br />
Resources<br />
3.2.5 Texts &<br />
Data blocks<br />
TEXT/DB<br />
Main memory<br />
NV<br />
0 3999<br />
Extension memory NV<br />
4000 (PCD4/6) 7999<br />
(PCD2) 5999<br />
(PCD1) 4999<br />
Texts and DataBlocks (DB's ) are non volatile. Texts ( string of characters ) are<br />
used for: Messages on displays, texts you want to send to a pager, initial<br />
strings for modems and so on.<br />
DB's are used for data logging, tables and so on.<br />
Technical stuff:<br />
Where are<br />
Text/DB’s saved?<br />
Register, flags, timers, and counters are handled by the system and stored in a<br />
small RAM apart from the main memory.<br />
DB's and texts on the other hand are stored in the main memory, together with<br />
the user program. If you want to use a FLASH Eprom or a normal EPROM for<br />
your main memory, remember that if you are in run mode, you can read from<br />
this memory but not write to it. Therefore you can't alter the content of your<br />
DB’s ( for example your Data login ). In most cases you won’t bother with<br />
this, but if you know that you are going to read and write from your DB's, then<br />
make sure to use DB's which are stored in the extension memory => address<br />
4000 and up. (This is the extension memory and it is always RAM, which<br />
means you can read and write to it).<br />
See how a Text or DB is declared in a Instruction list program:<br />
Example:<br />
Declaration of<br />
BD’s & Text<br />
TEXT 10 "Bonjour!"<br />
TEXT 11 [7]"Hello"<br />
DB 12 45,46,78,999,0<br />
DB 13 [10]<br />
DB 14 [4] 2,3<br />
;Text number 10 contains the string Bonjour!<br />
;Text number 11 is 7 characters long were from<br />
the last 5 are Hello and the first two are spaces.<br />
;DB number 12 with the 5 integer values:<br />
;45.46,78,999,0<br />
;DB number 13 is 10 values long and they are<br />
zero at start up.<br />
;DB 14 is four values long. The first two are 2 &<br />
3 the second ;two are 0<br />
© Saia-Burgess Controls Ltd. Page 3-10