Closed Monkeymerlot closed 9 months ago
Going to use a Driver Management class. Here is the start up routine: It takes an array of paths to the drivers, and for each one it will start them, and initialize a cluster of events created for each driver. I initially wanted to do call by reference, but this wasnt possible as we dont have a set front panel where everything is based off of the same interface. For now, I think that setting the event cluster, which is named very uniquely, will suffice. Front Panel of Refactored Driver: Creation of Events in start up routine:
Shut down flow: Send Stop Event to all drivers Give them one second to stop: If they stop in one second: Do nothing If they don't stop in time: Consider them hanging, abort them: Destroy all User Events Destroy all VI References
Added functionality to embed into a subpanel: And I envision its usage like so:
Added steps that are performed after each object is performed. It will write the tip voltage to be zero, and then will move the tip upwards.
Investigation of the lithography program has revealed that the data is sent to the drivers in units of um. To do otherwise would require a significant overhaul in the program it seems. So here it writes the inkscape ratio: If the size of the image is greater than 100x100 (ie 100x100 um) then it is actually nm, and the ratio is 1000. If it is less than 100x100 um, then it is determined to be in um, not nm, and its ratio is simply 1. It reads it in the Paths Apply Inkscape Ratio: and Rectangle Apply Inkscape Ratio:
The timing seems to be 50 kHz in the old driver, so I think that its ok to use that value in the new driver as well.
Edit: Issue #29 discusses this in detail.
Abort functionality:
In Litho Objects: Normally we would have used OpenG Wait (ms), but instead we wait with abort in Litho Object Points: And if Abort Notifier is True: We send a stop command to the software, and then give it a second. (edit: I want to add that since this doesnt stop the driver, it will stop the current object from being written, and then it will run the Object finish sequence where we set the voltage to zero and lift the tip up. If we happen to get it between objects, which would be exceedingly rare, it should just ignore the next object. If we get it while it is preparing to start the object, once it begins it will immediately stop.)
Heres how we get the abort Abort Notifier Event to Provide Reference to driver.
Run button Event will call this code: Where we create notifier and send it to the driver: If we then hit "Abort" button while lithography is running: And once lithography is finished and we get the Lithography Done Event:
I hope this makes sense.
Added Resistor Box with help from @johnbrickmaier and put post object stuff in terminateLithographyObject Added event call back to post object stuff: Added abort for initial move: Fixed bug involving speed on move to initial point (wasnt orignally written, making it zero, thus dividing by zero gave inf, which was the time we would have waited for...)
Monitored commands and everything looks good. Ready for second code review.
@Monkeymerlot I'm looking at things now and preparing test build. There are some issues with files being in weird places and the Asylum Driver project is inside the AFM Litho project (issues #34 #32 ?) Maybe we should switch to autopopulating folders...?
I think the Asylum Driver Project is because of the autopopulating folder that I later got rid of. We can take that out. Everything should be in the right place, but you and I both know that with LabVIEW and source control that only happens when the stars align ¯\_(ツ)_/¯ Ill look into the other issues.
Minor change. I made the move to initial point speed be equal to the value in the old program
@aditi-nethwewala
Reviewing over the command order. I think that tip down should happen after the move to the initial point?
Edit: Nevermind, that is ensuring that the tip is up. The tip will set down in part of the actual writing sequence.
@ciozi137 I saw that you did a build. I just wanted to make sure that you turned Debug? to False on the driver:
don't know. I will check
no. it was true. I will fix in v8.6.0.5
Still building 8.6.0.5. It's taking a really long time for the installer for some reason. Will have to come back later to check and commit/push my changes.
That build was terrible. Starting over. Will be 8.6.0.7.
@Monkeymerlot @aditi-nethwewala new build 8.6.0.7 is posted. Code is pushed also
Reported issue: (@aditi-nethwewala)
Got this issue when I was running a built version of the program.
With the new build, this should be ready for testing. Hopefully, everything is now in order and should work.
@ciozi137 I think we can close this issue out (finally)?
Previously I refactored a driver for the Asylum microscopes (MFP-3D and Cypher). There are only a few things that I need to do to finish this driver, and then I think it can be a replacement. I also want to redo the way that we call drivers and swap them. Here are the main things that I see that are bad practices and I should change when adding the new driver.
First, is that we send information by changing values on their front panels using named controls: Instead we should user User Events.
Second, we currently abort VIs when swapping them inside of a subpanel and at the end. There is a better way to do this: First thing is that you don't need to abort a VI to take it out of a subpanel. Second thing is, you should never abort a VI period. Like ever. There are a few instances when you might have to as a last resort, but you should set up a way to stop them gracefully to begin with. Where we abort subpanel Current method of swapping a subpanel: So to implement this I think that it would be beneficial to think about having a User Event that will send a stop request. We can wait on some conformation that the VI has stopped. If it has not stopped in a certain amount of time, we can then abort it.
Other, less problematic issues (for now) Use of a global variable for information such as offset and the like.