Cognex shares are trading higher after Goldman Sachs upgraded the stock from Sell to Buy and raised its price target from $42 to $50.