Hi,
I am attempting to get a basic communication with a Chroma power supply (62012P-40-120) using pyVisa as backend.
My issue is that it does not send termination characters and I did not find out how I could set the pyVisa termination characters ('\r\n')with python-IVI.
Here is the code I am using:
import pyvisa
pyvisa.log_to_screen()
import ivi
from chroma_62000P import *
import time
ivi.set_prefer_pyvisa(True)
dcps = ivi.chroma.chroma62012p40120("USB0::0x1698::0x0837::009000000571::INSTR", id_query = True, reset = True)
chan = 0
dcps.outputs[chan].enabled = False
dcps.outputs[chan].voltage_level = 24.0
dcps.outputs[chan].current_limit = 5.0
# Enable output
dcps.outputs[chan].enabled = True
time.sleep(2)
# Turn off output
dcps.outputs[chan].enabled = False
dcps.close()
Here is some pyVisa debug outputs:
2016-11-03 15:37:47,374 - pyvisa - DEBUG - viWrite(74591104, b'*CLS', 4, 'c_ulong(4)') -> 0
2016-11-03 15:37:47,427 - pyvisa - DEBUG - viWrite(74591104, b'*IDN?', 5, 'c_ulong(5)') -> 0
Best regards
Arnaud