Page 1 of 1

CNC_Z: Cnc in error state

Posted: Sun May 29, 2016 9:30 pm
by magellan23
Hi,

just tried to start the first job and I always ran into a CNC_Z error. This is what the log says:

Code: Select all

{"sr":{"posz":28.561}}
{"sr":{"posz":41.828}}
{"sr":{"posz":53.194,"vel":2165.23}}
{"er":{"fb":438.02,"st":204,"msg":"Limit switch hit - Shutdown occurred"}}
{"qr":30,"qi":1,"qo":0}
VacuumOn()
###{"gc":"M08"} discarded, error state on
PickUpPart_m(): needle up
###{"gc":"M05"} discarded, error state on
CNC_XY_m, x: 97.926086, y: 298.135
Needle down error.
CNC_XY_m, x: 98.926086, y: 299.135
Needle down error.
CNC_XY_m, x: 0, y: 0
Needle down error.
VacuumOff()
###{"gc":"M09"} discarded, error state on
Needle is going down to the part to pickup and then the error occurs. To my mind hitting the limit switch during picking should be ok, or not? What can I do, I am pretty helpless now....

Thanks and best regards

Andreas

Re: CNC_Z: Cnc in error state

Posted: Mon May 30, 2016 1:06 pm
by JuKu
> To my mind hitting the limit switch during picking should be ok, or not?

Only on first part.

This is the way it is supposed to work: When you calibrate the needle, the system gets the Z difference between limit switch triggering and the needle just touching the target (backoff). You set the placement depth, somewhere between these values, allowing you to set the placement force and tolerances for errors. For reference, my backoff is 2.2mm and placement depth is 1mm. In other words, when my machine is operating, the pickup and placement goes 1mm from "barely touching", ensuring good pickup contact and adequate placement force, and I still have 1.2mm tolerance for unexpected switch triggering.

before a part is used (right after setting up a tape), the pickup and placement heights are not known. These heights go by tape. When first pick up and place, the heights are probed (slow movement), using the limit switch. The software gets the limit switch trigger height, calculates the desired pickup and placement Zs and puts them to the tapes table. On following operations these values are used, allowing for higher speed. The trigger switch is guarding for error situations.

Your switch is triggering when the software is not expecting it. My first guess would be that you have set and used some tapes, and tuned and recalibrated the needle after that. The system is using the values from the previous needle setup, not bothering to re-measuring the Zs and hitting the switch. My bad, the software should reset existing Z heights on needle calibration. This will be fixed on next release. If I'm guessing right, select a cell in tapes dialog and click "Reset Z's" button. Do this for all rows.

If this does not solve it, check that you have some tolerance in the needle calibration values. Also, I assume that you get the error only at actual needle down situation and not random errors during operation (in which case, the solution is more noise tolerant wiring for switches).

If the error stays, please send a full log of the event (click the log window, ctrl+A to select all, copy and paste to a text document). Also, send text $$ . This will dump all the TinyG settings to the log window in human readable form. And finally, tell me your needle calibration values. With this information, I can find out what is going on.

--
edit: Need to reset Z's for each row separately.

Re: CNC_Z: Cnc in error state

Posted: Thu Jun 02, 2016 10:31 am
by magellan23
Ok, thanks for your explanation, after resetting Zs this is working now. Unfortunately I ran into another issue. In the cad table I have a component with rotation 270. If I mark this component and say "Place" it is placing the component without the rotation. The needle is going to position: ==> {"gc":"G0 X87.5207142666667 Y363.566 A270"}, it is picking up the part, going to placement position: ==> {"gc":"G0 X176.395870266667 Y56.06 A270.4279"} and placing the part. I can see that the needle is rotating before it is picking the part and then the rotation stays even after placing. Is there a wrong setting or what can I do?

Code: Select all

Place
==> {"gc":"M03"}
CNC_XY_m, x: 0.1596916, y: 36.081
{"r":{},"f":[1,0,13,72]}
==> {"gc":"G1 F150 X0.03 Y36.081"}
{"r":{},"f":[1,0,31,132]}
{"sr":{"posx":0.528,"posy":36.581,"vel":7.32,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":0.205,"posy":36.256,"vel":150.00}}
{"sr":{"posx":0.030,"posy":36.081,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
CNC_XY_m ok
CNC_XY_m, x: 0.6598916, y: 36.581
==> {"gc":"G1 F150 X0.528 Y36.581"}
{"r":{},"f":[1,0,32,133]}
{"sr":{"posx":0.030,"posy":36.081,"vel":7.32,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":0.362,"posy":36.414,"vel":150.00}}
{"sr":{"posx":0.528,"posy":36.581,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
CNC_XY_m ok
PlaceRow_m(25)
PlaceComponent_m: Component: CW02, Row:25
PlacePart_m, Component: CW02, CAD data row: 37
PickUpPart_m(), tape no: 0
BuildFunctionsList:
Meas. zoom /  / 3 /  /  /  / 
Threshold / 119 /  /  /  /  / 
CNC_XY_m, x: 14.1846784, y: 325.796
==> {"gc":"G0 X13.012 Y325.796"}
{"r":{},"f":[1,0,29,109]}
{"sr":{"posy":36.581,"vel":0.75,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":0.799,"posy":42.862,"vel":5620.23}}
{"sr":{"posx":2.072,"posy":72.358,"vel":10009.31}}
{"sr":{"posx":3.471,"posy":104.758}}
{"sr":{"posx":4.869,"posy":137.158}}
{"sr":{"posx":6.268,"posy":169.558}}
{"sr":{"posx":7.666,"posy":201.957}}
{"sr":{"posx":9.065,"posy":234.357}}
{"sr":{"posx":10.499,"posy":267.588}}
{"sr":{"posx":11.898,"posy":299.988,"vel":9954.45}}
{"sr":{"posx":12.914,"posy":323.537,"vel":3200.13}}
{"sr":{"posx":13.012,"posy":325.796,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
CNC_XY_m ok
GoToCircleLocation_m(), FindTolerance: 1.8, MoveTolerance: 0.5
Downcamera stop: unconnected
DownCamera start, moniker= @device:pnp:\\?\usb#vid_1908&pid_2311&mi_00#7&2a91081d&1&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
*** Camera started: 18, True
Optical positioning, round 0, dX= -0.299, dY= 0.039, tries= 0
Needle.Move_m(): X= 11.8858656, Y= 331.335, A= 270
CNC_XYA_m, x: 88.8295518666667, y: 363.566, a: 270
G0 X87.5207142666667 Y363.566 A270
==> {"gc":"G0 X87.5207142666667 Y363.566 A270"}
{"r":{},"f":[1,0,44,166]}
{"sr":{"posx":13.012,"posy":325.796,"posa":0.000,"vel":4.50,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":21.582,"posy":330.140,"posa":31.055,"vel":27372.44}}
{"sr":{"posx":52.333,"posy":345.728,"posa":142.489,"vel":37932.10}}
{"sr":{"posx":82.205,"posy":360.871,"posa":250.738,"vel":22230.04}}
{"qr":32,"qi":0,"qo":1}
{"sr":{"posx":87.521,"posy":363.566,"posa":270.000,"vel":0.00,"stat":3}}
ReadyEvent stat
PickUpPart_m(): Part pickup, Z40.269
G0 Z40.269
==> {"gc":"G0 Z40.269"}
{"r":{},"f":[1,0,20,100]}
{"sr":{"posz":0.000,"vel":0.58,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posz":2.679,"vel":1916.35}}
{"sr":{"posz":9.156,"vel":2000.00}}
{"sr":{"posz":15.643}}
{"sr":{"posz":22.130}}
{"sr":{"posz":28.784}}
{"sr":{"posz":35.271}}
{"sr":{"posz":40.143,"vel":389.38}}
{"sr":{"posz":40.269,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
VacuumOn()
==> {"gc":"M08"}
PickUpPart_m(): needle up
{"r":{},"f":[1,0,13,72]}
G0 Z0
==> {"gc":"G0 Z0"}
{"r":{},"f":[1,0,15,74]}
{"sr":{"posz":40.269,"vel":0.58,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posz":37.265,"vel":1959.88}}
{"sr":{"posz":30.780,"vel":2000.00}}
{"sr":{"posz":24.293}}
{"sr":{"posz":17.806}}
{"sr":{"posz":11.319}}
{"sr":{"posz":4.665}}
{"sr":{"posz":0.076,"vel":278.35}}
{"sr":{"posz":0.000,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
PlacePart_m: goto placement position
Needle.Move_m(): X= 99.654, Y= 23.829, A= 270.4279
CNC_XYA_m, x: 176.597686266667, y: 56.06, a: 270.4279
G0 X176.395870266667 Y56.06 A270.4279
==> {"gc":"G0 X176.395870266667 Y56.06 A270.4279"}
{"r":{},"f":[1,0,47,169]}
{"sr":{"posx":87.521,"posy":363.566,"vel":0.78,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":89.336,"posy":357.285,"posa":270.009,"vel":6098.41}}
{"sr":{"posx":97.861,"posy":327.789,"posa":270.050,"vel":10409.29}}
{"sr":{"posx":107.226,"posy":295.388,"posa":270.095}}
{"sr":{"posx":116.590,"posy":262.986,"posa":270.140}}
{"sr":{"posx":125.955,"posy":230.584,"posa":270.185}}
{"sr":{"posx":135.320,"posy":198.183,"posa":270.231}}
{"sr":{"posx":144.685,"posy":165.781,"posa":270.276}}
{"sr":{"posx":154.290,"posy":132.549,"posa":270.322}}
{"sr":{"posx":163.655,"posy":100.147,"posa":270.368}}
{"sr":{"posx":172.728,"posy":68.749,"posa":270.410,"vel":8582.70}}
{"sr":{"posx":176.364,"posy":56.169,"posa":270.428,"vel":439.01}}
{"sr":{"posx":176.396,"posy":56.060,"posa":270.428,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
PlacePart_m(): Part down, Z39.802
G0 Z39.802
==> {"gc":"G0 Z39.802"}
{"r":{},"f":[1,0,20,100]}
{"sr":{"posz":0.000,"vel":0.58,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posz":2.841,"vel":1940.47}}
{"sr":{"posz":9.328,"vel":2000.00}}
{"sr":{"posz":15.988}}
{"sr":{"posz":22.482}}
{"sr":{"posz":28.975}}
{"sr":{"posz":35.469}}
{"sr":{"posz":39.761,"vel":185.67}}
{"sr":{"posz":39.802,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
PlacePart_m(): Needle up.
VacuumOff()
==> {"gc":"M09"}
{"r":{},"f":[1,0,13,72]}
G0 Z0
==> {"gc":"G0 Z0"}
{"r":{},"f":[1,0,15,74]}
{"sr":{"posz":39.802,"vel":0.58,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posz":36.961,"vel":1940.47}}
{"sr":{"posz":30.474,"vel":2000.00}}
{"sr":{"posz":23.814}}
{"sr":{"posz":17.320}}
{"sr":{"posz":10.827}}
{"sr":{"posz":4.333}}
{"sr":{"posz":0.041,"vel":185.67}}
{"sr":{"posz":0.000,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
==> {"gc":"M05"}
CNC_XY_m, x: 176.097816, y: 55.56
{"r":{},"f":[1,0,13,72]}
==> {"gc":"G1 F150 X175.898 Y55.56"}
{"r":{},"f":[1,0,33,134]}
{"sr":{"posx":176.395,"posy":56.060,"vel":7.32,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":176.064,"posy":55.727,"vel":150.00}}
{"sr":{"posx":175.898,"posy":55.560,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
CNC_XY_m ok
CNC_XY_m, x: 176.598016, y: 56.06
==> {"gc":"G1 F150 X176.396 Y56.06"}
{"r":{},"f":[1,0,33,134]}
{"sr":{"posx":175.898,"posy":55.560,"vel":7.32,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":176.230,"posy":55.893,"vel":150.00}}
{"sr":{"posx":176.396,"posy":56.060,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
CNC_XY_m ok
 -- zero Z movement command --
ReadyEvent: zero movement command
CNC_XY_m, x: 0, y: 0
==> {"gc":"G0 X0 Y0"}
{"r":{},"f":[1,0,18,77]}
{"sr":{"posx":176.396,"posy":56.060,"vel":0.78,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posx":169.628,"posy":53.909,"vel":6147.37}}
{"sr":{"posx":140.613,"posy":44.688,"vel":10492.86}}
{"sr":{"posx":108.166,"posy":34.376}}
{"sr":{"posx":75.718,"posy":24.064}}
{"sr":{"posx":43.271,"posy":13.752}}
{"sr":{"posx":12.018,"posy":3.820,"vel":8458.26}}
{"sr":{"posx":0.058,"posy":0.018,"vel":286.01}}
{"sr":{"posx":0.000,"posy":0.000,"vel":0.00,"stat":3}}
ReadyEvent stat
{"qr":32,"qi":0,"qo":1}
CNC_XY_m ok
Many thanks for your support
Andreas

Re: CNC_Z: Cnc in error state

Posted: Thu Jun 02, 2016 1:34 pm
by JuKu
Apparently, the rotation information on the tape table matches the needed rotation. Please see page http://www.liteplacer.com/setup-tape-positions-2/ about setting the rotation information for the tapes.