Skip to main content

help understanding and using keyframes

Posted in

Hi

I've just gotten my time lapse rig built using OMTE / arduino / stepper motor. Everything seems to be working fine and i am extremely impressed with it all. I can run a simple test script to fire the shutter and move the motor between shots for 10 cycles. It works.

I have been experimenting with keyframes as i have plans to add another axis to my rig and would like to program that axis part way through a routine. The problem is I cant seem to get my head around how this is executed.

I've studied the test-prog.slim example and added a couple of lines to my script to try and stop my routine after 5 shots, however, with the entries; "action program 0 stop" and "keyframe camera 0 5 0" the program does not stop after 5 shots.

This is confusing. What is even more bewildering is that in the getting started article, for actions its states:

An example of creating an action:

[8] > action 1 motor enable 0 1

According to CL help, that syntax is wrong, the action index number comes after the action type. In Slim, the above example gives an error.

Can anyone tell me whats going wrong? and how to correctly write an action and corresponding keyframe that will stop the program after so many shots.

My script is below:

#debug 1

# connect

port /dev/ttyACM0 # note this is a windows com port notation!
c # short-hand

# motor settings

echo Motor settings

echo ---> Base Speed=20, Dir=0

motor 0 enable 1
motor 0 dir 0
motor 0 steps 200

# camera settings

echo Camera Settings
echo ---> 2sec 150ms/200ms ON

camera cycle 3
camera exposure 150
camera post 200
camera on

# actions

echo Actions

action program 0 stop

# keyframes

echo Keyframes

keyframe camera 0 5 0

echo Executing Program - Complete in approx.2 minutes

start

Hi Russ, Sorry about the

Hi Russ,

Sorry about the error in the getting started article!

Your syntax is correct, and, in fact, does exactly what you want it to do for me. (That script causes the program to stop after five shots every time I try it.) What version of the firmware and slim are you using?

Without using the stop action/keyframe combo, what does it report when you issue the following commands while the program is running?

> status shots
> status running

If shots count isn't increasing, that may be the problem here.

!chris

Hi I've had a look at what

Hi

I've had a look at what versions i've got, and i'm a version behind. I had followed the install instructions for linux to the letter so i had perl api version 0.02 and slim version 0.11 without noticing that there were newer versions available! I've installed them again this time with the perl api 0.03 and slim 0.12 and now it seems to be working. My program stops after 5 shots. Just for your info I'm also using OMTLE version 0.82. I'll run some tests with a few more actions just to make sure its working properly, but so far all seems to be well.

Thanks for your help!

Russ