MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_27.py
1 import time
2 import mates
3 with mates.Mates("proxy.mon", 1) as m:
4  if m.discover_node(m.mates_dio3_mk1_1):
5  # Generate quadrature waveform on OUT01 and OUT02 at 100 Hz.
6  m.enable_generators(m.mates_dio3_mk1_1, False)
7  m.setup_generator(m.mates_dio3_mk1_1, 0, 10000, 0, 5000)
8  m.setup_generator(m.mates_dio3_mk1_1, 1, 10000, 2500, 7500)
9  m.enable_generators(m.mates_dio3_mk1_1, True)
10  # Generate for 2 seconds.
11  time.sleep(2)
12  # Disable the generators and clear the outputs.
13  m.setup_generator(m.mates_dio3_mk1_1, 0, 0, 0, 0)
14  m.setup_generator(m.mates_dio3_mk1_1, 1, 0, 0, 0)
15  m.enable_generators(m.mates_dio3_mk1_1, False)
16  m.set_dout_all(m.mates_dio3_mk1_1, 0)