You can’t discuss animation without giving due respect to Eadward Muybridge and his race
horse experiment.
In the late 1800’s there was a hot debate: people wanted to know if all four of a race
horses legs ever left the ground all at the same time.
If you look at early paintings of horses racing like this one, you will see all four legs
are extended when they are off the ground.
A single photograph taken by Eadward Muybridge like this proved them all wrong.
The only time a horses legs were off the ground was when the front legs were back and the
rear legs were forward – exactly the opposite of how paintings had been done up until this
time.
Muybridge then went onto create animations by placing a series of cameras side-by-side.
As the horse went by the camera, it tripped a string attached to the shutter of the camera
producing a sequence of images like this.
Later a timer was added and the motion picture industry was born.
Creating a little animation like this on the C-More Micro is easy.
A TAG – like this animation index tag right here – is used as an index into a table
of images.
As the PLC increments the TAG, the image on the screen changes.
I have F1 setup to increment that TAG here since we don’t actually have a PLC connected.
So each time I press this we get a new frame and we see the horse moving.
F2 resets that index, and if I just hold down F1 it looks like the horse is running.
So normally you would program the PLC to increment this from 0 to 14 and then wrap back around
to zero and repeat.
I simulate that by pressing F2, hitting F1 to increment, and then hitting F2 to wrap
it back around.
Lets see how to set that up.
This banner is just a static text object.
That’s easy.
Down here we dropped a multistate bitmap object – if I look at my objects .. come down to
bitmaps … I see this multi-state bitmap object – I simply drop that onto the screen
– this guy right here – and fill it in with the appropriate data.
The first thing you want to do when creating an animation is make sure you increment this
by the image number – if you use it by bit number the C-More Micro will be expecting
a bit to be shifted along a word.
We are going to use the actual image number for our index.
We also have to decide what we want to do if we get an error.
Suppose you are missing an image or the index gets too big.
We could display an error message, we could display a blank image or we can just display
the previous image, which is what we have selected here.
We are going to use this animation index tag as an index into our table.
On the next tab, the Image tab, you simply load your images.
So each of the individual images, which you can scroll through here and get a little preview
up here in the left corner – it also shows you a preview on the screen –
are all in sequence in this table.
These arrows right here MOVE the images – be careful – they don’t sequence through
them.
If I want to move image 1 down to slot 4, then I would simply bump it down like this.
I don’t want to do that here – it needs to be back here.
You can also use this to move the images around.
For this project we want to lock the aspect ratio and stretch it to fit so they all have
a uniform size.
We don’t need the transparency here so we can turn that off if we want to.
Note that you have to do that on an image by image basis.
Since we don’t have anything behind it we don’t need to worry about it.
Finally, we need a way to test this in simulation without a PLC connected so we put an Increment
object here, selected just the increment mode – we want to increment, not decrement – we’ll
limit the range from 0 to 14 because we have 15 images, and we want to increment this animation
index each time this button is pressed.
In addition, we want a pushbutton to reset that, so we will use a recipe button and that
recipe will only have one entry.
It’s going to take this animation index and set it to zero each time someone presses
that button.
That’s all there is too it – now we just pop over to our simulator, and try it out.
F1 should increment my index – when I get to 14 it stops, so I reset it with F2 and
do it again.
The same concept can be used on the black and white panel – I just reduced all of
those images to black and white copies – otherwise everything else is the same.
That’s it for creating a horse race animation on the C-More Micro – be sure to check out
the other How To Animate examples in this video series.
And as always, please send us any topics you would like to see covered – or - any other
comments for that matter – we appreciate the feedback