Changeset 776 in ETALON


Ignore:
Timestamp:
Jun 11, 2018, 6:16:57 PM (6 years ago)
Author:
moutardier
Message:

correction of disable fonction

Location:
BPM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BPM/initialise_motors.py

    r775 r776  
    5252    if motor == 2: # security to avoid issue with vertical motor
    5353        print('are you sure to wanted to disable vertical motor ? \n yes or no')
    54     x = raw_input()
    55     while not (x == 'yes' or x == 'no' or x == 'y' or x == 'n' or x == 'YES' or x == 'NO' or x == 'Y' or x == 'N'):
    56         print('Do you want to disable vertical motor ?')
    5754        x = raw_input()
    58     if (x == 'no' or x == 'n' or  x == 'NO' or x == 'N'):
    59         print('Be carful with disable vertical motor')
    60         exit()
     55        while not (x == 'yes' or x == 'no' or x == 'y' or x == 'n' or x == 'YES' or x == 'NO' or x == 'Y' or x == 'N'):
     56            print('Do you want to disable vertical motor ?')
     57            x = raw_input()
     58        if (x == 'no' or x == 'n' or  x == 'NO' or x == 'N'):
     59            print('Be carful with disable vertical motor')
     60            exit()
    6161    msg = str(motor) + 'CD'
    6262    motor_send(msg, verbose)
     
    283283    time.sleep(1)
    284284    motor_disable(1)
    285     for i in range(4):
    286          plt.plot(L[0],L[i+1])
    287     plt.show()
    288285    fichier.close()
     286#    for i in range(4):
     287#         plt.plot(L[0],L[i+1])
     288#    plt.show()
     289
    289290
    290291
     
    318319        L[j].append(l[j])
    319320    time.sleep(1)
    320     for i in range(4):
    321          plt.plot(L[0],L[i+1])
    322     plt.show()
     321#    for i in range(4):
     322#         plt.plot(L[0],L[i+1])
     323#    plt.show()
     324    motor_disable(2)
    323325    fichier.close()
    324326
    325327
    326 
    327     def aquisition(begin1,end1,begin2,end2,pas1,pas2,bpm_name):
     328"""
     329def aquisition(begin1,end1,begin2,end2,pas1,pas2,bpm_name):
    328330    idata = 0
    329331    start_time_str=datetime.now().strftime("%Y%m%d_%H%M%S")
     
    363365    plt.show()
    364366    fichier.close()
    365 
     367"""
    366368
    367369
  • BPM/motor_control.py

    r773 r776  
    1717   
    1818move_motor_absolute(2,5000,0)
     19while motor_get(1, 'status') != 'READY':
     20    time.sleep(1)
    1921
    2022#controller_hello()
     
    3234
    3335
    34 
    35 
    36 """
    3736turn_on()
    3837
    39 horizontal_aquisition(0,400000,4000,"ch1-3_bpm_ref_ch2-4_bpm_impr")
     38vertical_aquisition(-110000,90000,4000,"ch1-3_bpm_ref_ch2-4_bpm_impr_vertical_acquisition")
     39
     40vertical_aquisition(90000,-110000,-4000,"ch1-3_bpm_ref_ch2-4_bpm_impr_vertical_acquisition")
     41
     42#vertical_aquisition(0,4000,2000,"test")
    4043
    4144#horizontal_aquisition(400000,0,-4000,"ch1-3_bpm_ref_ch2-4_bpm_impr")   
    4245
    4346turn_off()
    44 """
     47
    4548#fichier = open("24-05-2018_aquisition_from_0_to_400000_step_of_1000.txt", "r")
    4649"""
  • BPM/print_datas.py

    r775 r776  
    8080
    8181
    82 print_data("data/position_vs_tension_ch1-3_bpm_ref_ch2-4_bpm_impr_20180528_115159_0.txt")
     82print_data("data/position_vs_tension_ch1-3_bpm_ref_ch2-4_bpm_impr_20180611_160153_0.txt")
     83print_data("data/position_vs_tension_ch1-3_bpm_ref_ch2-4_bpm_impr_20180611_163036_0.txt")
Note: See TracChangeset for help on using the changeset viewer.