Skip to content

Commit

Permalink
picomotor
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodjd committed Feb 7, 2021
1 parent bb38f18 commit e56b60f
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion Andor/andorv1.0/andor/aqctl_andor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import os
import asyncio

from andor.driver import andor
#from andor.driver import andor
from driver import andor
from sipyco.pc_rpc import simple_server_loop
from sipyco import common_args

Expand Down
95 changes: 95 additions & 0 deletions Picomotor/testing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

import serial
#import io



ser = serial.Serial(timeout = 1) #19200 baud didn't work. 8 bits, no parity, 1 stop bit.
ser.baudrate = 9600
ser.port = 'COM3'
ser.xonxoff=0
#sio = io.TextIOWrapper(io.BufferedRWPair(ser, ser))



ser.open()
print(ser.is_open)

#ser.close()
#print(ser.is_open)


ser.write(b'*IDN?\r')
txt = ser.read_until(b'\r')
print(txt)


ser.write(b':INST 1\r')
txt = ser.read_until(b'\r')
print(txt)






ser.write(b'INST:NSEL?\r')
txt = ser.read_until(b'\r')
print(txt)


ser.write(b'INST:NSEL 242\r') # slot (1-2), connector (1-4), channel (A,B).
txt = ser.read_until(b'\r')
print(txt)




ser.write(b':INST:STATE 1\r') # turns slot on
print(ser.read_until(b'\r'))

ser.write(b':INST:STATE?\r')
print(ser.read_until(b'\r'))



ser.write(b':SOUR:PULS:FREQ 1500\r') # freqs are integer dividens of 1500 Hz
txt = ser.read_until(b'\r')
print(txt)

ser.write(b':SOUR:PULS:COUN 1000\r')
txt = ser.read_until(b'\r')
print(txt)









ser.write(b':SYST:CTYP? 1\r')
txt = ser.read_until(b'\r')
print(txt)


ser.write(b':SOUR:PULS:FREQ?\r')
txt = ser.read_until(b'\r')
print(txt)

ser.write(b':SOUR:DIR CW\r')
txt = ser.read_until(b'\r')
print(txt)


ser.write(b'*TST?\r')
txt = ser.read_until(b'\r')
print(txt)


ser.write(b'INST:CAT? 113\r')
txt = ser.read_until(b'\r')
print(txt)


0 comments on commit e56b60f

Please sign in to comment.