How to use class in popup?

Hi

I have additional Motors where the tags are structured in a Class. 

I would like to create a single popup for Motor, and in the open popup command change the tag prefix to the class the tags used in the popup.

How is that possible? 

I know that I can use the Motor[ID].Cmd_Start syntax if the motors are in an array, but in this case the motors will not be in an array. 

Motor1.Cmd_Start

Moto2.Cmd_Start 

How can make Motor1 dynamic in the popup?

Thanks