Navigation: Indicator Controls > Canvas Control >

Indexed Images

 

 

 

 

 

The Canvas control supports the use of indexed images, which allow the background to change when data is received. The background image file names must be in the format of:
 SameFileDescriptor-number.filetype

The 7-Segment indicator is one of the examples, using images, which will show 7-segment images 0 to 9 over a range of 0 to 100 for a data value:
 7seg-0.jpg, 7seg-1.jpg, 7seg-2.jpg … 7seg-9.jpg

To aid the user in the math needed to display the 0 to 9 images, several properties exist:
 value                                  Holds the value to calculate the image index value based on scaling.
 imageIndexOn                     Enables using the imageValue to display the appropriate background image.
 indexMin                           Defines the lowest image index number (0).
 indexMax                          Defines the highest image index number (9).
 indexScaleMin             Defines the lowest data value to use for the first image (7seg-0.jpg), 0 by default.
 indexScaleMax                     Defines the highest data value to use for the highest image value (7-seg-9.jpg), 100 by default.

When the value property is set, the data will be scaled to show the corresponding image. For example, using index values of 0 to 9 for scale range of 0 to 100 will show appropriate values for the values of 0 to 100, such as a 2 for a value of 20, 6 for 64, and so on. This is the default property and will be updated using the Update Value, such as placing [ain0] to show based on the value of analog 0.

 

 

 

Copyright © 2024 SelmaWare Solutions, LLC