The array input is supposed to contain a number of elements equal to the number of channels being targetted by the command. For example, if you write to "Channel 0" of a FP-AO-200, then you would have a single element in the array. Likewise, writing to the "All" channel means you need to have 8 elements in the array otherwise you will return error code 32800. The probable cause for you to see a pulse, is if you write a value in one interation of the loop, then on the next iteration write a 0.
Regards,
Aaron G