Changeset 770 in ETALON
- Timestamp:
- May 25, 2018, 11:31:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BPM/motor_control.py
r768 r770 4 4 from initialise_motors import * 5 5 from scope_function import * 6 import matplotlib.pyplot as plt 6 7 7 8 # moteur 1 -> horizontal 8 9 # moteur 2 -> verticale 9 10 10 motor_enable(1)11 #motor_enable(1) 11 12 12 13 #controller_hello() … … 21 22 22 23 #position_test_horizontal() 24 25 26 # creation graphique 27 28 A = loadtxt('donnees.dat') 29 X = [] 30 Y1 = [] 31 Y2 = [] 32 Y3 = [] 33 Y4 = [] 34 35 for i in range(A): 36 if (i%5) == 0: 37 X.append(A[i]) 38 elif (i%5) == 1: 39 Y1.append(A[i]) 40 elif (i%5) == 2: 41 Y2.append(A[i]) 42 elif (i%5) == 3: 43 Y3.append(A[i]) 44 else: 45 Y4.append(A[i]) 46 47 plt.plot(X,Y1) 48 plt.show() 49 50 51 """ 23 52 turn_on() 24 53 fichier = open("24-05-2018_aquisition_from_0_to_400000_step_of_1000.txt", "w") … … 26 55 fichier.close() 27 56 turn_off() 57 """ 28 58 29 59
Note: See TracChangeset
for help on using the changeset viewer.