Regarding the mysterious error message: this is being passed from the 816x Plug&Play driver used by the IL engine.
In this case the command is for setting up the scan, prepare_mflambdascan. The details of these commands are in the help file installed with the driver.
The full command is
hp816x_prepareMfLambdaScan(ViSession ihandle, ViInt32 powerUnit, ViReal64 power, ViInt32 opticalOutput, ViInt32 numberofScans, ViInt32 PWMChannels, ViReal64 startWavelength, ViReal64 stopWavelength, ViReal64 stepSize, ViUInt32 numberofDatapoints, ViUInt32 numberofChannels);
So the 10th parameter is the returned number of data points, calculated from the start, stop and step wavelength parameters. Possibly the chosen values of these gave a larger number of points than supported by the power meter. Many sensor modules are limited to 20k points, while the 81636B and N7745A power meters support up to 100k samples in this application.