Hello -
My boss asks, "SWGuy, can you write something to grab data from the TDS2024 in the lab? It uses a USB link.."
Platform: Windows XP Pro SP3, USB 1.1 built-in, 512M RAM. Pentium 4 @ 1.8 GHz.
Compiler: Visual C++
VISA: TekVISA 3.3.3.4 (Good job on the install.. dropped right in, no arguments.. and the examples have all the DLL settings in the DSW file pointing to the right place).
Manual says to throw the 'scope into ACQ:STOPafter SEQuence mode then issue ACQ:STATE 1 commands to arm the trigger. Add *OPC? to that and voila! Read a '1' after the 'scope is done acquiring. Yes, a few other command need to be issued to get everything working.. but that's OK.
For example, I wanted to avoid messing with setting the USB timeout.. and so send *OPC? then viReadAsync() to sit in viWaitOnEvent() waiting for that '1' to appear. (By the way, does the channel need to have the VI_EVENT_IO_COMPLETION set for each use of an async read call? Or just once? Also, I don't recall reading anything about mixing asynchronous and synchronous calls (viReadAsync and viRead respectively).
Transmitting WAVF? retrieves everything. Some work with strstr() and I have the data.
But ... this... thing... is.. slow. Call Monitor says 1.6 seconds to transfer 2766 bytes on a USB 1.1 bus. Does it really take the 2024B that long to send binary data (DATA:WIDTH 1 and DATA:ENCdg RIBinary are sent during initialization) over the bus or am I mistreating the I/O system?
Your time is appreciated.
