Hi,
It looks like you are taking the length of one array whose length is not the same as the array that you are trying to write. Try changing the length of the number of scans to be the length of the array that you are writing.
If that doesn�t work take a look at the following shipping example.
Help>>Find Examples
Browse>>Browse According To>>Task
Hardware Input and Output>>Traditional DAQ>>Digital Input and Output>>653x>>Buffered Pattern Output.vi
Let me know if you have the same error here or not.
Best regards,
Justin T.
National Instruments