modeling own crossing conveyor

Continuing the discussion from Use crossing conveyor with PLC:

Hi All

In a previous topic i asked how we could best use the croosing conveyor.
Now i know we need to script it by ourself, but i have really problems to do so.

Doe any one have an example for changing a path from font,back to left, right. when the product is allready on the conveyor?
And also to move up or down before the next movement starts?

Thanks in andvance!