Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alternative communication protocol #1017

Closed
wants to merge 2 commits into from

Conversation

AdvancedImagingUTSW
Copy link
Collaborator

Collaborator at UTD tried to connect to a Physik Instrumente stage via RS232, which wasn't supported.

Tested on microscope and it seems to work.

from pipython import pitools, GCSError, GCSDevice
import pipython
import time
controller = 'E-709'
stage = 'P-726.1CD'
axis = 'Z'

pidevice=GCSDevice(controller)
pidevice.ConnectRS232(comport=8, baudrate=115200)
ready = pidevice.IsControllerReady()
print("The PI Device is Ready:", ready)

pi_tools = pitools
# startup(pidevice, stages=None, refmodes=None, servostates=True, controlmodes=None, **kwargs) pi_tools.startup(pidevice, stages="P-726.1CD", refmodes="ATZ", servostates=True)

stage_connection = {"pi_tools": pi_tools, "pi_device": pidevice}

distance = [0, 100, 0, 100, 0, 100]

for val in distance:
    pi_tools.moveandwait(pidevice, axes=axis, values=val, timeout=300)
    time.sleep(0.1)

Collaborator at UTD tried to connect to a Physik Instrumente stage via RS232, which wasn't supported.

Tested on microscope and it seems to work.
from pipython import pitools, GCSError, GCSDevice
import pipython
import time
controller = 'E-709'
stage = 'P-726.1CD'
axis = 'Z'

pidevice=GCSDevice(controller)
pidevice.ConnectRS232(comport=8, baudrate=115200)
ready = pidevice.IsControllerReady()
print("The PI Device is Ready:", ready)

pi_tools = pitools
# startup(pidevice, stages=None, refmodes=None, servostates=True, controlmodes=None, **kwargs)
pi_tools.startup(pidevice, stages="P-726.1CD", refmodes="ATZ", servostates=True)

stage_connection = {"pi_tools": pi_tools, "pi_device": pidevice}

distance = [0, 100, 0, 100, 0, 100]

for val in distance:
    pi_tools.moveandwait(pidevice, axes=axis, values=val, timeout=300)
    time.sleep(0.1)
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 53.83%. Comparing base (5ebfb4c) to head (04093ce).
Report is 32 commits behind head on develop.

Files with missing lines Patch % Lines
src/navigate/model/devices/stages/pi.py 0.00% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1017      +/-   ##
===========================================
+ Coverage    53.76%   53.83%   +0.07%     
===========================================
  Files          178      178              
  Lines        20037    20211     +174     
===========================================
+ Hits         10772    10881     +109     
- Misses        9265     9330      +65     
Flag Coverage Δ
unittests 53.83% <0.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AdvancedImagingUTSW
Copy link
Collaborator Author

useful documents here: https://pipython.physikinstrumente.com/connect.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant