Schneider Electric has agreed to acquire Arizona-based Cognite in an all-cash deal valued at $3.1 billion, the two companies announced.