I'm reading ASCII trace data from an instrument, and every so often I get an unrecoverable System.ExecutionEngineException. I'm pretty puzzled by what's going on, and would appreciate any advice any of you could offer. Here are the details:
I'm using an NI GPIB-USB-B interface. My software is written in C#, and uses the .NET class libraries that ship with the interface. The computer's OS is Windows XP professional, SP2. I'm pretty sure I have the most current versions of the drivers, etc.
I'm trying to read a large (~10k bytes) trace from an HP 8720A network analyzer. I use the .NET NationalInstruments.NI4882.Device.ReadString() method to read the data. I notice that the larger the trace is, the more frequently the error occurs. With 1kbyte transfers, I never get the error. With 5 kbyte transfers, the errors occur occasionally, and with 10 kbyte transfers they are frequent. As far as I can tell this type of exception is unrecoverable and uncatchable, so the only alternative is to abort the program and try again.
I've tried setting the Device.DefaultBufferSize and Board.DefaultBufferSize properties to be sufficiently large, but it doesn't seem to help. I've also tried using the Device.ReadString(int NumBytes) method to read a fixed number of bytes in, to no avail.
If anyone can offer some guidance to me, I'd appreciate it, as I seem to have run out of tricks. It looks to me like there's some kind of bug in the ni4882 driver, and I fear there may be no workaround.
Thanks for your time,
Terry Noe
terry_noe@beehive-electronics.com