Moku model: Moku Pro
Operating system: Ubuntu 22
Software version: 587
I’m trying to log phase meter data and save it on my computer. Unfortunately, it doesn’t work.
Sample code is:
m = MultiInstrument('192.168.###', platform_id=4,force_connect=True)
# wg = m.set_instrument(1, ArbitraryWaveformGenerator)
wg = m.set_instrument(1, WaveformGenerator)
wg1 = m.set_instrument(2, WaveformGenerator)
osc = m.set_instrument(3, Oscilloscope)
ph = m.set_instrument(4, Phasemeter)
# wg1=m.set_instrument(2, ArbitraryWaveformGenerator)
# osc = m.set_instrument(2, Oscilloscope)
# connections2 = [dict(source="Input1", destination="Slot1InA"),
# dict(source="Slot1OutA", destination="Slot3InA"),
# dict(source="Slot1OutA", destination="Output1"),
# dict(source="Input2", destination="Slot2InA"),
# dict(source="Slot2OutA", destination="Slot3InB"),
# dict(source="Slot2OutA", destination="Output2")]
connections = [dict(source="Input1", destination="Slot1InA"),
dict(source="Slot1OutA", destination="Slot3InA"),
dict(source="Slot1OutA", destination="Output1"),
dict(source="Input2", destination="Slot2InA"),
dict(source="Slot2OutA", destination="Slot3InB"),
dict(source="Slot2OutA", destination="Output2"),
dict(source="Input3", destination="Slot4InA"),
dict(source="Input4", destination="Slot4InB"),
dict(source="Slot4OutA", destination="Output3"),
dict(source="Slot4OutB", destination="Output4")
]
#connection2 works.
print(m.set_connections(connections=connections))
# wg.generate_waveform(channel=1, sample_rate='Auto',
# lut_data=list(m_sequence_output[1]), frequency=80e6,
# amplitude=1)
wg.generate_waveform(channel=1,
type='Sine', frequency=80e6,
amplitude=1)
# wg.generate_waveform(channel=2, sample_rate='Auto',
# lut_data=list(sine), frequency=100e6,
# amplitude=1)
wg1.generate_waveform(channel=1,
type='Sine', frequency=85e6,
amplitude=1)
osc.set_timebase(-5e-8, 5e-8, strict=False) #this has to be set well to work.
data = osc.get_data(timeout=60, wait_reacquire=False, wait_complete=True)
data2=ph.get_data()
response=ph.start_logging(duration=60)
ph.start_logging(duration=60, comments='Sample_Script')
file_name=response['file_name']
local_path='/home/lab/Desktop/DI/Data/'
target='persist'
ph.download(target, file_name, local_path)
I keep getting [Errno 2] No such file or directory: …
yet the directory exists.
Do you know why I’m facing this?