Giter VIP home page Giter VIP logo

pyb12mps's People

Contributors

ehuang94 avatar thorstenmaly avatar tkeller12 avatar victorselve avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

pyb12mps's Issues

Leftover junk on serial port

After starting the communication with the MPS (e.g. mps.start()) there seems to be some characters left so any command directly after opening the connection will result in an error. Running the command again will give the correct result.

mps.start()
Server starting...
Server started.
MPS initializing...
System Ready

mps.power()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/site-packages/pyB12MPS/pyB12MPS.py", line 382, in power
return_power = float(return_tenth_dB_power) / 10. # convert to dBm
ValueError: could not convert string to float: 'Synthesizer detected'

mps.power()
0.0

EXT mode behaviour

when entering the EXT mode via pyB12MPS or OVJ the TX status goes "on", even when the MPS was off before entering EXT mode. This should be changed

TX bar not showing in EXT mode

when the EXT mode and the MPS sends out a pulse the RX value changes (and the bar changes) but the TX bar never changes (always empty)

mps.systemstatus() return string

File "c:/Users/Eugene Huang/Documents/python/Lock_Feature/lock_feature_test.py", line 67, in
info = mps.systemstatus()
File "c:\users\eugene huang\documents\repositories\pyb12mps\pyB12MPS\pyB12MPS.py", line 918, in systemstatus
key, value = tuple(statusInfo.split(':'))
ValueError: not enough values to unpack (expected 2, got 1)

Server Window

Server window: make verbose mode to see server window

MPS losing connection with CentOS (ConnectionResetError)

The MPS is periodically losing connection with our CentOS system. While running ODNP automatic acquisition through our python scripts, the acquisition will halt and python will output an error: "ConnectionResetError: [Errno 104] Connection reset by peer".

I tried running again with mps.start(debug = True) in one terminal, then ran my T1 script in another terminal. The terminal which had the mps.start(debug = True) gave me no additional output during or after the script completed. This was successful, but immediately after this, I tested my enhancement script, and this failed during the run with the same "ConnectionResetError".

PythonScript_error2 (1)

Autodetect of COM port

Autodetect of Com port: Either it works, or we'll remove the feature and you have to give manually

setting functions don't inherently handle serial communication breaks

To avoid users needing to use extra code maybe it would be a good idea to add something like a quick sleep(.1) (or whatever else might work) within the setting functions themselves. For example, if I have

f1 = mps.freq() 
mps.freq(f3) 
f2 = mps.freq()

within a script, f2 = f1. If I use,

f1 = mps.freq() 
mps.freq(f3) 
time.sleep(.1)
f2 = mps.freq()

f2 = f3 as it should. I think that completing the setting of a parameter with a single command as it is documented,

mps.freq(#) 

should work invariably, rather than require an extra command to take effect.

should statuses be True/False?

Would it be easier if the accepted/returned of the various status() commands were true/false so that, for example, you could write:

if mps.ampstatus():
...

rather than have to do something like:

var = mps.ampstatus()
if var==1:
...

Data "lag" on serial port

When sending a query for a value, the previous value is shown first before it gets updated. E.g.:

mps.txpowerdbm()
-99.9

mps.txpowermv()
-99.9
mps.txpowermv()
-3.1
mps.txpowerdbm()
-3.1
mps.txpowerdbm()
-99.9

When I send mps.txpowerdbm() I get -99.9 (seems correct)
When I send mps.txpowermv() afterwards I get -99.9 (not correct) and when I send the command again I get -3.1 (seems to be correct)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.