jkuusama / liteplacer-dev Goto Github PK
View Code? Open in Web Editor NEWLitePlacer machine user interface and control software
LitePlacer machine user interface and control software
The software should be tested with the newest TinyG firmware
The software should retrieve the firmware number from TinyG and use bug workarounds only if needed or use new features only if supported by the TinyG version used. (Not all users are going to upgrade their software)
Hi...
Can i use arduino due and g2core with liteplacer software
Thanks
Rizki
See:
http://i.imgur.com/DXjpD3L.png
I accidentally loaded a custom tapes file into tape potions. Now it crashes whenever you look at it.
Now I know what I did was not normal behavior but the exception should be handled.
I have a 19" TFT permanently attached to my LitePlacer frame. The display has a resolution of 1440x900 which I believe is reasonable for the display size.
Unfortunately the LitePlacer application window does not fit the screen and when maximizing, some buttons and labels at the bottom are hidden from view and out of reach.
I believe, with a bit of rearranging and smart use of the space available, the application could still be made to fit smaller screens. Otherwise a scroll bar would be better than just hiding controls "off screen".
I will attach a screenshot later to illustrate the issue.
Idea: Check with vision of part is successfully picked.
pick part -> go with cam to component location -> check if there is still a component.
This would replace the reza vacuum sensor method.
When uncheck "power motors / motors on" and then tick the box "enable pump" on "Basic Setup" tab, TinyG energizes at least X and Y motor (not A and I am unsure about Z axis) and moves the gantry slightly.
I consider this a bug unless there is any reasoning behind this.
Reza's mod of the software had some nice additional automatic calibration routines.
It would be great if those were ported to the main branch.
In particular:
It would be helpful to enhance camera settings and add features.
General camera setup:
Viewport and resolution:
Aperture / Exposure lock:
Support auto focus per table area:
When placing the bottom of a pcb Altium says they are rotated 180 degrees.
To combat this all rotations on the bottom layer should be deducted by 180 degrees to get the correct orientation.
I think this is also the case in other cad packages.
File:
https://mega.nz/#!dJtXGC4T!pFb17wAJggP9GT5SZ-zh6j1TPb7rPpbTWloRCpBEZto
I am experimenting with a custom 720p cam for uplooking vision and 1080p for downlooking vision (both modified computer webcams).
Resolution (pixel per mm) is obviously higher than with the pen cams from Juha's kit and also the noise is significantly lower with the CMOS chips I am using - which will hopefully allow higher accuracy for component orientation / detection and positioning.
However, software support is not 100% working yet. The camera image is scaled correctly on the tabs "Camera Setup" and "Run Job", I only see a smaller viewport (basically top-left corner of the full size) on the "Basic Setup" screen - which makes needle position calibration impossible.
My idea to extend LitePlacer for supporting higher resolution cams is the following:
a) Set the desired hardware resolution which the chip should send to computer (e.g. 640x480, 1024x768, 1280ร720, 1920ร1080 pixels). I can specifiy the "size" parameter in VLC for example, so it should be possible. Using a lower resolution often results in less noise and also higher frame rate. Also, this setting would allow to adjust for aspect ratio (4:3 vs. widescreen picture).
b) Define a "viewport" to be used in program. This would basically mean "cropping" the image to a suitable size and aspect ratio. That way, we could use a smaller portion of the total image. This would be beneficial e.g. with lenses that distort the images at the borders and again to use cameras with an aspect ratio different than 4:3.
c) As a bonus, some basic corrections such as mirroring the image or turning it by 180ยฐ could be applied here. Could come in handy if the camera can only be mounted in one direction - but this is less critical.
Does this make sense?
Funny bug: As my vertical screen resolution is too low, I often use the scroll wheel on the mouse to scroll main window.
When I do this, I noticed that A axis is turning at the same time.
I suppose this is a bug, not a feature? ;-)
It seems the following code inside of the IncrementTape() method (below line 498) attempts to call the int.TryParse() method on the Id_Column value (which evaluates to column names such as "R1", or "L10").
The real issue appears to be as simple as using "Next_Column" instead of "Id_Column" like the other functions available in tapes.cs (though keep in mind, attempting to call TryParse() on "Id_Column" values such as "L10" would fail, since TryParse() only ignores spaces, and will return false when non-numerical characters are encountered).
int pos;
if (!int.TryParse(Grid.Rows[Tape].Cells["Id_Column"].Value.ToString(), out pos))
{
// ....
}
I have changed it to the following. I'll have a merge request submitted shortly:
int pos;
string val = Grid.Rows[Tape].Cells["Next_Column"].Value.ToString();
if (!int.TryParse(val, out pos))
{
MainForm.ShowMessageBox(
"Bad data at Tape " + Grid.Rows[Tape].Cells["Next_Column"].Value.ToString() + ", next",
"Sloppy programmer error",
MessageBoxButtons.OK
);
return false;
}
I would like a feature to manually calibrate the pickup height / z-level for component pickup and placement.
This is currently determined implicitly using the micro switch. I envision an additional function that allows a the user to teach the machine the correct pickup and placement height using jog controls - similar to needle height and backoff calibration.
Two use cases for that:
Hello! Is LitePlacer able to correctly orientate 5mm LEDs (e.g. by recognising the outline using the built-in camera)? If not, is this due to fundamental limitations of the camera, or just because there isn't an accurate enough algorithm?
Thanks!
I would like a function to manually teach first and last part position.
There are situations in which sprocket holes are difficult to detect or not even available (e.g. custom trays) but components are still arranged in a repeating pattern / equally spaced.
Procedure:
This would rely on #28.
Up-camera shall be used to determine center and rotation of a component currently held by the nozzle.
This could be achieved by detecting the edges and / or pins using computer vision.
Software should apply necessary corrections to accurately place the part.
This is a must have to place large parts, ICs in TQFP or QFN (no leads) packages and might pace the way towards BGA or fine pitched parts.
Hi @jkuusama, I'd like to contribute to a refactor. What repository should be forked in order to contribute?
I'd like to help develop the next version of the LitePlacer application.
Specifically, I hope to address the following:
Manually assisted placement does not always work as expected!
If placing is started by selecting a part in the CAD data table and using the button Place from CAD Data assisted placement does not work! After joging the part to final position hitting ENTER does not start the final placement but moves the part with the nozzle still down!
Starting placing by selecting a part in the Job Data table and using the button Place Selected from Job Data works as intended.
Attached two logs, one where placing was ok, one where it was nor ok. In both cases I directly pushed the ENTER button after the part was moved and positioned over the placement position.
Looking into the logs at the line PutLoosePartDownAssisted_m: Now fine tune part position. If done press ENTER one can see the different behaviour. In the buggy log it looks like hitting ENTER is restarting the placment job!?
jkuusama, I am not so deep into LitePlacer software and GCode, do you have any idea what went wrong?
Regards
Peter
When initiating needle height calibration from "Basic Setup" the instructions tell me to jog the needle up until it "barely touches PCB" - but when hitting F11 or F12 nothing happens at all.
Might be an issue with focus / key handlers.
I believe application usability would benefit from removing modal popup messages in non-critical situations and introduce a status bar or other form of less intrusive notification instead.
Prominent example: Attempt to move machine outside safe area while jogging. It is sort of annoying to pick up the mouse, move to the dialog window and click OK just because I tried to go right when I wanted to go left. No point for modal here, as the machine does not move anyways...
I suggest to limit modal dialogs to situations where users absolutely MUST pay attention to the dialog and perform an action other than just clicking OK.
I have a large amount of boards full of SMD components. I'd like to try and leave the pick&place unattended for the night - that way, I could start a pick&placing job, go to sleep, then wake up and observe the results. Now, tape hole recognition fails from time to time. It's all fine and good, except that it stops the entire job - even if it's only a single tape failing. Proposal - having a "Skip positions on failure" checkbox (off by default), which makes the Liteplacer software skip a job position in case the corresponding tape is not found, for the job position to then be retried on the next "Place All" press.
As an option, I would like to be able to display the camera images and current position (X,Y,Z,A) in a separate window - much like in RMod / Ver2.
I have a dual screen setup on my machine and it would be great to always have the cam pictures visible on second screen while I control machine via first screen.
I have built quite a powerful led ring (monochromatic red at this point) for the upward camera. I would like to turn it off when not in use so it does not blind me...
I think the TinyG SpinDir pin (logic level output) could be used to achieve this.
The LitePlacer software could pull this pin high whenever the upward camera is used, e.g. needle wobble calibration, component alignment etc.
I might start to work on this myself but still thought I should record it here.
Select method Re-calibrate does nothing?
I put this in a line because I wanted it to re-calibrate at that step.
Did nothing , continued at next component.
Might be also smart to have multiple levels of recal:
1 - only feducials
2 - needle and feducials
3 - home needle feducials
This is a X-post of jkuusama/LitePlacer-retired-experiment#13
I think it is a minor enhancement but a great usability improvement.
In "Run Job" tab I can preview the location of each component by selecting it from the list and clicking "Measured location".
In addition to the coordinates (crosshairs), I would like to see the component rotation in the camera preview as well.
We could use a different color arrow similar to following mockup - showing a part location with 30ยฐ rotation from Juha's "Hello World" file:
(Please note that the picture in my original issue for Ver-2 was wrong).
I would also like to see the orientation of parts when configuring "Tape positions" in a similar fashion - so when I set 90ยฐ for "Rot." I would expect something like this:
Together, these functions would allow me to check if the orientation both for pickup and placement will be correct without actually placing the parts.
This would make setting up a new job simpler and cause me and other less headaches.
Can't place components when there are no fiducial
Due to the fiducial measurement being off one would want to place components without this compensation. But it seems not to be possible?
I'm pressing alt F5 a lot to move the machine around. If I misclick I hit alt-F4 which terminates the program. I found the following technique to avoid that:
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) {
var window = MessageBox.Show(
"Close the window?",
"Are you sure?",
MessageBoxButtons.YesNo);
e.Cancel = (window == DialogResult.No);
}
and it should need to be added to the event handler in the designer
It would be great if we could set the number of available parts per Tape Position.
Once all available parts from one position are used up (Next Part # > Parts available), software should check for another position with same identifier and use those parts.
If no more parts are left for a given ID, software should pause and ask operator to reload and reset tapes.
This would also help with "Place Fast" option, as it could be used to calculate first and last part position for measuring.
Background:
My cut tape strip feeders work nicely and the tray support in LitePlacer is a nice addition.
While most of the times I can simply load more components than I need, I recently placed a board which had many of the same components. I simply could not load enough parts into one tape position.
In those situations, the above would be the easiest solution I suppose.
IMHO this is a must have as long as machine relies on cut tape strips.
When using a PCB that has the origin in the middle and using job offset importing CSV for top side works fine.
But when trying to load the bottom side by clicking the "bottom" checkbox next to the CAD Data label liteplacer tries to mirror coordinates by turning positive X values negative, if the value is already negative an error message pops up:
When calibrating needle height, Z-axis can be crashed into board.
I noticed this when calibrating needle height and accidentally jogged Z-axis down instead of up. This gets worse when one presses one of the modifiers, e.g. ALT key - in the best case, this will bend and break the needle - but might cause worse damage.
IMHO, it should only be possible to jog Z-axis up when calibrating needle height. Also, modifier keys should be disabled so only baby steps are possible.
As an additional safeguard, X, Y and A movement could be disabled while performing said calibration, so one does not accidentially "scratch" the PCB.
Make a wizard to easily (re)run necessary calibration after turning off power or changing needle, as recently discussed here:
http://liteplacer.com/phpBB/viewtopic.php?f=10&t=74&start=100#p1054
My LitePlacer clone is 630 mm wide. If machine is positioned far right and I attempt to home X axis, the travel takes too long and I get a timeout before the limit / home switch is tripped.
I think the timeout should ideally be derived from safe area X dimension.
When placing the bottom of a pcb the coordinates are inverted because they are looked upon from the top side of the pcb:
File:
https://mega.nz/#!dJtXGC4T!pFb17wAJggP9GT5SZ-zh6j1TPb7rPpbTWloRCpBEZto
If you do x offset -100 mm they are in the correct location
It is not possible to have a separate coordinate system in altium or change it to be in the "right" direction.
I upgraded to 05_02_2016b and camera handling seems broken - at least with my cameras.
I tried Logitech C270 upcam, Andonstar and Ednet 1080p (webcam mod) downcam.
When I check "Keep Active" on either of the cameras, the cam preview always "flickers" between the two camera images. So I more or less see both pictures at the same time. Also, when attempting any operation that requires camera the program crashes with the following exception:
Full stack trace:
keep_active.txt
Without the "Keep Active" enabled and using fast switching ("Robust" checkbox unchecked), I also get an exception whenever I try to place parts:
Again full stack trace:
place_robust_not_active.txt
When enabling the "Robust" checkbox, it seems to work better - although I still managed get exceptions and "red X" camera preview during longer p&p jobs. Unfortunately I did not record the latter.
To me, the camera problems are a major inconvenience and thus I switched to Karl's fork for the time being.
If the machine is already positioned far left when executing "Home X" from "Basic Setup", the machine will crash into the leftmost barrier. It attempts to go beyond and will not stop unless TinyG is reset, although it is tripping the limit switch.
I experienced this behaviour when hitting "Home X" button several times in a row.
It seems to me that the - when homing X axis - machine first moves a few milimeters to the left before actually starting homing procedure and during this time limit switches are not handled correctly.
The other axis do not have this issue.
I suggest to introduce some sort of position confidence management - could be very basic for now.
The application could keep an internal flag that stores if the current position is "valid". Flag should be enabled after the machine is homed and disabled again whenever TinyG is reset, connection is lost or motor power is disabled.
If software is not confident about the actual position, it should not allow any movements and request the user to home the machine first.
This would greatly reduce the risk of "banging the machine into the wall".
For experts, we could still keep an option to override so they can still crash their machines ;-)
Well, first it does not actually stop the machine when pressed. The nozzle goes all the way down before stopping. After that is done, you can not bring back up the nozzle or do anything with the machine. It just says "can not move nozzle is down". When you click the home button nothing happens. The only way I got it to move up is if I hit the "manual change nozzle" button and that brings it up. However, you still can't move the machine. When you hit the physical reset button, the home still does not work. It will only home the z-axis and then stop. To get it to work again you have to reset the board, close the application, reopen it, connect to the board, re-home and remeasure before continuing the job. This can be quite frustrating when you are in the middle of a board job and you notice the machine failed to pick up a part so you need to stop it to correct the issue.
There is something I don't quite understand about where Visual Studio stores and retrieves settings at development time or run time.
Recently I updated my old fork to the newest version. Now I have the problem that when I start placing parts the pump is not switched on. After start of program Pump On & Vacuum On(solenoid valve) is marked as on, so the program thinks that the pump is already switched on. To get it work I need to manually switch off the pump & solenoid valve in the Basic Setup tab.
Using my old LitePlacer version which based on a version from 2016 I do not have this problem.
I think the problem may caused by the line commented with // to force action
public void PumpDefaultSetting()
{
PumpIsOn = true; // to force action
PumpOff();
}
In the function PumpOff() PumpIsOn is set to false, but only when the detected controler type is TinyG. The problem is that the controler type is detected after calling PumDefaultSetting(). The log also shows that the sequence is not rigth.
Or could this be a timing problem? After starting the LitePlacer software it needs up to 8 seconds for connecting and reading out the TinyG settings and come to the question for homing.
Version: 1.0.6788.24299, build date: 02.08.2018 13:29:58
Reading C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.Appsettings
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.HomingFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.FiducialsFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.ComponentsFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.PaperTapeFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.BlackTapeFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.ClearTapeFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.SnapshotFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.NozzleFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.Nozzle2Functions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.UpCamComponentsFunctions_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.UpCamSnapshotFunctions_v2
Loading tapes with nozzles data
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.TapesData_v2
Loading nozzle calibration data
Loading nozzle calibration validity data
Loading nozzles data
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.NozzlesLoadData_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.NozzlesUnLoadData_v2
Reading v2 format file C:\Entwicklung\LitePlacer-Juha\LitePlacer-DEV\LitePlacer\bin\Debug\LitePlacer.NozzlesParameters_v2
Using calibration for nozzle 1
Loading temp CAD data file
Loading temp job data file
UpCamera start, moniker= @device:pnp:\?\usb#vid_046d&pid_0825&mi_00#7&74720d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}{bbefb6c7-2fc4-4139-bb8b-a58bba724083}
*** Camera started: 21
DownCamera start, moniker= @device:pnp:\?\usb#vid_5149&pid_13d3&mi_00#7&341cc276&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
*** Camera started: 45
DownCamera activated
Connected to serial port COM3
PumpOff(), qQuintic -- SKIPPED --
*** VacuumOff(), unknown board!!
Finding board type:
==> {"hp":""}
<== {"r":{"hp":1},"f":[1,0,10,4985]}
TinyG board found.
ReadyEvent r
==> ๏ฟฝ
==> {sr:n}
<== {"r":{"sr":{"posx":0.000,"posy":0.000,"posz":0.000,"posa":0.000,"feed":0.00,"vel":0.00,"unit":1,"coor":0,"dist":0,"frmo":1,"stat":1}},"f":[1,0,7,726]}
ReadyEvent r:sr
Reading TinyG settings:
==> {"ec":""}
<== {"r":{"ec":0},"f":[1,0,10,5349]}
ReadyEvent r
==> {"ee":""}
<== {"r":{"ee":0},"f":[1,0,10,5432]}
.....
Regards,
Peter.
When starting the application without hardware controller connected, it freezes completely on my machine (Win7 x64), bloats up memory usage and has to be killed via Task Manager.
From first investigation, issue seems to be located in LitePlacer.SerialComm.Write
or further up the call hierarchy...
I believe when no device is connected, communication should time out and TinyG should automatically go to "disconnected" state on UI.
Add functionality to save tape / component positions to file and reload the definitions from said file at a later time.
This would be of great help when working with custom component trays / jigs.
See related discussions here:
http://liteplacer.com/phpBB/viewtopic.php?f=11&t=64
http://liteplacer.com/phpBB/viewtopic.php?f=4&t=33
As a bonus: When loading a file it would be great if we had the option of either replacing the tape positions already configured in dialog by those from file or simply append the ones from the file. The latter would allow to combine multiple component trays.
Tapes: When next part is changed manually changed back to one or whatever the next part x,y is not automatically changed.
I.e. I changed it to part 1 , it thinks next part is at part 17
When using altium there are more than one XY coordinate.
It seems to use Ref X and Ref Y. Some footprints have these in pin 1.
That is why altium also includes Mid X and Mid y coordinate to combat that.
So it seems that Mid X and Mid Y need to be used for altium.
http://i.imgur.com/TFITsWP.png
Sample file:
https://mega.nz/#!dJtXGC4T!pFb17wAJggP9GT5SZ-zh6j1TPb7rPpbTWloRCpBEZto
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.