Hello Guest it is April 25, 2024, 11:31:33 AM

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 »
5751
Mach4 General Discussion / Re: Reference all home help.
« on: December 03, 2017, 04:32:02 PM »
Hi,
I personally would not have it run automatically with Ref All but be called from a screen button or physical button.
Motion which happens automatically has the tendency to catch you out on occasion and cause a crash.

The good thing about Mach4 is that you can make it do pretty anything you want. Provided you place the code appropriately
you can have any or all of those behaviours.

Craig

5752
Mach4 General Discussion / Re: Reference all home help.
« on: December 03, 2017, 03:58:51 PM »
Hi Nick,
additionally if the code is embedded in another function the only way to get it to run is to run the function in which it
is embedded, ie Ref All.

If however you leave it in the screen load script it is visible to all parts of the GUI. Thus you could call on the GoCenter
function from a screen button, a physical button and if you want to your Ref All script could also call it. Leaving the
GoCenter() function in the screen load script offers you the maximum flexibility.

Craig

5753
Mach4 General Discussion / Re: Motion Controller recommendation
« on: December 03, 2017, 03:52:27 PM »
Hi,
that is correct, the FPGA on the previous model USB SmoothSteppers is smaller and somewhat less capable than the ESS.
Warp9 hope to release a plugin for the USB version to run Mach4 but are focused on completeing the ESS plugin.

The ESS has been on the market for some years, do you not suppose that there would have been a major backlash had
it not been capable of controlling a spindle? It does in fact control a spindle perfectly adequately, depending on the breakout
board you've selected to partner it, and is one of the most popular external motion controllers for either Mach3 or Mach4.

Craig

5754
Mach4 General Discussion / Re: Motion Controller recommendation
« on: December 03, 2017, 03:19:07 PM »
Hi,
yes it does, PWM. And PID spindle control has just been released last week.

Craig

5755
Mach4 General Discussion / Re: Motion Controller recommendation
« on: December 03, 2017, 03:07:27 PM »
Hi,
the ESS by Warp9. Still has ribbon cables to connect to standard breakout boards which are required.
been in the Mach market since there was a Mach market just like PMDX.

Craig

5756
Mach4 General Discussion / Re: Reference all home help.
« on: December 03, 2017, 02:32:53 PM »
Hi,
yes you could but I wouldn't advise it, certainly while the code is still being developed. You run the risk of grafting
faulty code into an important Mach function and possibly break Mach in a way that might be hard to fix.

I have the code in two locations. Per Daz's suggestion I have made a temp file in my profile which allows me to use
the editor for debugging.

Once I was happy enough that the code was OK I then put it into the screen load script, just before the Sig Lib
code for convenience. I stripped the  if (mc.InEditor) conditional out but otherwise the code is indentical.

Put GoCenter() as left-up script of your screen button and your'e done.

You may if all is well include a reference to the function from your Sig Lib so that a physical button can be used.

To start with just put it in the screen load script and attach the screen button. Once you've experimented with it
and proven its worth THEN consider how you might extend it and the means of utilising it.

Craig

5757
Mach4 General Discussion / Re: Creating your own homing script
« on: December 03, 2017, 04:11:34 AM »
Hi RT,
index homing is usually enacted by the motion controller. The ESS certainly is and that's what I'm familiar with.

The reason is that if Mach were monitoring the index signal there will be a delay of milliseconds at the least before it could make some sort of decision
and stop the motor. If enacted within the FPGA or DSP chip of the external controller it could respond within microseconds, this is exactly what the ESS does
and so it can very quickly detect and act on an index pulse.

Within the limitation that Mach is going to respond slowly with consequences re the accuracy of the homed position I can see several ideas that would allow
you to monitor the index pulse.

One I've had some success with is:
Code: [Select]
LUA Syntax:
rc = mc.mcSignalWait(
number mInst,
number sigId,
number waitMode,
number timeoutSecs);
This responds at the rate of the signal script, ie pretty damn quick. If I understand Machs treatment of signals then within a millsecond or so.

Another possibility is to have code within the PLC script which reads the index input. The PLC script in Mach4 runs a lot faster than the macro pump in Mach3
but would still represent a potential delay in reading an index pulse of 10milliseconds or so.

Your code does something similar, you read the index pin and if not active then sleep for 25ms and read it again. In the mean time Mach can do nothing
else. You've given it a job to do so it tries to do it...but it can only do one thing at a time. If for whatever reason it can't do the job you've given it
then Mach is said to block, and you've seen messages to that effect.

I am no Lua expert but I believe that either of the two strategies I've mentioned allow Machs GUI to run while its waiting for an index pulse. In the case of the
first API call approach if an index pulse does not ocurr within a given time it will timeout rather than block.

The broad strategy I'm proposing is:
1) Issue a motion command that allows the spindle to rotate at slow speed for at least one complete revolution. This would require a
    mc.mcCntlGcodeExecute() API call so that the function returns immediately.
2)Have a small block of code to store and manipulate the machine co-ords that would execute when the index signal came active with the mc.mcSignalWait()
    API above.
3) Abort the remainder of the move. Note I'm not sure that a clearing of the motion planner is possible in Lua, it may be restricted to C++ in a plugin.
    Should that prove to be the case then it could be worked around...just let the motion command run its course and then back up to the co-ords stored
     as a result of step 2.

Does any of that sound like it might work to you?

Craig

5758
Mach4 General Discussion / Re: Reference all home help.
« on: December 03, 2017, 02:13:40 AM »
Hi,
shows the Diagnostic/Regfile with iRegs0 expanded. The entries are the defaults, double click to overwrite.

Craig

5759
Mach4 General Discussion / Re: Reference all home help.
« on: December 03, 2017, 02:05:50 AM »
Hi,
no. The actual number substituted at runtime are the contents of the registers Xcenter, Ycenter, Zcenter.

You can see what they contain by Diagnostic/Regfile and expand iRegs0. You can edit any of the register contents by double clicking and overwriting.
Thus while the center of your table might be 10,3,0 you may decide that you want to change that to match some feature of a jig say located at 12,2.56,0,
it would be a simple matter to type those numbers into the iRegs0 entries and carry on. No need to edit code.

Craig

5760
Mach4 General Discussion / Re: Reference all home help.
« on: December 03, 2017, 01:57:37 AM »
Hi Nick,
the code is clean and ready to run. The only change was to remove the GcodeExecuteWait and substitute GcodeExecute per Daz's recommendation.

The typo comes from the fact that in the API.chm the two API calls show exactly the same syntax, ie someone who composed the .chm entry forgot
to put the 'Wait' in one API call and I didn't notice until after I'd posted.

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 »