-
Notifications
You must be signed in to change notification settings - Fork 11
ASI RFVC Changes to be merged in Navigate #1099
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
Changes from all commits
1ba1a81
0150f56
a3d2e4e
11ee2c3
07046df
51d4559
074cba4
a17aae7
2ac3ec1
2fe12a9
90e0004
5e0d2dc
1f8c3f0
e2864e0
76b6e1b
bc549eb
adb6f9b
1e13f82
2240a65
71e3975
3a6aeb1
a285c3d
7db8435
b7a0f84
f6f6864
6290ca6
fa48620
e401072
fb8c165
c3ba1bf
e17cf99
b81cc65
84082ca
3048fce
3028db2
1665fbd
8678b6c
7d96c33
0b7cd7f
9bad958
1a00b35
112591b
2f3d347
a48af84
0982e0e
d8b7cde
64b9eb7
6a2cd4d
372ed45
6b639b4
d5810fa
618eb7c
9895647
a628c3e
518434d
9d6f110
f7b246d
fa47761
39596bd
43ea873
e493c14
0e49218
7986977
b0a9378
f1d3f2f
be425bc
55df284
b9853d2
81eacf1
0e86e05
a5d94fa
7a826e2
683edfe
1c78126
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1010,3 +1010,69 @@ def logic_card_off(self, axis : str) -> None: | |||||
self.read_response() | ||||||
self.send_command(f'6 CCA Z=0\r') | ||||||
self.read_response() | ||||||
|
||||||
def logic_cell_on(self, axis : str): | ||||||
self.send_command(f'M E = {axis}\r') | ||||||
self.read_response() | ||||||
self.send_command(f'CCA Z=1\r') | ||||||
self.read_response() | ||||||
|
||||||
def logic_cell_off(self, axis :str): | ||||||
self.send_command(f'M E = {axis}\r') | ||||||
self.read_response() | ||||||
self.send_command(f'CCA Z=0\r') | ||||||
self.read_response() | ||||||
|
||||||
def SA_waveform(self, axis:str, waveform=0, amplitude=1000, offset=500, frequency=1000): | ||||||
"""Programs the analog waveforms using SAA, SAO, and SAP | ||||||
Default waveform is a sawtooth waveform with an amplitude of 1V with an offset of 0.5V | ||||||
|
||||||
Parameters | ||||||
---------- | ||||||
axis: str | ||||||
Tiger Controller axis | ||||||
waveform: | ||||||
Type of waveform pattern according to https://asiimaging.com/docs/commands/sap | ||||||
amplitude: | ||||||
amplitude of the waveform in mV | ||||||
offset: | ||||||
sets the center position of the waveform in mV | ||||||
frequency: | ||||||
sets the period of the waveform in milliseconds | ||||||
""" | ||||||
|
||||||
"Verify if this is for synchronous or asynchronous" | ||||||
print(f"Period (ms): {frequency}") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove or replace the debug print statement with proper logging to avoid unintended console output in production.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adopt recommended change to log this information, not print it to the console. |
||||||
if (waveform % 128 == 3): | ||||||
offset = .5*(offset+amplitude) | ||||||
amplitude = amplitude*2 | ||||||
|
||||||
self.send_command(f"3 SAP {axis}={waveform}") | ||||||
self.read_response() | ||||||
self.send_command(f"3 SAA {axis}={amplitude}") | ||||||
self.read_response() | ||||||
self.send_command(f"3 SAO {axis}={offset}") | ||||||
self.read_response() | ||||||
self.send_command(f"3 SAF {axis}={frequency}") | ||||||
self.read_response() | ||||||
|
||||||
def SAM(self, axis: str, mode: int): | ||||||
"""Sets the single-axis mode according to the integer code. | ||||||
|
||||||
0: stops waveforms if they are running | ||||||
1: starts generating the waveform pattern | ||||||
2: waveform only runs for one cycle, then waits for another trigger | ||||||
3: starts generating the waveform pattern, restarts the other waveform on the same card | ||||||
4: starts generating the waveform, free running after the trigger | ||||||
|
||||||
Parameters | ||||||
---------- | ||||||
axis: str | ||||||
Laser axis | ||||||
mode: | ||||||
Integer code | ||||||
""" | ||||||
|
||||||
self.send_command(f"3 SAM {axis}={mode}") | ||||||
self.read_response() | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add numpydoc commenting