I think there is already work done on programming emotions using AI in robots. It is also seen in the electronic games we play.
I think emotions is based on experiences and our senses. It is possible to programme these "logic" into a machine. Input A -> Output B
But it is hard to make it feel about it. For example, it is difficult to make it enjoy what it is programmed to do. Because it has no desires. And desires, if uncontrolled, can make one do inexplicable things; and the rational mind becomes irrational.
Maybe eventually an AI model can take on some emotions through smart programming, it I think it will be one dimensional. Because if we look at emotions on the whole, it sometimes contradicts each other. It's like a big rojak of morals, ethics, rules, laws, social interaction, politics, experiences and etc etc etc. Very hard to break down into logical statements.