Caterpillar delivered better-than-expected earnings per share but faced softer-than-anticipated revenue.