Пример #1
0
    autostep.move_to(0.0)
    print()

# -----------------------------------------------------------------------------
if False:
    print('* testing enable/disable tracking mode')
    print('  enabling')
    autostep.enable_tracking_mode()

    print('  disabling')
    autostep.disable_tracking_mode()

# ------------------------------------------------------------------------------
if True:
    print('* testing get_jog_mode_params')
    params = autostep.get_jog_mode_params()
    print('  params = {}'.format(params))
    print()

# ------------------------------------------------------------------------------
if True:
    print('* testing set_jog_mode_params')
    orig_params = autostep.get_jog_mode_params()
    print('  (recv)  orig_params = {}'.format(params))

    new_params = {'speed': 500, 'accel': 900, 'decel': 900}
    print('  (sent)  new_params = {}'.format(new_params))
    autostep.set_jog_mode_params(new_params)
    tmp_params = autostep.get_jog_mode_params()
    print('  (recv)  new_params = {}'.format(tmp_params))
Пример #2
0
from __future__ import print_function
import time
from autostep_proxy import AutostepProxy

print()
print('* sinusoid example')
print()

jog_params = {'speed': 200, 'accel': 500, 'decel': 500}
max_params = {'speed': 1000, 'accel': 10000, 'decel': 10000}
amplitude_list = [40, 80, 100]

autostep = AutostepProxy()

autostep.set_jog_mode_params(jog_params)
print('  jog params = {}'.format(autostep.get_jog_mode_params()))

autostep.set_max_mode_params(max_params)
print('  max params = {}'.format(autostep.get_max_mode_params()))
print()

for amplitude in amplitude_list:
    print('  amplitude = {}'.format(amplitude))
    param = {
        'amplitude': amplitude,
        'period': 2.5,
        'phase': 90.0,
        'offset': 0.0,
        'num_cycle': 4
    }
    print('  move to sinusoid start')