Search the Community
Showing results for tags 'status words'.
-
Status Word Memory allocations. Many of the inbuilt function modules in CScape have a status word requirement/option and this status word typically requires 2 x 16 bit words stored consecutively. This requires two 16 bit words to be reserved, with the name of the first word specified as the "Address". The common mistake, is to declare a single word as a global and point to that word only. The operation of the "module" passes data to both the "Address" register and the following register. If this register has not be reserved, then it can be dynamically allocated as a separate storage register for another variable and errors will occur. The safest method, is to declare an array of two words. An alternative method, is to declare two variables at consecutive memory addresses and use the lowest address word as the index. i.e. SerialStatusA at %R100 and SerialStatusB at %R101 and use SerialStatusA as the index instead of SerialStatus[0] above. Look carefully at the requirements. Some statuses require 1 word, others 2 words and some 4 words.
-
- memory allocation
- status words
-
(and 2 more)
Tagged with: