Hello,
I tried writing a remote waveform display program for the scope. I am not using VISA or SICL mut just writing plain commands over the ethernet connection.
In my program I have a separate thread for scope communication.
First I set up the ACQ parameters
:STOP
:ACQ:TYPE NORM
:ACQ:COMP 100
Then I send the following commands in each loop execution in this order:
Update Trigger values if they have changed
:TRIG MODE EDGE
:TRIG:EDGE:SLOP POS
:TRIG:SWE NORM
:TRIG:EDGE:LEV <volt> ,CHAN<chan>
Get waveform
IG / :SINGLE
:WAV:FORM BYTE
:WAV:SOUR CHAN<chan>
:WAV:POIN:MODE MAX
:WAV:POIN <number of points>
:ACQ:POIN?
:WAV:POIN?
:WAV:PRE?
:WAV:DATA?
store data
:RUN
My program seems to work fine, when trigger fires, but the problem is that if I specify a trigger value that will never fire, the scope buffers all consecutive commands (*CLS, *RST, trigger level reset, everything). This causes a problem, because I cannot reset the scope or anything remotely that would restore the scope to a state in which it would start processing commands again. So in my software's point of view the scope is just unreachable. Even the scope's Trigger level **** does not change the trigger level setting until I press Run/Stop -button.
Agilent support suggested using :SINGLE instead of IGitize (thats why they are both in the command list above) but it seems that result is the same with both of them. The only solution I have found to this are eiher using TRIG:SWE AUTO and checking the waveform buffer, if there really is a value matching the trigger setting, but it is a little bit awkward and inaccurate.
I would appreciate any advice on what I should change to get the TRIG: SWE NORM working.
BR,
JMa
I tried writing a remote waveform display program for the scope. I am not using VISA or SICL mut just writing plain commands over the ethernet connection.
In my program I have a separate thread for scope communication.
First I set up the ACQ parameters
:STOP
:ACQ:TYPE NORM
:ACQ:COMP 100
Then I send the following commands in each loop execution in this order:
Update Trigger values if they have changed
:TRIG MODE EDGE
:TRIG:EDGE:SLOP POS
:TRIG:SWE NORM
:TRIG:EDGE:LEV <volt> ,CHAN<chan>
Get waveform
IG / :SINGLE
:WAV:FORM BYTE
:WAV:SOUR CHAN<chan>
:WAV:POIN:MODE MAX
:WAV:POIN <number of points>
:ACQ:POIN?
:WAV:POIN?
:WAV:PRE?
:WAV:DATA?
store data
:RUN
My program seems to work fine, when trigger fires, but the problem is that if I specify a trigger value that will never fire, the scope buffers all consecutive commands (*CLS, *RST, trigger level reset, everything). This causes a problem, because I cannot reset the scope or anything remotely that would restore the scope to a state in which it would start processing commands again. So in my software's point of view the scope is just unreachable. Even the scope's Trigger level **** does not change the trigger level setting until I press Run/Stop -button.
Agilent support suggested using :SINGLE instead of IGitize (thats why they are both in the command list above) but it seems that result is the same with both of them. The only solution I have found to this are eiher using TRIG:SWE AUTO and checking the waveform buffer, if there really is a value matching the trigger setting, but it is a little bit awkward and inaccurate.
I would appreciate any advice on what I should change to get the TRIG: SWE NORM working.
BR,
JMa
communication until it has finished executing. Since it is waiting for
a trigger, all subsequent commands get queued up(until the queue overflows). Drop the :dig and use the :single and things should work better.
If you still have problems, you will need to develop an exit strategy.
You can monitor the trigger bit with the :TER? query. If it does not return
a +1 in a reasonable amount of time, you need to exit your progam and
send a Device Clear to the instrument. This should regain control.