Greetings,
You are correct. This example needs to be modified. The array of offset data should be indexed so that only one scalar value is subtracted from each element in the array of data from one channel. I have attached a modified version of the example.
Good luck with your application.
Spencer S.