Index: /BPM/initialise_motors.py
===================================================================
--- /BPM/initialise_motors.py	(revision 773)
+++ /BPM/initialise_motors.py	(revision 774)
@@ -279,4 +279,82 @@
     fichier.close()
 
+
+
+def vertical_aquisition(begin,end,pas,bpm_name):
+    idata = 0
+    start_time_str=datetime.now().strftime("%Y%m%d_%H%M%S")
+    data_name_and_path = data_dir+"data/position_vs_tension_"+bpm_name+"_"+start_time_str+"_"+str(idata)+".txt"
+    while os.path.exists(data_name_and_path) :
+        idata+=1
+        data_name_and_path = data_dir+"position_vs_tension_"+bpm_name+start_time_str+"_"+str(idata)+".txt"
+    fichier  = open(data_name_and_path, "w")
+    motor_enable(2)
+    L = [[],[],[],[],[]]
+    for i in range(begin, end,pas):
+	move_motor_absolute(1,5000,i)
+	while motor_get(2, 'status') != 'READY':
+		time.sleep(1)
+	time.sleep(1)
+	l = read_scope_and_write(i, fichier)
+        for j in range(5):
+            L[j].append(l[j])
+    time.sleep(1)
+    
+    move_motor_absolute(2,5000,end) # pour assuré le dernier pas, en aller ou retour
+    while motor_get(2, 'status') != 'READY':
+	time.sleep(1)
+    time.sleep(1)
+    l = read_scope_and_write(end, fichier)
+    for j in range(5):
+        L[j].append(l[j])
+    time.sleep(1)
+    for i in range(4):
+         plt.plot(L[0],L[i+1])
+    plt.show()
+    fichier.close()
+
+
+
+    def aquisition(begin1,end1,begin2,end2,pas1,pas2,bpm_name):
+    idata = 0
+    start_time_str=datetime.now().strftime("%Y%m%d_%H%M%S")
+    data_name_and_path = data_dir+"data/position_vs_tension_"+bpm_name+"_"+start_time_str+"_"+str(idata)+".txt"
+    while os.path.exists(data_name_and_path) :
+        idata+=1
+        data_name_and_path = data_dir+"position_vs_tension_"+bpm_name+start_time_str+"_"+str(idata)+".txt"
+    fichier  = open(data_name_and_path, "w")
+    motor_enable(1)
+    motor_enable(2)
+    L = [[],[],[],[],[]]
+    for i in range(begin1, end1,pas1):
+	move_motor_absolute(1,5000,i)
+	while motor_get(1, 'status') != 'READY':
+		time.sleep(1)
+	time.sleep(1)
+        for j in range(begin2, end2,pas2):
+	    move_motor_absolute(2,5000,i)
+	    while motor_get(2, 'status') != 'READY':
+		time.sleep(1)
+	    time.sleep(1)
+            l = read_scope_and_write(i, fichier)
+            for k in range(5):
+                L[k].append(l[k])
+            time.sleep(1)
+    move_motor_absolute(1,5000,end1)    
+    move_motor_absolute(2,5000,end2) # pour assuré le dernier pas, en aller ou retour
+    while (motor_get(1, 'status') != 'READY') & (motor_get(2, 'status') != 'READY'): 
+	time.sleep(1)
+    time.sleep(1)
+    l = read_scope_and_write(end, fichier)
+    for j in range(5):
+        L[j].append(l[j])
+    time.sleep(1)
+    for i in range(4):
+         plt.plot(L[0],L[i+1])
+    plt.show()
+    fichier.close()
+
+
+    
 #controller_hello()
 #move_motor_relative(1,1000,-1000)
Index: /BPM/motor_error.txt
===================================================================
--- /BPM/motor_error.txt	(revision 773)
+++ /BPM/motor_error.txt	(revision 774)
@@ -42,4 +42,5 @@
 What we have done : Add externe alimentation to UDC motor voltage
      	     	    Turn on alimentation to UDC motor voltage
+		    under tension on UDC motor voltage
 
 Error No.: 1887
Index: /BPM/print_datas.py
===================================================================
--- /BPM/print_datas.py	(revision 774)
+++ /BPM/print_datas.py	(revision 774)
@@ -0,0 +1,53 @@
+import matplotlib.pyplot as plt
+
+def float_list(l):
+    L = []
+    for i in l:
+        L.append(float(i))
+    return(L)
+
+def print_data(fichier):
+    fichier = open(fichier, "r")
+    A = fichier.read()
+    L = [[],[],[],[],[]]
+    a = ""
+    l = 0
+    for i in A:
+        if (i == " ") :
+            if l == 0: 
+                L[0].append(a)
+                l +=1
+            elif l == 1:
+                L[1].append(a)
+                #print(a)
+                l += 1
+            elif l == 2:
+                L[2].append(a)
+                l += 1
+            elif l == 3:
+                L[3].append(a)
+                l += 1
+            else:
+                L[4].append(a)
+                l = 0
+            a = ""
+        elif (i == "\n") :
+            a = ""
+        else:
+            a += i
+    fichier.close()
+
+    for i in range(5):
+        L[i] = float_list(L[i])
+    plt.plot(L[0],L[1], label = "BMP_ref")
+    plt.plot(L[0],L[2], label = "BMP_impr")
+    plt.plot(L[0],L[3], label = "BMP_ref")
+    plt.plot(L[0],L[4], label = "BMP_impr")
+    plt.legend()
+    plt.ylabel("length in motor step")
+    plt.ylabel("tension in V")
+    plt.show()
+
+
+
+print_data("data/position_vs_tension_ch1-3_bpm_ref_ch2-4_bpm_impr_20180528_115159_0.txt")
