Cognex revenue rose 17% to a record $291.3M while operating expenses fell 3%, lifting operating margin to 29.4% from 17.4% and diluted EPS to $0.43 from $0.24.