PDA

View Full Version : Bitmap Variables



Alvxx1
05-10-2016, 02:15 PM
I've made a few applications using the CR0451 and never had an issue with displaying bitmap graphics. But the latest project I am building has a particular image with multiple variations, so I tried to use the Bitmap Variable to switch the graphic dynamically.

I used the following code in 'ST'


Case P_IMAGE_CASE of

0: P_IMAGE:='P0RLE.bmp';
1: P_IMAGE:='P1RLE.bmp';
2: P_IMAGE:='P2RLE.bmp';
3: P_IMAGE:='P3RLE.bmp';

End_Case

This works perfectly when simulated in codesys, but when loaded in the CR0451, the bitmaps don't display. The full path of the images are in a sub folder called resources, but according to the help file you don't need to declare the preceding folder(s) as long as the full path is declared in the bitmap list (in the extra menu - which I've done).

Can anyone point me in the right direction? I'm really hoping to use the variable bitmaps as it would make this project and future ones much easier!

Thanks in advance!

Erik Gerrits
05-10-2016, 03:11 PM
The CR0452 and CR0451 do not support bitmap lists. For that functionality you need to setup to the 7".

Alvxx1
05-10-2016, 03:22 PM
Thanks for that, shame really as it would have made things easier!

I'll just revert to the "Case Of" turning a Bool value on to make the graphic invisible instead.

Erik Gerrits
05-10-2016, 03:23 PM
I agree. There are quite a few times this feature would make life easier.

yinchenjia
07-07-2016, 07:21 PM
I created a bitmap lists from 0 to 9 at bigger size because CR0452 supports up to 48 font size.

The bitmap list works very well but it seems like that the total image quantity is limited to 10. I am right on the edge...