DspBmp
- Last UpdatedJul 18, 2023
- 1 minute read
Displays a bitmap at a specified AN. This function allows you to display any bitmap file at run time. (You can get a new bitmap file from operator input or from the plant, and display it dynamically.)
Note: This function was designed to only be used on Cicode objects, or the animation point object from the version 3.xx/4.xx toolbox.
Syntax
DspBmp(nAN, sFile, Mode)
nAN:
The animation-point number.
sFile:
The name of the bitmap (.BMP) file. The file needs to be in the user project path. (Only .bmp files are supported. Other image formats like .png or .jpg are not supported.)
Mode:
The mode of bitmap display:
0 - Erase the existing bitmap and display this bitmap.
1 - Do not erase the existing bitmap, just draw the new bitmap. (This mode provides smoother animation than Mode 0, but the bitmaps needs to be the same size).
2 - Do not erase the existing bitmap, just draw the new bitmap. This mode is similar to mode 1, but it displays the bitmap about 3 times faster. However, the bitmap should not contain any transparent color, or it will display as a random color. Use this mode for fast, smooth animation.
Return Value
0 (zero) if successful, otherwise an error is returned.
Related Functions
Example
// Display the bitmap "MyImage.bmp" at AN 60
DspBMP(60, "MyImage.bmp", 0)