Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

trigger.model.abort() doesn't abort if asked *opc?

DMM7510 7½-Digit Graphical Sampling Multimeter
Forum rules
<t></t>
Post Reply
bruce.kristy
Posts: 1
Joined: July 18th, 2017, 6:37 am
Country: United States

trigger.model.abort() doesn't abort if asked *opc?

Post by bruce.kristy » July 18th, 2017, 7:55 am

Hello,

*idn?
KEITHLEY INSTRUMENTS,MODEL DMM7510,04309750,1.6.3d

I am running a trigger model remotely via telnet to sense an analog measurement event. The trigger model works well when the event occurs, however when the event fails to happen I would like to be able to abort the model and move on to a different routine. The method I am using with other commands to determine completion is *opc?

It appears with the trigger model that if *opc? is used after trigger.model.initiate() the input buffer fails to see the command trigger.model.abort()

Is there another way to know when a trigger model has completed the measurement event?
The following is the sequence I am sending the DMM prior to the analog trigger event.

dmm.measure.func = dmm.FUNC_DC_VOLTAGE
dmm.measure.autozero.enable = dmm.OFF
dmm.measure.range = 1
dmm.measure.analogtrigger.mode = dmm.MODE_WINDOW
dmm.measure.analogtrigger.window.levelhigh = 0.1
dmm.measure.analogtrigger.window.levellow = 0.02
dmm.measure.analogtrigger.window.direction = dmm.DIRECTION_ENTER
samp_count = 50
test1 = buffer.make(samp_count)
trigger.model.setblock(1,trigger.BLOCK_BUFFER_CLEAR, test1)
trigger.model.setblock(2,trigger.BLOCK_WAIT, trigger.EVENT_ANALOGTRIGGER)
trigger.model.setblock(3,trigger.BLOCK_MEASURE, test1, samp_count)
trigger.model.initiate()
*opc?

---Some time passes and the measure event doesn't happen---

trigger.model.abort()

At this point the UI still displays WAIT with the wait icon, and doesn't recognize any subsequent commands.

If I try the above sequence without *opc? the model aborts fine, however my program doesn't have a good way to know if the DMM has finished the measurement trigger.

Andrea C
Keithley Applications
Keithley Applications
Posts: 1323
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: trigger.model.abort() doesn't abort if asked *opc?

Post by Andrea C » September 24th, 2017, 6:49 am

You might try obtaining the trigger model state rather than using OPC.

present_state, n = trigger.model.state() -- state, present block number

If the analog trigger has not yet occurred, it should be at the WAIT block.

JBrown54
Keithley
Keithley
Posts: 20
Joined: December 14th, 2016, 10:42 am
Country: United States

Re: trigger.model.abort() doesn't abort if asked *opc?

Post by JBrown54 » September 28th, 2017, 5:59 am

I'll second the use of trigger.model.state(). While pairing TSP code with the small subset of allowable SCPI commands will work, using the TSP-based functions is the optimal way to go. This function not only allows a user to determine the present state of the trigger model, but it will also report the trigger block number that it is actually on when the instrument receives the command. This could be very useful in a debugging situation.

Post Reply

Return to “DMM7510 Graphical Sampling DMM”

Who is online

Users browsing this forum: No registered users and 2 guests