cuasas / pixel-gantry-control Goto Github PK
View Code? Open in Web Editor NEWControl system for the Aerotech 3200 Gantry system and associated hardware for doing CMS FPIX module assembly
Control system for the Aerotech 3200 Gantry system and associated hardware for doing CMS FPIX module assembly
Hi!
I found a bug of the AUTOFOCUS function.
When I run the function, the scan (drawing gaussian distribution) works well.
But the measured height, which means the peak location of the gaussian, is wrong.
The height is the lower or upper boundary of the scanning range as shown in the attached file.
This happened occasionally.
Would you check it?
As more sites start regularly using gScript, it's quickly becoming a bottleneck for everyone to commit changes to their flex_config
s or gScript files and submit PRs to this repository.
At some point over the next few weeks, the Config/
and Scripts/
directories will be cleared out. I'll leave a minimalistic example flex_config.txt
and some example gScript files. (Everything that currently exists will still be there in the git history so nobody panic)
From that point forward individual sites/projects will need to be responsible for their own configurations and scripts. I'll add a section to the readme with relevant links to help people know where to find the files for their specific work.
As we work through this transition at UNL, I'll update this thread with recommended best-practices on how to organize files outside this repository.
Expose more math functions to gScript.
Non-exhaustive list:
SIN
COS
TAN
ABS
POW
Hi Caleb,
I am attempting to use the POTLINE and POTDOT commands with our Nordson Ultimus II dispenser setup. Ideally, all I need is a command to turn on and off the dispenser (we are dispensing a thermal grease). The POTLINE and POTDOT commands have additionally functionality built in that I do not need (such as variables for curing time, needing to load a syringe tool, syringe state, etc). Is there a way to create a simpler function to just turn on and off the dispenser? Thank you!
Currently, the software ESTOP is inaccessible while the SURVEY command is running. This is a problem since the gantry is moving during the execution of SURVEY. Furthermore, SURVEY can sometimes take up to 20 minutes to complete depending on the size of the area to image. The operator should have the opportunity to stop the command prematurely for whatever reason (typo in parameters for example).
ADD $a $b
does not throw an error when the script is initially supposed to check for code syntax.
gScript's MOVENAME command seems to interpret False in a graphMotion network edge to be true.
The issue does not exist in the graph visualizer.
Occasionally, the following error occurs:
I noticed this is reproducible if I first call VIDEO on one line and the next line try to use SETDISPENSE. I am not sure why this causes this error.
On the other hand, sometimes no error message occurs but SETDISPENSE simply does not turn on the dispenser. In order to get it to work, I usually close gScript, open NI Max and test the dispenser by turning it on and off with the test panels (which always works), reopen gScript, and retry the code/command (which usually fixes the issue).
In both cases, the command is not functioning entirely as expected. Please let me know if any other information would be useful.
Add an optional argument to the HOME
gScript command to make actual homeing contingent on necessity - ie only home if either the axes are not homed or if the current named position is null.
On some AMD machines, it seems that the lvanlys.dll doesn't load properly. This can be fixed by setting the following environment variable:
MKL_DEBUG_CPU_TYPE=4
See more here
The IMAQdx toolkit is the last remaining component that requires a paid license on the deploy machine. If this can be removed, no NI licenses would be required to be purchased or managed for gantry machines. This transition will be handled in 2 stages. In the first stage, the IMAQdx drivers will be replaced with the uEye-specific interface provided by IDS. The 2nd stage will re-add support for miscellaneous webcams using either the OpenCV or ESCAPI interface (both of which are wrappers around Windows Media Foundation). Camera configuration will now require specifying which driver should be used with each camera - initially either "ueye" or "wmf" (or whatever).
A failure mode has been observed where at some point the video feed from the gantryhead camera will stop updating. The VIDEO interface is otherwise responsive, clicking moves the gantry around, autofocus runs (albeit yielding a flat focus-vs-height curve), and the VIDEO can be closed and re-opened with no change. Associated with this is when the user tries to exit gScript the interface freezes and must be closed with the task handler.
No errors are logged into the gScript terminal.
Best guess at this point is that some error is passing undetected which causes the camera to enter some undefined state. This causes a failure to acquire new images and a freeze when the code attempts to close the camera connection upon exiting.
External devices supporting serial connections are common and potentially useful in gantry setups. Therefore a set of new commands is outlined below which will supply at least rudimentary support for serial connections using the underlying LabVIEW VISA implementation.
SERIALLIST
: List out the VISA-complient names of all available connectionsSERIALOPEN $cid "Port Name" (baud) (bits) (parity) (flow-control)
Attempt to open a serial port with the supplied name and settings (settings optional). Return an integer reference to the connection used in other commands.SERIALCLOSE $cid
Close the port with the specified id.SERIALSTATUS $cid
Print connection status information to the consoleSERIALPRINT $cid "string with string {$var:%f.2} interpolation"
Format and send a line of ASCII text over the connection. All lines are implicitly terminated with a new line character \n
.SERIALECHO $cid
Read a line from the connection and just print to terminal. Incoming lines should be delineated by a new line character \n
.SERIALPARSE $cid $var1 $var2 "format %f string %d"
Read and parse a line based on supplied format string. Parsed values are assigned to supplied variables in the order they appear in the format stringWe see the following error message when we try to run our script.
09/04/2021 06:23:43 PM >>> Error Status: 1
Code: 5003
Unrecognized Command:
Below is the script. It would be helpful to highlight the exact command it is failing on for debugging.
Thanks!
Cameron and Souvik
==============
HOME
SETLOG pick_and_place.txt
COPY $speed 50
COPY $img_idx 0
COPY $correction_pos {0.0156,0.0023,0}
COPY $correction_angle 0.007952654196415835
COPY $center2glass_pad {-10.082,-20.813,0}
COPY $glass_pad2HDI_pad {1.250,0,0}
COPY $start_pos {559.363,218.562,87.957}
COPY $start_rot {0,0,0,1}
COPY $uncorr_end_pos {107.634,549.559,99.656033}
COPY $uncorr_end_rot 0.2419
SUB $corr_angle $uncorr_end_rot $correction_angle
EULER2QUAT $end_rot $corr_angle 0 0
ADD $end_pos $uncorr_end_pos $correction_pos
FLEXREAD $tl_local geometry.TFPX_1X2_MOCKUP.fid_tl
FLEXREAD $tr_local geometry.TFPX_1X2_MOCKUP.fid_tr
FLEXREAD $br_local geometry.TFPX_1X2_MOCKUP.fid_br
FLEXREAD $bl_local geometry.TFPX_1X2_MOCKUP.fid_bl
@PROCESS_START COPY $pos $start_pos
COPY $rot $start_rot
CALL @Survey
LOADTOOL picker_tool
MOVENAME stagingArea
#Pickup Step
COPY $target_pos $meas_pos
CALL @CALCPICKUP
MOVETO $pickup_pos_z0 50
ROTATE $meas_rot
MOVETO $pickup_pos 10
SETVAC gantry_head_inner 1
WAIT 500
SETVAC module_chuck_0_slot_2 0
WAIT 2000
MOVETO $pickup_pos_z0 10
INVERT $neg_meas_rot $meas_rot
ROTATE $neg_meas_rot
COPY $target_pos $end_pos
CALL @CALCPICKUP
MOVETO $pickup_pos_z0 50
ROTATE $end_rot
MOVETO $pickup_pos 10
SETVAC gantry_head_inner 0
WAIT 500
SETVAC module_chuck_0_slot_1 1
WAIT 2000
MOVETO $pickup_pos_z0 10
INVERT $neg_end_rot $end_rot
ROTATE $neg_end_rot
UNLOADTOOL
CHOICEPOPUP $choice_1 "Did you put the HDI and the Weight Tool on the Sensor?" "Yes, survey bond pads" "No, quit"
GOTOIF @CHECK_BOND_PADS_1 $choice_1
GOTOIFN @DONT_CHECK_BOND_PADS $choice_1
@CHECK_BOND_PADS_1 CALL @CHECK_BOND_PADS
@DONT_CHECK_BOND_PADS
END
@Survey COPY $SURVEY_RET $RET
MOVENAME stagingArea
# MPGON
MOVETO $pos $speed
TRANSFORML2G $tl_global $tl_local $pos $rot
MOVETO $tl_global $speed
VIDEO
GETPOS $tl_meas
TRANSFORML2G $tr_global $tr_local $pos $rot
MOVETO $tr_global $speed
VIDEO
GETPOS $tr_meas
TRANSFORML2G $br_global $br_local $pos $rot
MOVETO $br_global $speed
VIDEO
GETPOS $br_meas
TRANSFORML2G $bl_global $bl_local $pos $rot
MOVETO $bl_global $speed
VIDEO
GETPOS $bl_meas
# MPGOFF
FIT $meas_pos $meas_rot TFPX_1X2_MOCKUP $tr_meas $br_meas $bl_meas $tl_meas
PRINT "Measured position: %v" $meas_pos
PRINT "Measured rotation: %q (%r)" $meas_rot $meas_rot
GOTO $SURVEY_RET
@CALCPICKUP FLEXREAD $picker_height geometry.PICKER_TOOL.center_offset
FLEXREAD $ghco geometry.tool_holder_offset
ADD $netoffset $picker_height $ghco
SUB $pickup_pos $target_pos $netoffset
COPY $pickup_pos_z0 $pickup_pos
COPY $pickup_pos_z0.z 0
GOTO $RET
@CHECK_BOND_PADS
#Check the positions of the bond pads
COPY $pos $end_pos
COPY $rot $end_rot
MOVETO $pos $speed
#Top Bond Pads
MOVEREL $center2glass_pad $speed
VIDEO
GETPOS $top_glass
MOVEREL $glass_pad2HDI_pad $speed
VIDEO
GETPOS $top_HDI
#Bottom Bond Pads
MOVETO $pos $speed
MUL $center2bottom_glass $center2glass_pad -1
MOVEREL $center2bottom_glass $speed
VIDEO
GETPOS $bottom_glass
MOVEREL $glass_pad2HDI_pad $speed
VIDEO
GETPOS $bottom_HDI
#Printing
SUB $delta_top $top_HDI $top_glass
SUB $delta_bottom $bottom_HDI $bottom_glass
PRINT "Top Bond Pads Distance = %v" $delta_top
PRINT "Bottom Bond Pads Distance = %v" $delta_bottom
GOTO $RET
============
The FNAL gantry has the tool rack mounted near the home position. If one homed while holding a tool, it would crash into the rack. An option should be added which, if enabled, would throw an error if attempting to HOME while the gantry_head_outer vacuum line is on.
Currently the pattern recognition command, FINDFID, can only run on a single image taken with the camera. This can lead to an issue where if the fiducial pattern is larger than the camera's field-of-view then it cannot be captured in a single image. The solution is to allow for multiple images to be stitched together first followed by the pattern recognition step. This logic is already developed for the SURVEY command. It just has to be hooked up to the FINDFID command.
To specify the size of the extended field-of-view, new (optional) entries will be added to the fiducial specification. e.g.
vision.example2.method: find_rects
vision.example2.scan_window_x: 5 # mm
vision.example2.scan_window_y: 3 # mm
Add a gScript command to reload the config file during execution. This would mostly be useful for instances when the user has changed something in the config file (eg. a fiducial finding parameter) and would like to test it without restarting the application.
Syntax:
LOADCONFIG prefix filename
both prefix
and filename
are optional. If prefix
is provided, only keys starting with prefix
will be loaded. If filename
is provided, keys will be loaded from that file instead of the default one.
It's not unusual to be in a situation where one wants to set the state of a group of vacuum lines. For example: I'm finished with the gantry and wish to turn off all vacuum lines, or I've staged a set of parts on a chuck and wish to turn on all vacuum lines for that chuck.
The proposed syntax would be
SETVAC chuck_1_pos*_a 1
If the first argument (the channel name) has a "*" in it, it is interpreted as a glob-pattern and selects any channels whose name matches the glob, otherwise an exact match is required.
eg
FLEXWRITE process_summary.chip1_center $chip1_center
FLEXWRITE process_summary.chip2_center $chip2_center
FLEXWRITE process_summary.chip3_center $chip3_center
FLEXWRITE process_summary.chip4_center $chip4_center
SAVESTATE process_summary.* "assembly_intermediate_values_{$chuck_num}.txt"
A user of gScript currently has no way of knowing if a script they want to run is compatible with the version of the interpreter they are using. To help with this, I propose to add a new command "VERSION
", which would allow the user to declare which version of the language the script was written for.
The action of this command would be to check the first argument (eg "1.0", "2.3" or whatever) against the version as declared in gScript Interpreter\version.vi
. If they do not match, a popup window will be raised informing the user that their code might not run as expected on this version. They can then choose to continue or abort the script.
The Enter key should be hooked up to the "Click to continue" button.
Currently gScript only natively supports fitting a set of four fiducials using Horn's method. It has become apparent that other, more basic, fitting procedures would be helpful. Some ideas below
FITLINE
- takes a set of coordinates and performs a least-squares fit and returns the intercept, slope, and R^2 of the fitFITCIRCLE
- again, takes a set of coordinates and performs a fit (method TBD) and returns the center, radius, normal vector, and some quality-of-fit metricI am able to connect with SERIALOPEN (i.e. there is no error message in the gScript application), but occasionally when I attempt to send commands through SERIALPRINT, the commands have no effect. Without any visible error message, I am not sure why this communication is failing. I have tested communication with the device (an arduino in this case) with another interface and am able to communicate with it.
Over in the pixel-gantry-extra there has been some work to create an interface for talking to the TFPX module tracking database. This is now tested and working. What remains to be done is to implement the Labview wrappers and the gScript commands to use them. I currently foresee 3 new commands that I'll describe below.
DBLOGIN
. This will present the user with a pop-up where they can enter in their username/password. These will be checked against the information in the database to verify the user. This will also open a connection to the database that will be kept open in the case of a successful login.DBFINDCOMP
. This will open a window that will show a table of all constituent components (ie CROCs, RD53A's, or whatever is specified) that are located at the current assembly site. The user will then select items from the table and assign them positions that map to where they are physically located on the gantry table.DBSAVEASSEMBLY
. This is run after completing an assembly and will
tests
table.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.