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

changed pulse number #1

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

changed pulse number #1

wants to merge 17 commits into from

Conversation

granthughes1999
Copy link
Collaborator

No description provided.

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants