-
Notifications
You must be signed in to change notification settings - Fork 0
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
changed pulse number #1
Open
granthughes1999
wants to merge
17
commits into
main
Choose a base branch
from
multi_optical
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gui for controlling 8 fiber optics. Each with their own temporal control.
added start (t0) & end (te) entry windows. for all 8 fibers.
attempting to build the structure of the function that controls the delays. using if statements.
This update is not a good or realistic option. as it would require hundreds or more permutations of if statements. simply pushing it in case its my only option.
attempting to use enumerate, with elapsed time. (Not Working)
elapsed_time is always greater than 0. so if we set optical fibers to start at 0, they will never turn on because elapsed_time has passed 0 before the code reaches that section of code.
the code can now turn on and turn off a single pin. by comparing the gui input values to the total elapsed time of the loop
currently can control elapsed_time, which can turn off and on specific pins when they are greater than or less than elapsed_time. however, i'm not sure how pulses and trains works with this?
Updated post meeting with Dan. Created a single for loop to turn off and on each pin. added channel states list, and board pins list. allowing for the use of for i in range(len(start_stop_l)).
added the ability to control all 8 pins independently and not in sequential order , still using one line of code
added a line of code to find the maximum value / time in the start_stop_l list. the max value is used to break the while loop.
you can now run multiple pulses in a train without causes a crash. still need to get multiple trains to work. this works by reseting current_elapsed back to zero. and also rearranging the location of the while loop relative to the other for loops.
code can now run trains and pulses. can also control of all 8 optical pins independently.
there used to be a large delay between pulses, even when the time was set to zero. this was caused by a +2 i had placed next to the while loop. the solution was to lower this value to 0.001, which allows the code to run. if you add no additional time, the loop ends before the pins are turned off. this is the smallest time i tested, you may be able to shorten this even more if needed.
takes all the data and outputs a single csv per run button click. each row is a train.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.