upage_available


Description

Displays the number of unused micro-pages available.

Syntax

Int16 upage_available

Read

Gets the number of unused micro-pages.

Example

int unusedPages;
unusedPages = dsm.upage_available;

Write

Read-Only

Notes

The number of micro-pages and user pages are related. For the DSM303, one micro-page is equal to 65,520 (0xFFF0) data points. For the DSM303-4, one micro-page is equal to 4,092 (0xFFC) data points. User pages will always contain an integer multiple of micro-pages (either 1 micro-page, 2 micro-pages, 3 micro-pages, etc).

Module Points / Micro-Page (Decimal) Points / Micro-Page (Hex)
DSM303 65,520 0xFFF0
DSM303-4 4,092 0xFFC


The maximum number of micro-pages for the DSM303 is 7, while the maximum number of micro-pages for the DSM303-4 is 127. Since user pages contain an integer multiple of micro-pages, the maximum number of user pages will always be equal to or less than the number of micro-pages.

Module Max Micro-Pages and User Pages
DSM303 7
DSM303-4 127


As an example, suppose we downloaded several waveforms to the DSM303. If the first waveform uses up 40,000 (0x9C40) data points, which is less than 65,520, then the waveform would only take up 1 micro-page. The first waveform would be called user page 1 and would only use up one micro-page. For the second waveform, the amount of data points used is 100,000 (0x186A0), which is more than 65,520 but less than 2*65,520 or 131,040. Therefore the second waveform, also called user page 2 would use up two micro-pages. If you check the upage_available property at this point, the value returned would be "4" since you used up 3 micro-pages out of the maximum 7. This property also tells you the maximum number of user pages that are still available assuming that you use only one micro-page per user page and there is not overwriting of previously used micro-pages.

An example with the DSM303-4 is similar only that each micro-page is smaller but you have more of them. If the first waveform uses up 40,000 (0x9C40) data points, which is more than 9*4092 or 36,282 but less than 10*4092 or 40,920, then the waveform would take up 10 micro-pages. The first waveform would be called user page 1 and would use up ten micro-pages. For the second waveform, the amount of data points used is 100,000 (0x186A0), which is more than 24*4092 or 98,208 but less than 25*4092 or 102,300. Therefore the second waveform, also called user page 2, would use up 25 micro-pages. If you check the upage_available property at this point, the value returned would be "92" since you used up 35 micro-pages out of the maximum 127.

Please note that even if you exceed the micro-page limit by just one, the module will go ahead and use an additional micro-page. For example if you were using the DSM303 and your waveform was 65,521 (0xFFF1) data points in length then the module will use up two micro-pages. In this case with two micro-pages utilized, you will have 65,521 data points for the waveform and 65,519 empty data points that can not be used by any other waveforms and are essentially "wasted".

For more information regarding micro-pages and user pages, please see the DSM GUI Manual.