Hello Guest it is April 18, 2024, 07:53:40 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - joeaverage

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 »
5571
General Mach Discussion / Re: Switches for Home position
« on: January 13, 2018, 02:09:18 PM »
Hi Gary,
because of the ramp actuation you don't have to mount the switches right at the end of the axis and so avoid fouling with limit switches. Very convenient.
Also ramp actuation means no overrun problems.

Prior to fitting these switches I had no home switches. Would manually reference the machine at start-up but inevitably would not be perfect and as a consequence
soft limits were worse than useless. Suffered quite a few crashes and misaligned cuts on jobs that were in the machine over several days. After fitting these switches
I can home reliably, easily and quickly. Now soft limits are effective and at 0.02mm repeatability jobs lasting several sessions are no longer daunting that they used
to be. Good home switches are the simplest and yet the best means of reducing crashes.

Craig

5572
General Mach Discussion / Re: Switches for Home position
« on: January 13, 2018, 01:43:25 AM »
Hi,
I've use these and they work well.
http://nz.element14.com/omron-industrial-automation/z-15gq22b/microswitch-z-roller-plunger-spdt/dp/1181279

The prices are NZD. I got some equally good Honeywell units for $13USD. Pretty good value. With a ramp actuator I get 0.02mm repeatability.

With any snap action switch you get hysteresis. When pushing downwards to cause the switch to activate, call it z=0, but as you release it upwards it will go past
the point where the switch made, say z=.05mm. Hysteresis is not critical, all it really does is place a larger gap between where the switch makes and where
Mach backs up and the switch unmakes.

One spec which you should think about is 'overun'. It is the distance the button or plunger can travel after the switch activation without banging into an internal
stop and damaging itself. You may notice that the roller plunger types I have used (they are commonly and widely used by OEMs and CNCers) will not be
damaged if the axis overruns, the ramp will at worst depress the roller a couple of mm even with a runaway axis and the switch has a 5mm overrun tolerance.

I can stop a job on my machine, de-power and come back tomorrow, rehome the machine and continue from where I left off within 0.02mm. I now use Mach4 which
has index homing support for even closer homing but I've found I don't really need it, these switches are goo enough on their own.

Craig

5573
Mach4 General Discussion / Re: Mach4 Home switches
« on: January 13, 2018, 12:28:36 AM »
Hi,
firstly I would recommend having separate home and limit switches. It reduces confusion and Mach can then treat each switch in a dedicated manner.

When you flick the switches what shows up on the machine diagnostics page input LEDs? If you are using three motors the M0, M1 and M2 home LEDs should
light. If you are using the same switches as limits as well then the corresponding M0++, M1++ and M2++ LEDs should light ( or possibly M0--, M1-- etc).

On the Configure/Mach/Plugin page make sure that the keyboard plugin is enabled. If you have configured the ESS correctly you should see the on Machs input signals
page something like the attached. Note that you could directly set Machs input signals or as is recommended let the ESS do it when you set that up.

Craig

5574
Mach4 General Discussion / Re: Z 0 help
« on: January 13, 2018, 12:10:37 AM »
Hi,
what is the build number of Mach4 that you are using?

I had a bit of a battle with one of the earlier builds. What you have described sounds like noise causing false triggering. Is it possible to lightly 'load' your
probe circuit so that its less inclined to pick up induced noise?

Craig

5575
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 13, 2018, 12:04:49 AM »
Hi,
try put this in the PLC script:
Code: [Select]
local radius=mc.mcAxisGetPos(inst,mc.Z_AXIS)
if radius==0 then radius=1 end
local surfacespeed=mc.mcCntlGetPoundVar(inst,2134)
local spinspeed=surfacespeed/(6.282*radius)*360
if spinspeed>=15900 then spinspeed=15900 end
mc.mcSpindleSetCommandRPM(inst,spinspeed)

Craig

5576
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 12, 2018, 10:52:09 PM »
Hi,
the speed calculation is reasonably straight forward.

My suggestion is to put some spindle speed adjustment code in the PLC script:
1) Read the current Z position (diameter)
2) Calculate the spindle rpm to suit the required surface speed
3) Apply max and /or min limits to the calculated spindle speed
4) Apply the calculated and limited spindle speed to the hardware spindle.

Step 4) is the critical one. I don't think trying to change the 'steps per unit' value on the fly is the right idea. Once Mach has planned the trajectory and dispatched it
to the controller you can't change it. The controller itself may be able to insert or remove pulses from the pulse stream like a THC function but Mach can't.

Niether can you issue another Gcode command without overwriting the current move and losing it. Lets say you have a coordinated move in X and Z:
G1 X100 Z100 F300.
After a second or so into the move Z has changed and therefore you want to change the spindle speed. If you did something like:
mc.mcCntlGcodeExecute(inst, "S680") 
for instance then it would crash the previous move which has yet to complete, and so wouldn't work.

This API may help:
Quote
LUA Syntax:
rc = mc.mcSpindleSetCommandRPM(
      number mInst,
      number RPM)
I've experimented with it a little and it seems to do the job. That is to say that you can issue a coordinated move, the PLC script will run during the move and it will calculate
the new required spindle speed and issue a speed command WITHOUT the currently executing move being affected.

Note that for the purposes of experimentation I have used a Step/Dir out of band motor as a spindle. I observed the spindle speed by monitoring the Sim plugin diagnostics
and it appears to work. I have not tried on my machine and it would represent quite a quite a re-wire from my current configuration. I presume it would also work
with the PWM output but I haven't tried it, that's your job!

I will hash up some code and post it soon.

Craig

5577
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 12, 2018, 02:34:16 PM »
Hi,
the Mach4 Lathe profile has CSS support already. Would that not suffice?

Given that CSS is possible then it should also be possible to get it to work when using a mill profile. Either write a module/plugin using the C++ data structure
or find and use the pound variable, either is doable and the toolkit to do it is provided.

Waiting for NFS....don't hold your breath...anoxia is not pleasant.

Craig

5578
Hi,
your profile is one source of personalized settings but not the only source.

When you set up your profile you will be asked to choose a screen set. I used wx4.set for example. Over a period of time I modified that screenset with various
buttons, scripts and so on. If you now update Mach with the latest build wx4.set will AlSO be overwritten and whatever personalisations you've made will be lost.

The solution is to make a copy of one of the standard screensets, I used wx4.set as above but called it Mywx4.set and used that in my profile as the default
screenset. Now any customisations get saved to Mywx4.set and will not therefore get overwritten.

If I understand correctly modules and plugins need to be saved so they can be reused after an update.

Craig

5579
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 11, 2018, 09:10:41 PM »
Hi,
Mach4's API lists an 'override' axis, which if I understand correctly modifies the movement of the main axis, a THC function is suggested as an example.
I haven't used it so don't really know what can be  achieved with it but it sounds hopeful.

Currently THC is enacted by the motion controller, the regular Z axis motion pulse stream have to be broken up and more pulses inserted or alternately pulses ignored to effect
THC variation 'on top of' regular coordinated Z axis motion. The Hicon controller of Vital Systems is the only Mach4 controller that has THC support, to my knowledge.
Warp9 have been promising THC support for the ESS for best part of a year but no dice as yet.

As for programmatically adjusting the 'steps per unit' of the fly.....Access to the data structure that includes the value is not available to us via LUA but
I would presume that the 'steps per unit' value would be stored in on of Machs pound variables. If you knew which one you could manipulate it directly. It might
not be as convenient as an API nor would it be as robust, NFS makes no representation that a pound variable will retain its precise function over later builds, but
it would work. Would it be worth asking NFS what the pound variable number is?

Craig

5580
Mach4 General Discussion / Re: Setting Motor Counts Per Unit in macro
« on: January 10, 2018, 09:34:35 PM »
Hi,
that API does not have Lua bindings, it is intended to be used in a C++ plugin.

I am not aware of any method to change the steps per unit by means of a script. I think you could write to the ini file and Mach would reflect the changes at the next
restart, clumsy but doable.

Craig

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 »