Investors were prepared for muted financial results last quarter from Cognex (CGNX -1.03%). The machine vision specialist had warned investors that several of its largest customers -- particularly in the OLED display and smartphone manufacturing markets -- appeared to be spending less in 2018 than they had in the prior year. Imagine Wall Street's surprise, then, when Cognex reported much higher than expected sales, which ran well above the company's meager forecast.

Cognex is scheduled to release its third-quarter financial report after the market close on Monday, Oct. 29. Let's take a look at the company's surprising performance last quarter to see if it can shed any light on the things to come.

Robotic arms assembling cars in a factory

Image source: Getty Images.

A broken record

For the second quarter, Cognex reported revenue of $211 million, up 19% year over year, exceeding both analysts' consensus estimates and the high end of the company's forecast. During the conference call, Chairman Robert Shillman pointed out that revenue for the quarter was the second-highest in the company's 37-year history. Earnings per share of $0.32 also came in higher than expected. 

Gross margin of 74% was at the lower end the company's forecast, as better-than-expected sales came from lower-margin, application-specific customer solutions. Because of the sophisticated nature of its technology, Cognex will help certain customers with implementation, particularly those with the high potential for future sales. By taking a hit to margins over the short term, the company gains increased future opportunities.

What to expect going forward

After last quarter's blowout, investors may be looking for more of the same, but Cognex isn't. The company is forecasting revenue between $220 million and $230 million. This would represent year-over-year declines in a range of 11% to 15%, due to tough comps against a record quarter in the prior year. Gross margins are expected to top out in the mid-70% range, and operating expenses should be flat compared to the second quarter.

Cognex's management expects challenging comps for the remainder of the year due to record demand for factory automation related to consumer electronics -- especially OLED and smartphones -- and they're not expecting a repeat of last quarter's performance.

While investors shouldn't be concerned with analysts' quarterly prognostications, they can be helpful in providing context. Analysts' consensus estimates are calling for revenue of $227.36 million, a decline of 12.5% year over year, and near the high end of Cognex's guidance, and are expecting earnings per share of $0.37, down 35% compared to the prior-year quarter. 

The broad move to factory automation is expected to continue, in areas like logistics and automotive, so Cognex investors stand to gain over the long term from this trend. The company's technology helps increase productivity and is necessary for products that are too small to be assembled by the human hand -- like smartphone components. Investors with a long time horizon will likely be well-rewarded, but this earnings season, don't expect another blowout like Cognex produced last quarter.