Skip to content

Conversation

@joegwalsh
Copy link
Member

Removes some redundant MoveChip functions, people should now use the versions which account for potential alignment skews and corrects for these.
Breaks pick and place stages up into
GetChipFromTray
GetChipFromSocket
PlaceChipInTray
PlaceChipInSocket
Please make sure you reimplement any site specific or chip specific code in the right places.
This is mainly an issue for the chip analysis with the UF camera which should now be done in the UFGetChipAlignment and UF_CHIP_FIND functions in RTS_tools.prg
The DFGet...Alignment functions should also be updated if necessary.
There are also some global alignment values which should be set in DefineDirections function in SiteSelection.prg or in the RTS_tools.inc
NOTE: this has not been fully tested with COLDATA, and so there may be issues with the current functions, I've tried to head off any issues with the alignment functions but should be checked - Since the UF camera cannot easily identify the pin-1 corner, I've restricted offsets at the UF camera to be +/- 45 degrees, and we will rely on the DF camera to find the major direction (+n*90deg).
Also adds a new RTS_suberror

Next to implement
When there is an error, it should potentially move chip to the bad tray, not sure if this should be handled in the state machine or the RTS code. If in RTS code, need to allocate the bad tray position to place the chip in.
Also need to reorganize code as RTS_tools.prg has become a bit unwieldy, but that should probably be a separate branch
Might be useful to implement batch motion commands, so that the amount of back and forth when checking if trays/sockets are occupied before moving is reduced. I've started to put in the capability to do these group occupancy checks and then override them in the individual move functions but this may complicate logging and time stamping individual chips

Splits the DF chip orienation function up by chiptype,
Includes functionlity for COLDATA chips, which have different
features.
When the wrapper function for chip finding is called, this will
run the COLDATA function several times taking the average
This is to handle some inconsistencies with the sequence success
Note, ColdADC has not been explitly implemented, I'm not sure
if they have the same marks as the LArASICs but maybe this can be
reused
Expands DF functions to recognize larger COLDATA socket
Code now uses main MoveChip function to handle operations
considently, but still accessed through server with wrapper
functions which call correct indices
Will complain about incorrect inputs and will output
consistently
Will find direction at tray and adjust pick up suitably
Will then use offsets at Up Facing Camera to correct socket
position. Also accounts for socket drift on DAT
Needs COLDATA pin handling implementing
Should get COLDATA direction from text on chip though
Pin analysis currently commented out, but is in the
UFC chip orientation function and status returned in
output
Errors now handled with ErrorDictionary for consistency
Outputs handled by LogResults function
TODO: Include some recovery features for errors
such as returning to tray, or requiring user input somehow
For some reason the Jump XY(...) function doesn't maintain handedness
so added if statement to check which DAT tray
Also some MSU updates to points and vision
Needed to resolve vision sequence conflict handling
this is done in RC+ by importing sequences
Also corrected a couple of minor types introduced in merge
Copy link
Member

@tcontrer tcontrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few comments on things to clean up and double check. Could you also add brief functions descriptions to each of the new functions you have developed here?

' Motor Off
' PumpOff

'Moved this to site selection so it always gets called
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is all in SiteSelection now, can you remove the commented out version here? In general, should clean up main for general use

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the section that's now in SiteSelection. With regards to cleaning up Main more, I've added a Testing.prg file which can be added to the gitignore and then used to do local changes during testing without us all constantly changing main

EndIf
Fend
Function DefineDirections As Int32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The socket mezzanine and chip orientation are the same for each chip right now. Is that true, or does each site need to update these numbers from here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're not quite the same, but I think this can be simplified down in a way which I can commit soon. I need to test with a robot first though.

@@ -668,1167 +658,637 @@ Fend

'Function ChipBottomAnaly(chip_SN$ As String, fileNum As Integer, pallet_nr As Integer, col_nr As Integer, row_nr As Integer, DAT_NR As Integer, ByRef status As Integer, ByRef res() As Double)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove all of ChipBottomAnaly if it is no longer used and is commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


VRun ChipBottom_Analy
Function PinsAnaly(id$ As String) As Integer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a brief function description?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Print "Move chip from pallet(", src_pallet_nr, ",", src_pallet_col, ",", src_pallet_row, ")",
Print " to tray(", tgt_pallet_nr, ",", tgt_pallet_col, ",", tgt_pallet_row, ")"
status = MoveChipFromTrayToTray(src_pallet_nr, src_pallet_col, src_pallet_row, tgt_pallet_nr, tgt_pallet_col, tgt_pallet_row, 0)
status = MoveChipFromTrayToTray(src_pallet_nr, src_pallet_col, src_pallet_row, tgt_pallet_nr, tgt_pallet_col, tgt_pallet_row) ', 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you go through and check that the changes to functions here match the function calls in RTS_CFG.py?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The input arguments for these haven't changed in RTS_Server.prg so as far as I can tell it still matches the integration code.

Adds some descriptions of inputs
Removes some commented out code
Cleans up Main.prg and adds Testing.prg
which should be used after adding to .gitignore
Simplifies the offsets stored for each chip to a single offset
The socket position code now returns the direction in which the
chip should be inserted given these are the same for each socket
Offset in SiteSelection:DefineDirection is now between hand U at
the taught point, and the defined direction of the chip in the socket
A set of Tutorial files are also added, with site name "TUT"
This was for the sake of going through everything methodically from
scratch at MSU and teaching new sequences etc.
Will do some more testing to make sure not broken for different
chip orientations
Will then add some more user friendly wrappers for subfunctions
i.e. GetChipFromSocket/Tray without all the necessary logging varaibles
May add back in position offset handling at tray as well as socket
Had commented out a line I thought was redundant in going
to socket point with a line in the socket alignment function
which only moved to the XYU coordinate of the point to get
the agl4 offset not to the correct Z height
Now fixed so it doesn't just drop the chip form the camera position
height
To avoid issues with git's own compression and character handling
trying to zip up the project directly on Windows.
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.

3 participants