Revision history [back]
I think the proper way to do that is using macind to get the mc value of the machine, and then assign the values to the arrays wipcmd and wiqcmd. Using this method, you don't have to import any other model inside the controller one, and you can control multiple and configurable machines.
Example: into the controller model
call macind(bus_mac, id_mac, mc_mac, ierr)
wipcmd(mc_mac) = var(l)
wiqcmd(mc_mac) = var(l+1)
where:
bus_macis the bus number where the inverter is (ibusif the controller use the same machine).id_macis the id of the machine inside the bus.mc_macis the position of the machine in the arrays.