For a second consecutive quarter, 3M Co.’s electronics and industrial businesses proved a thorn in its side, prompting the company to downgrade profit expectations for the year even as it reported record earnings per share for the quarter.

Second-quarter sales and profits both saw slight dips, mostly because of negative exchange rates and continued weakness in 3M’s consumer electronics/energy and large industrial businesses.

The electronics/energy business “continues to be impacted by weaker demand and elevated channel inventories in the consumer electronics market,” CEO Inge Thulin told analysts during a morning conference call. “We’ll [be] waiting until sometime in 2017 to see a change in consumer electronics.”

In the meantime, the Maplewood-based maker of Post-it notes, Scotch tape, sealants and more is focused on boosting sales in other businesses and on controlling costs by boosting efficiencies. With its relatively new “business transformation” strategy, 3M expects global service centers and streamlined practices to save $500 million to $700 million in annual operating costs by 2020, Thulin said.

3M’s highest sales growth in April, May and June came from its health care unit, which grew 4.9 percent. Consumer business revenue grew 2.7 percent. Safety/graphics rose 2.3 percent. In contrast, industrial fell 1.4 percent and electronics/energy plunged 9.1 percent.

3M’s stock fell 2 percent, or $1.97 per share, to close Tuesday at $177.66. Some analysts said they were not terribly concerned about the quarter’s shortcomings because of 3M’s diverse portfolio, solid profit margins and because it continued to do better than industry peers.

“Revenues were slightly lower than we expected, but we think 3M did a good job expanding operating margins,” said S&P Global Market analyst Jim Corridore.

Earnings fell 0.6 percent to $1.29 billion, or $2.08 per share, a penny higher than what Wall Street analysts expected, on average. Sales slid 0.3 percent to $7.66 billion, which was lower than the $7.71 billion consensus forecast by analysts.

The effect of foreign currency translations reduced total sales by 1.5 percent and offset gains seen from acquisitions, company officials said.

Edward Jones research analyst Matt Arnold said that the quarter overall had “no real surprises.”

“The company continued to demonstrate solid execution in a challenging economic environment,” he said. “While the reduced sales outlook is slightly disappointing, we believe it is reflective of the economic environment where growth remains elusive, and not anything within 3M’s control.”

Arnold maintained his “buy” rating on the stock, noting that 3M’s diverse product portfolio helps it “deliver more resilient earnings growth than industrial peers, with health care and consumer exposure serving as a nice buffer to weakness in the industrial economy.”

For example, Caterpillar on Tuesday reported that its second-quarter revenue fell 16 percent and downgraded its outlook for the year.

Thulin told analysts that he was generally pleased with 3M’s second-quarter results. 3M’s team controlled the controllable during an “uncertain” global environment, he said.

“We delivered another strong performance in the second quarter, marked by our highest quarterly earnings per share in 3M history, driven by increased margins,” he said. “At the same time, we were active in deploying capital.”

3M invested about 10 percent of its sales into research and development and capital expenditures during the quarter and plans to invest $1.3 billion to $1.5 billion in capital expenditures this year.

While analysts were encouraged by the investments, they peppered officials with questions about 3M’s electronics/energy business and when it was expected to improve.

Electronics sales alone plunged 14 percent during the quarter due to declines in electronics materials solutions and display systems, officials explained. Energy-related sales fell 2 percent as sales growth in telecom was offset by declines in electrical markets and renewable energy.

Beyond electronics and energy, companywide results benefited from boosted orders for roofing granules and safety/graphic commercial solutions. Health care sales grew across all product segments, especially in Latin America and Asia. 3M’s consumer business was helped by strong sales of painters’ tape, home improvement and consumer health care products. Officials said the back-to-school season was off to a good start, with help from 3M’s Command and Post-it products.

Companywide, Latin America, Canada and western Europe operations performed particularly well during the quarter. U.S. sales, however, grew just 0.4 percent, while sales from Asia Pacific fell 5.4 percent, mainly due to lackluster demand in electronics and industrials.

3M narrowed its profit guidance for the year and now expects 2016 earnings of $8.15 to $8.30 per share. That compares with the prior forecast of $8.10 to $8.45 per share.

3M downgraded its sales expectations, saying “same currency” sales in 2016 will grow between zero and 1 percent. That’s down from the prior forecast of 1 to 3 percent.