Some one sent me an email with the following questions:
[quote]
Dear Sir

Thankyou for the excellent Photoelectric effect applet which has helped my students immensely.
I think ther may be a small bug or two:

(1) When I click play, the voltage jumps to the cut-off voltage (though it would be nice if it started at a pre set value of my choice), and shows zero current. Then the next voltage is shown (0.3 more than the cut-off voltage), but current is still zero. If the first voltage was the cut-off voltage*, the next voltage should produce a current greater than zero.

* I am assuming the first voltage is the cut-off voltage, as it equals the photon energy - work function (KEmax ejected electron = Vcut-off

(2) If a high photon energy is selected (e.g. 4 eV), the horizontal axis fails to show the cut-off voltage.
[/quote]

It is not the bug of the simulation. It is because I want to simulate the real experiment as much as possible.
So several parameters are generated with random number.
In real case, there might be more than 10^15 photo electrons. But I can only use hundreds of simulated electrons.
So I only calculated the current at the end of each turn. (The current was calculated with how many electron reach another side in a fixed period-10 seconds.)
That is why the current did not show up at the moment when the voltage change. It take time to get a better  average.
If I calculated it with shorter interval (1 second), you will find the value changing all the time. (Student might be more confused). I will leave this to the teacher to explain it. Or any one has a better suggestion?

Look at the simulation in another way: The time scale in the simulation is less than ns (correspond to 1s in real life, so wait for a few second to get the averaged current is required.).
I think we should teach our students that experiment measurement data are mostly average value within finite time(or space) interval(The interval could be very small, but it is not a mathematic point in the time/space scale)

If you un-check automatic check box. Then, it will do what you want.
When it was checked, it will try to do the whole experiment (select
appropriate voltage at different time) for you automatically.