0

I am trying to get my IVI drivers working using comtypes. So far I have been successful in initializing the instrument thanks to Python instrument drivers more specifically Jorenko's post, as he is using the same instrument as me (I'm hoping he sees this as he seems to work for the company that makes the instrument).

So far I have:

from comtypes import client
dmm = client.CreateObject('VTEXDmm.VTEXDmm')
dmm.Initialize('TCPIP::10.20.30.40::INSTR', True, True)
dmm.Initiate()
dmm.Measurement.Read(1000)
#dmm.Measurement.Fetch(1000)

This works fine for taking readings from the default state, which is DC Volts, but I can't figure out how to set other functions. I've tried

dmm.Function = VTEXDmmFunctionACVolts

and had no joy with it.

It's worth noting that I have very little experience with IVI drivers.

Can someone please point me in the right direction

Thanks

Community
  • 1
  • 1
Kierran Purden
  • 451
  • 1
  • 5
  • 15

2 Answers2

0

Answered my own question (after much trial and error)

For anyone interested, I had a bit of success with the following

import comtypes 
from comtypes import client
dmm = client.CreateObject('VTEXDmm.VTEXDmm')
dmm.Initialize('TCPIP::10.20.30.40::INSTR', True, True)
dmm.Configure(Function=comtypes.gen.VTEXDmmLib.VTEXDmmFunctionACVolts, Range=1.0, Resolution=0.0001)
dmm.Initiate()
dmm.Measurement.Read(1000)
Kierran Purden
  • 451
  • 1
  • 5
  • 15
0

There's a brief guide to using the comtypes library with IVI drivers in the Keysight programming guide for the M924x.

It contains example code as well.

  • 2
    While the link might provide an answer now, it might change in the future or won't be available anymore. It is better to put the relevant parts into your answer. – Korashen Dec 08 '20 at 16:34
  • I'm sad to inform that Korashen prediction came true - The link is broken... For now - try https://www.keysight.com/us/en/assets/9018-18085/programming-guides/9018-18085.pdf?success=true – DarkLight Jul 11 '23 at 06:45