Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

C++ GPIB Code Too Fast?

Highlighted
I have written some software in Microsoft C++ to send commands to a Wavetek
3600D. When I run the program, none of the commands appear to be written to
the instrument and I get an ENOL error. However when I run the same program
with NI-Spy active, it usually works fine with only an occaisional ENOL
error after sending *RST. It seems to me that the straight program may be
executing too fast for the instrument. Is there a reliable C++ method to
make sure a command is executed before going to the next?

Thanks,
cledus
0 Kudos
Message 1 of 2
(2,112 Views)
Highlighted
This is not a problem specific to C++.
In general, some instrument goes bad if you send a lot of
commands at once. How to solve this are normally:

1) Insert "wait" routine between the send commands as need.
2) Insert "query" command and its reading response as need.
This normally makes your instr synchronise command parsing
and internal processing.

Hope this helps
Rai

cledus wrote in message ...
>I have written some software in Microsoft C++ to send commands to a Wavetek
>3600D. When I run the program, none of the commands appear to be written
to
>the instrument and I get an ENOL error. However when I run the same
program
>with NI-Spy active, it usually works fine with only an occaisional ENOL
>error after sending *RST. It seems to me that the straight progr
am may be
>executing too fast for the instrument. Is there a reliable C++ method to
>make sure a command is executed before going to the next?
>
>Thanks,
>cledus
>
>
>
>
0 Kudos
Message 2 of 2
(2,112 Views)