Thanks Binki!
it seems to be right, but, I dont know, i am just a student i am doing this cost calculation for a company for my graduation project, cuz from what i have learnt from text book machine energy costs are always treated as an overall cost that needs to be allocated on some base to the order, that would be easier.
Now for this real-world situation I got confused buz if you calculate it as the way you said, does it mean that the energy costs for a machine is a direct cost? which is so different from what i have learnt from school

(...
I have stuck to this forever now for my project... maybe this is a real-world way to calculate the cost....
Thanks for your reply anyway... but I am still confused....