Can we use RoboDK for example and learn by the generated programs?
What do you want to learn? RoboDK will output motions, but I'm not sure if it does logic commands. It will teach you a little about KRL, but not a lot.
OrangeEdit would be somewhat more helpful, in that it handles Inline Form programming, and it is pre-programmed for most of the KRL syntax, system variables, and system functions. But it still doesn't explain things.
What you really need is to study the manuals in the Manuals sub-forum.