Code Monkey home page Code Monkey logo

Comments (5)

freespace avatar freespace commented on August 28, 2024

Can post the modified get_info.py to a gist or in a comment? Can you insert some print statements into Controller._read_message and see what the hardware is sending back?

from pyapt.

mxochicale avatar mxochicale commented on August 28, 2024

For above output of python get_info.py , I added some print lines in \pyAPT\controller.py to see what is happening. However, I have just put controller.py back as it is in the repository. Then I have added controller._read_message which did not show any output as seen below:

python get_info.py

#!/usr/bin/env python
"""
Usage: python get_info.py [<serial>]

Gets the controller information of all APT controllers, or the one specified
"""
from __future__ import absolute_import
from __future__ import print_function

import pyAPT

from runner import runner_serial

@runner_serial
def info(serial):
    print ('###  TESTING get_info.py  ####')
    print('serial=   ',serial) #70112214

    con=pyAPT.Controller(serial_number=serial)
    print('pyAPT.Controller(70112214) =   ', con)
    con._read_message()
    con.info()

if __name__ == '__main__':
  import sys
  sys.exit(info())

terminal output

the terminal output is the following and the script just get stuck there (i.e. not showing anything for con.read_message() and con.info()).

(linearstages) pyapt@$MACHINE:$HOME/pyAPT$ python get_info.py 

Looking for APT controllers
Found b'Thorlabs' b'APT Stepper Motor Controller' S/N: b'70112214'
###  TESTING get_info.py  ####
serial=    b'70112214'
pyAPT.Controller(70112214) =    Controller(serial=70112214, device=<pylibftdi.device.Device object at 0x7ff0748fc5c0>)

Any suggestions?

from pyapt.

freespace avatar freespace commented on August 28, 2024

@mxochicale I have pushed a new branch that has debugging output inserted. Can you please checkout branch issue-12 and re-run get_info.py

FYI I am no longer at Oxford and therefore do not have access to any Thorlabs hardware.

from pyapt.

mxochicale avatar mxochicale commented on August 28, 2024

Thanks @freespace for your kind reply and your message on not having access to any Thorlabs hardware. I have updated my local repo and checkout issue-12 branch and apparently there is no response for the reading message header as shown below:

(linearstages) pyapt@$MACHINE:$HOME/pyAPT$ python get_info.py 
Looking for APT controllers
Found b'Thorlabs' b'APT Stepper Motor Controller' S/N: b'70112214'
Reading message header

Do you have any suggestions?

By the way, I will come back to the lab on 13 of January 2020 to hopefully sort out this issue with your help.

from pyapt.

freespace avatar freespace commented on August 28, 2024

@mxochicale it looks like the controller isn't responding to the APT commands. This could be due to a few things: a change in how APT is implemented; hardware fault; configuration issue; etc.

The first step would be to determine if it is at all possible to communicate with these controller using the APT protocol. Download the APT software from https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=Motion_Control&viewtab=1 and attempt to manipulate your stages and controllers. If this work then it rules out hardware and configuration issues.

from pyapt.

Related Issues (7)

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.