Hey @alfred, welcome!
In this thread we responded to someone who had a somewhat analogous sounding application with many input fields:
I have a sort of wrapper for NuPIC which makes parallel models for each of the different fields, calibrating each based on the descriptive stats of their first n rows. The anomaly score outputs can then be used to monitor for system anomalies – when a number of the metrics are being anomalous at the same time. How many rows do you have for each of the 40?