Sanjay Mehta
Vice President of Chief Financial Officer at Teradyne
Thank you, Mark. Good morning, everyone. Today, I'll provide details on our Q2 results, offer additional color on how we're addressing the slowdown in some markets and supply shortages and others and describe our Q3 outlook. Now to Q2. Second quarter sales were $841 million with non-GAAP EPS of $1.21, non-GAAP gross margins were 60.2% and our non-GAAP operating expenses were $251 million, $14 million below mid guidance. The main driver -- sorry -- the main driver of the lower-than-planned opex was an Industrial Automation Group or IAG due to lower variable compensation tied to lower revenue projections and slower-than-planned hiring.
Non-GAAP operating profit rate was 30.3%. We had 210% customers in the quarter. The tax rate, excluding discrete items for the quarter was 16.9% on a non-GAAP basis. Please note, you should now use 16.5% for the full year non-GAAP tax rate. Looking at the results from a business unit perspective. Semi Test revenue was $541 million. SOC revenue was $461 million, driven by strength in automotive and industrial markets. Memory revenue was $81 million, led by Flash final Test and DRAM wafer sort. System Test group had revenue of $135 million, which was up 29% year-over-year. Storage Test sales, including both HDD and system-level Test solutions were $86 million in the quarter, up 49% from Q2 '21.
Defense and aerospace and production board Test combined grew 4% year-on-year. At LitePoint, revenue of $64 million was up 16% from prior year due primarily to strong shipments in WiFi 6E and WiFi seven and UWB Test systems. Now to Industrial Automation. Industrial Automation revenue of $101 million in Q2 was up 10% year-over-year. This was lower than expected, as Greg noted. Despite the lower growth, we still expect IA revenue to follow the historical pattern and grow as we move through the year. UR sales were $883 million in Q2, up 8% year-over-year with the highest growth in Northern Europe. MiR sales were $17 million, up 9% from Q2 '21 in the quarter. From a financial perspective, in IA.
The group was slightly under breakeven on a non-GAAP operating basis in the second quarter. And for the full year, we expect to be towards the low end of the 5% to 15% profit range we discussed in past calls. We view the roughly 20% growth rate in IA as a short-term situation, as Greg noted. Like the company model, the IAG Group operating model naturally Flex is spending down based on profitability, and we're tightening discretionary spending where appropriate. But our long-term IA growth strategy and related investment plans remain unchanged. Shifting to supply. Our Q2 guidance excluded approximately $50 million of revenue tied to our inability to supply customer demand.
In Q3, we're excluding a similar $50 million of revenue from our guidance range, primarily in our Test businesses. The shortage of semiconductors ranging from FPGAs to industrial analog continues to impact our production. As I've noted in prior calls, we're taking numerous actions to harden our supply chain but even with these actions, we expect supply line constraints to remain challenging. I will note these actions and other factors improved our supply situation in Q2, mainly in Test, which enabled higher shipments. Shifting to the balance sheet and cash flow. Our cash and marketable securities at the end of the quarter totaled approximately $900 million, down from $1.2 billion at the end of Q1. We had $70 million in free cash flow in the quarter, reflecting the timing of shipments and supplier prepayments.
Over 80% of our shipments occurred in May and June saw our DSO expanded to 74 days, which we expect will decline in the second half of the year. Other uses of cash in the quarter included share buybacks of $331 million, dividend payments of $18 million and debt retirement of $22 million. At the end of Q2, we're more than 2/3 of the way through our $750 million share repurchase plan for 2022 with $217 million remaining. In October -- sorry, in our October call, we'll note any updates to our share buyback plan. Regarding debt. To date, $386 million of convertible bonds have early converted. I'd also like to note several points regarding the strong U.S. dollar and its impact on our results. In our Test portfolio, the majority of revenue and expense are in dollars, so there's not a material foreign exchange impact.
In IA businesses, on the other hand, have a large amount of euro-linked expenses and about 50% of their revenue is tied to the euro. The result is the strong dollar reduces IA's revenue and gross margin in dollars. In the first half, the FX impact reduced our IA growth rate approximately four points. Assuming exchange rates remain consistent with July's exchange rate, we expect six points of growth headwind for the full year compared to our January projection. For IA, the strengthening dollar has a marginal benefit on the opex side. The revenue and margin degradation is offset by the opex gain, yielding a neutral effect on our operating profit for that segment. Now to our outlook for Q3. A combination of slowing demand and Test, extending lead times due to material shortages and reduced automation demand in Europe and China results in a lower Q3 outlook than we expected three months ago.
As noted, the guidance excludes approximately $50 million of shipments due to material shortages primarily in Test. Also, the guidance assumes we won't see any extended shutdowns of production facilities due to COVID, and we won't see any new trade restrictions. With that said, sales in Q3 are expected to be between $760 million and $840 million, with non-GAAP EPS in a range of $0.90 to $1.16 on 166 million diluted shares. The third quarter guidance excludes the amortization of acquired intangibles. Third quarter gross margins are estimated at 58% to 59%, down from Q2 due to product mix, 2022 investment supply chain resiliency and wage inflation. Some of these effects are transitory, and we expect our midterm earnings model gross margin range of 59% to 60% to remain intact.
Opex is expected to run at 31% to 34% of third quarter sales. The non-GAAP operating profit rate at the midpoint of our third quarter guidance is 26%. As Mark noted, we expect second half revenue to be below the first half, approximately 48% of full year sales. Given the reduced revenue outlook for the second half of the year, our operating expenses are now planned to grow just 4% to 6% annually versus 11% to 13% planned in our prior guidance. The opex reduction from prior guide is driven by two factors. First, our variable compensation model is approximately half of the decline tied to reduced revenue. Second, we have delayed some expenditures in both Test and IA, which we believe will not impact our long-run competitiveness.
Spending savings are roughly evenly split between engineering and go-to-market. Summing it all up, we're expecting revenue and profit in Q3 and the second half of the year to be lower than we projected three months ago, but our operating model is resilient to varying revenue levels. With the reduced revenue level, our model reduces variable compensation expense, and we're taking other steps as appropriate. A downturn is always challenging, but we're confident we have the operating model, strategy and experience to lead us through whatever lies ahead, while keeping our focus on the needs of our customers and the long-term opportunities in the Test and industrial automation markets.
With that, I'll turn things over to Andy.