My problems with limit switches - my assembly progress

JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: My problems with limit switches

Post by JuKu »

majsta wrote:Motor Z I have received and tutorial stated at "Wiring the motors at liteplacer.com website" have different colors of wires. I don't see yellow wire on my motor just red,green,black,blue so no yellow as listed in tutorial.
I'm sorry, I didn't notice that the colors changed from one order to another. I don't have a motor to reference right now, but this is not complicated. Please see page http://www.liteplacer.com/wiring-the-motors/ section "Identifying Stepper Motor Coil Pairs". You have 50% chance to get it right. When you test it, Z might move up when you want down (for example, shift+F12 would be 1mm down). If that happens, turn power off and reverse one of the pairs.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches - my assembly progress

Post by majsta »

No problems whatsoever, I have solved that easily. I m just writing what I m doing so maybe someone could find it helpful later.
Danal
Posts: 43
Joined: Fri May 29, 2015 11:07 am
Location: Fairview, TX
Contact:

Re: My problems with limit switches - my assembly progress

Post by Danal »

For future reference:

Changing the wiring is absolutely an OK way to fix the direction of an axis.

It is also OK to reverse that axis in your TinyG configuration, and then save that configuration. The command is: $1po=0 (default) or $1po=1 (reversed) where the '1' is the motor number (usually, but not always, x=1 y=2 z=3, etc).

Personally, I prefer getting the wiring right, because then I can run "factory reset" and/or "Liteplacer built in default" configurations. But I just thought I would mention this option. It can be a quick lifesaver on a large/complex machine.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches - my assembly progress

Post by majsta »

I have problem with Z and needle calibration. Again, probably motor wires are not set properly, because mentioned colors. So if I m right Home Z should go up touch limit switcher and then go back a little down. Then on Needle height should go down touch a PCB and the trigger lower limit switcher and lock in that position. Then I should press F11 or alt+F11 and adjust it. When I do that lower limit switcher unlocks and TinyG reports failure so I need to reset it. Strange thing is that Backoff in my case is reported as 0.00 and that's shouldn't happen. Also various combinations of motor wires placement does not help here.
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: My problems with limit switches - my assembly progress

Post by JuKu »

If Z moves and homing gets it up, the motor is wired correctly. When you click home Z on the basic setup page, what happens? It should go up, activate the switch and come back down a bit. If it goes up but doesn't back off, most common cause is that the switches are reversed. The upper Z switch is the min, the one on the pulley is z max switch.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches - my assembly progress

Post by majsta »

Sometimes that's exactly what happens but sometimes it trigger limit switcher and keep going up. After some time error msg appears
Debug: CNC_BlockingWrite: Timeout on command {"gc":"G28.2 Z0"}
Switch is pressed but like TinyG don't see it, this happens sometimes.
For example once Home Z is done properly and when I try to do it 2nd time this happens.
Problem is also that I can't perform Needle height. Also when I do Needle Down in Up camera setup it goes all the way and hits up cam. Z0 to the PCB here is set on 200.00mm so really strange.
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: My problems with limit switches - my assembly progress

Post by JuKu »

Please double check your switch wiring. Also, do you use shielded cables on motors and switches? It seems that there is an issue with your wiring. The switches need to be operating reliably before the needle height works.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches - my assembly progress

Post by majsta »

Switches are working properly and I have good cables with shielding. Let me explain once more what happens. Needle height calibration makes needle goes down and touch PCB, same time switch triggers. When I try to move needle up to make position where needle barely touches PCB, again same switch triggers and that's normal since needle don't push complete pickup tube anymore. Same time TinyG detects that switch trigger and crash.
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: My problems with limit switches - my assembly progress

Post by JuKu »

Please send the log (click on the log window, ctrl+A to select all, copy and paste to a text document), all the way from power up to the crash. You can type to the log window for comments to tell me what you did. I'm not in the office, but I'll see what I can find out without my reference machine.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches - my assembly progress

Post by majsta »

Tnx, right now using avrdude I have upload what seems to be firmware you said that is used and tested and problem remains lite with latest master version of the firmware:
avrdude.exe -p x192a3 -c avr109 -b 115200 -P COM2 -U flash:w:tinyg-edge-438.02.hex
pause
Here is the log what I m doing:
Application Start
Version: 1.0.6022.16580, build date: 6/27/2016 9:12:40 AM
Reading v2 format file C:\LitePlacer\LitePlacer.TapesData_v2
Reading v2 format file C:\LitePlacer\LitePlacer.HomingFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.FiducialsFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.ComponentsFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.PaperTapeFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.BlackTapeFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.ClearTapeFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.SnapshotFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.NeedleFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.UpCamComponentsFunctions_v2
Reading v2 format file C:\LitePlacer\LitePlacer.UpCamSnapshotFunctions_v2
Downcamera moniker not found. Moniker: @device:pnp:\\?\usb#vid_090c&pid_037c&mi_00#8&e0b67bf&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
==>
==> {"sr":""}
{"r":{"sr":{"posx":0.000,"posy":0.000,"posz":0.000,"posa":0.000,"feed":0.00,"vel":0.00,"unit":1,"coor":1,"dist":0,"frmo":1,"stat":3}},"f":[1,0,10,9512]}
ReadyEvent r:sr
==> {"xjm":""}
{"r":{"xjm":20},"f":[1,0,11,7168]}
ReadyEvent r
==> {"xvm":""}
{"r":{"xvm":800},"f":[1,0,11,453]}
ReadyEvent r
==> {"xsv":""}
{"r":{"xsv":500},"f":[1,0,11,1390]}
ReadyEvent r
==> {"xsn":""}
{"r":{"xsn":3},"f":[1,0,11,6374]}
ReadyEvent r
==> {"xjh":""}
{"r":{"xjh":20},"f":[1,0,11,684]}
ReadyEvent r
==> {"xsx":""}
{"r":{"xsx":2},"f":[1,0,11,8632]}
ReadyEvent r
==> {"1mi":""}
{"r":{"1mi":8},"f":[1,0,11,7985]}
ReadyEvent r
==> {"1sa":""}
{"r":{"1sa":1.800},"f":[1,0,11,327]}
ReadyEvent r
==> {"1tr":""}
{"r":{"1tr":1.2500},"f":[1,0,11,5878]}
ReadyEvent r
==> {"yjm":""}
{"r":{"yjm":20},"f":[1,0,11,2057]}
ReadyEvent r
==> {"yvm":""}
{"r":{"yvm":800},"f":[1,0,11,2503]}
ReadyEvent r
==> {"ysn":""}
{"r":{"ysn":3},"f":[1,0,11,48]}
ReadyEvent r
==> {"ysx":""}
{"r":{"ysx":2},"f":[1,0,11,9141]}
ReadyEvent r
==> {"yjh":""}
{"r":{"yjh":20},"f":[1,0,11,5572]}
ReadyEvent r
==> {"ysv":""}
{"r":{"ysv":500},"f":[1,0,11,3440]}
ReadyEvent r
==> {"2mi":""}
{"r":{"2mi":8},"f":[1,0,11,1659]}
ReadyEvent r
==> {"2sa":""}
{"r":{"2sa":1.800},"f":[1,0,11,2461]}
ReadyEvent r
==> {"2tr":""}
{"r":{"2tr":1.2500},"f":[1,0,11,2424]}
ReadyEvent r
==> {"zjm":""}
{"r":{"zjm":20},"f":[1,0,11,6945]}
ReadyEvent r
==> {"zvm":""}
{"r":{"zvm":800},"f":[1,0,11,4553]}
ReadyEvent r
==> {"zsn":""}
{"r":{"zsn":3},"f":[1,0,11,3721]}
ReadyEvent r
==> {"zsx":""}
{"r":{"zsx":2},"f":[1,0,11,2815]}
ReadyEvent r
==> {"zjh":""}
{"r":{"zjh":20},"f":[1,0,11,461]}
ReadyEvent r
==> {"zsv":""}
{"r":{"zsv":400},"f":[1,0,11,726]}
ReadyEvent r
==> {"3mi":""}
{"r":{"3mi":8},"f":[1,0,11,5332]}
ReadyEvent r
==> {"3sa":""}
{"r":{"3sa":1.800},"f":[1,0,11,1431]}
ReadyEvent r
==> {"3tr":""}
{"r":{"3tr":1.2500},"f":[1,0,11,8969]}
ReadyEvent r
==> {"ajm":""}
{"r":{"ajm":5760},"f":[1,0,11,4228]}
ReadyEvent r
==> {"avm":""}
{"r":{"avm":230400},"f":[1,0,11,7059]}
ReadyEvent r
==> {"4mi":""}
{"r":{"4mi":8},"f":[1,0,11,9005]}
ReadyEvent r
==> {"4sa":""}
{"r":{"4sa":1.800},"f":[1,0,11,401]}
ReadyEvent r
==> {"4tr":""}
{"r":{"4tr":360.0000},"f":[1,0,11,6185]}
ReadyEvent r
==> {"zsn",3}
{"r":{"zsn":3},"f":[1,0,10,3720]}
ReadyEvent r
==> {"zsx",2}
{"r":{"zsx":2},"f":[1,0,10,2814]}
ReadyEvent r
==> {"zzb",2}
{"r":{"zzb":2.000},"f":[1,0,10,6309]}
ReadyEvent r
==> {"me":""}
{"r":{"me":null},"f":[1,0,10,3586]}
Home Z
==> {"zsn",3}
{"r":{"zsn":3},"f":[1,0,10,3720]}
ReadyEvent r
==> {"zsx",2}
{"r":{"zsx":2},"f":[1,0,10,2814]}
ReadyEvent r
==> {"zzb",2}
{"r":{"zzb":2.000},"f":[1,0,10,6309]}
ReadyEvent r
Homing axis Z, timeout value: 18
==> {"gc":"G28.2 Z0"}
{"r":{},"f":[1,0,18,77]}
{"sr":{"coor":0,"dist":1,"stat":9}}
{"sr":{"posz":-0.204,"feed":400.00,"vel":162.07}}
{"sr":{"posz":-1.458,"vel":396.84}}
{"sr":{"posz":-3.079,"vel":396.84}}
{"sr":{"posz":-4.313,"vel":162.07}}
{"sr":{"posz":-4.504,"vel":0.00}}
{"sr":{"posz":-4.722,"vel":168.89}}
{"sr":{"posz":-5.995,"vel":397.62}}
{"sr":{"posz":-7.626,"vel":400.00}}
{"sr":{"posz":-9.259}}
{"sr":{"posz":-10.892}}
{"sr":{"posz":-12.525}}
{"sr":{"posz":-14.158}}
{"sr":{"posz":-15.758}}
{"sr":{"posz":-17.391}}
{"sr":{"posz":-19.024}}
{"sr":{"posz":-20.657}}
{"sr":{"posz":-22.290}}
{"sr":{"posz":-23.923}}
{"sr":{"posz":-25.557}}
{"sr":{"posz":-27.190}}
{"sr":{"posz":-28.823}}
{"sr":{"posz":-30.456}}
{"sr":{"posz":-32.089}}
{"sr":{"posz":-33.722}}
{"sr":{"posz":-35.355}}
{"sr":{"posz":-36.955}}
{"sr":{"posz":-38.588}}
{"sr":{"posz":-40.221}}
{"sr":{"posz":-41.855}}
{"sr":{"posz":-43.488}}
{"sr":{"posz":-45.010,"vel":295.96}}
{"sr":{"posz":-45.570,"vel":17.63}}
{"sr":{"posz":-45.576,"vel":0.00}}
{"sr":{"posz":-45.386,"feed":100.00,"vel":99.49}}
{"sr":{"posz":-45.084,"vel":14.64}}
{"sr":{"posz":-45.079,"vel":0.00}}
{"sr":{"posz":-44.868,"feed":400.00,"vel":158.47}}
{"sr":{"posz":-43.877,"vel":269.40}}
{"sr":{"posz":-43.126,"vel":65.50}}
{"sr":{"posz":-78.000,"vel":0.00}}
{"sr":{"posz":0.000,"feed":0.00,"coor":1,"dist":0,"stat":3}}
ReadyEvent stat
Homing Z done.
Calibrate
Next
Probing Z, timeout value: 18
==> {"zsn",0}
{"r":{"zsn":0},"f":[1,0,10,1278]}
ReadyEvent r
==> {"zsx",1}
{"r":{"zsx":1},"f":[1,0,10,2000]}
ReadyEvent r
==> {"zzb",0}
{"r":{"zzb":0.000},"f":[1,0,10,450]}
ReadyEvent r
==> {"gc":"G28.4 Z0"}
{"r":{},"f":[1,0,18,77]}
{"sr":{"coor":0,"dist":1,"stat":9}}
{"sr":{"posz":-0.218,"feed":400.00,"vel":168.89}}
{"sr":{"posz":-1.491,"vel":398.27}}
{"sr":{"posz":-3.145,"vel":400.00}}
{"sr":{"posz":-4.591,"vel":251.42}}
{"sr":{"posz":-4.999,"vel":5.17}}
{"sr":{"posz":-5.000,"vel":0.00}}
{"sr":{"posz":-4.782,"vel":168.89}}
{"sr":{"posz":-3.509,"vel":397.62}}
{"sr":{"posz":-1.878,"vel":400.00}}
{"sr":{"posz":-0.245}}
{"sr":{"posz":1.388}}
{"sr":{"posz":3.021}}
{"sr":{"posz":4.644,"vel":384.71}}
{"sr":{"posz":5.707,"vel":110.08}}
{"sr":{"posz":5.810,"vel":0.00}}
{"sr":{"posz":75.000,"feed":0.00,"vel":0.00,"coor":1,"dist":0,"stat":3}}
ReadyEvent stat
==> {"zsn",3}
{"r":{"zsn":3},"f":[1,0,10,3720]}
ReadyEvent r
==> {"zsx",2}
{"r":{"zsx":2},"f":[1,0,10,2814]}
ReadyEvent r
==> {"zzb",2}
{"r":{"zzb":2.000},"f":[1,0,10,6309]}
ReadyEvent r
G1 Z74
==> {"gc":"G1 Z74"}
{"r":{},"f":[1,142,16,2137]}
Next
==> {"zsn",3}
{"r":{"zsn":3},"f":[1,0,10,3720]}
ReadyEvent r
==> {"zsx",2}
{"r":{"zsx":2},"f":[1,0,10,2814]}
ReadyEvent r
==> {"zzb",2}
{"r":{"zzb":2.000},"f":[1,0,10,6309]}
ReadyEvent r
Homing axis Z, timeout value: 18
==> {"gc":"G28.2 Z0"}
{"r":{},"f":[1,0,18,77]}
{"sr":{"coor":0,"dist":1,"stat":9}}
{"sr":{"posz":5.592,"feed":400.00,"vel":168.89}}
{"sr":{"posz":4.551,"vel":225.13}}
{"sr":{"posz":4.165,"vel":4.65}}
{"sr":{"posz":4.164,"vel":0.00}}
{"sr":{"posz":-5.000,"feed":0.00,"vel":0.00,"coor":1,"dist":0,"stat":3}}
ReadyEvent stat
Homing Z done.
Post Reply