Changed model and script to allow plotting the port variables.