Hello Guest it is April 23, 2024, 02:39:55 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 »
6491
Mach4 General Discussion / Re: Erratic Feedrate When Cutting Spline Lines
« on: October 01, 2017, 01:26:46 AM »
Hi,
yeah, but hurt in a good way LOL. That last paper that uses a cascade of FIR filters looks like 'just the dogs dangly bits'

Overlapping two motions with a constrained error term...just brill...there are some very sick little puppies out there!

Craig

6492
FAQs / Re: M6 End
« on: October 01, 2017, 01:01:31 AM »
Hi,
not sure I can help, I changed over to Mach 4 so I didn't have to bother with Visual Basic...
If you have a look at the default M6End script you will see the move to the last programmed position before M6Start.
Could you not just delete, or better still comment it out?

Code: [Select]
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
if(IsSafeZ() = 1) Then
   SafeZ = GetSafeZ()
   if  SafeZ  > z then StraightTraverse x, y,SafeZ, a, b, c
      StraightFeed  x, y,  z  , a, b, c
else
Code"G00 X" & x & "Y" & y
end if

I can think of a few situations where diving into the next lot of code is likely to cause a crash...imagine a line of code
G1 X5 Y5 Z-0.5 F50 immediately after a tool change  at  X0 Y0 Z4, ie work co-ords 0,0 with the tool 4 inches above the material.
The tool will now make a linear move to 5,5,-0.5, ie the cut is going to ramp down. Is that desired behaviour?

It sounds to me like you actually want to go to some location but without cutting, ie at SafeZ height and THEN resume your
Gcode. That's possible but will require some programming and you may find that a modification to your post becomes
attractive again.

Craig

6493
Hi,
as far as I know Mach 3 or 4 threading is done with a single pulse per rev. If the speed is constant which is assumed AND required
it makes no difference.

I have used Mach3 and Mach4 and they both work the same. The only real advantage with Mach4 is when it comes to customising your
machine.

I'm thinking that you should probably stick with Mach3 until and unless there is something about Mach4 that you need.

Craig

6494
Hi,
threading is a function that's largely enacted by the motion controller. In the case of Mach 3 the motion controller is the humble
parallel port. While Art has written a parallel port driver for Mach 4 he hasn't bothered to try to add threading, apparently its quite a mission
and he is of the opinion that most users will be better served with an external controller.

To get the best from Mach4 you really need an external controller, there are a half dozen manufacturers who have a good reputation
and make good gear. None of them are free. The cheapest is about $120 and a full blown HICON from Vital Systems could cost $2000.
A UC100 from CNCDrive, a PMDX-411 from PMDX or a PoKeys u57CNCd25 are all very similar, they plug in to your PC with USB and their
output is a db25 plug just like your parallel port, in fact would plug into you G540 no troubles. You will have to do some research to see if
any or all of them support threading. All of these devices are around $120. Note that they only have one 'ports worth' of IO that is 12 outputs
and 5 inputs. You don't need a very sophisticated machine and you run out of IO.

For a few more bucks you can get an Ethernet Smoothstepper from Warp9 which has three ports worth of IO, a PMDX-426 with two ports
or a PoKeys 57E or 57U with 55 IOs, equivalent to a bit more than three ports. There again you will have to do some research to find out
if any of them support threading. I believe the Smoothstepper has very recently added that function, but I can't tell you for sure yet.

As I've already mentioned the HICON unit from Vital Systems is a very good bit of kit with all sorts of functionality but it starts at $600 and
probably you'll want features which take it up to $1200. Those people who've stumped up for one all say they are very good. Can't afford
one myself.

I use an ESS Smoothstepper, about $190 and its been great.

Beware that there are heaps of Chinese UC100 knock-offs on Ebay at the moment and they're rubbish. If you want a UC100 buy from CNCDrive
or their US distributor.

Craig

6495
Mach4 General Discussion / Re: Mach4 Spindle At Speed, Spindle Zero Problem
« on: September 30, 2017, 09:38:13 PM »
Hi Hakan,
I've found another mistake...
the wait command is
Code: [Select]
mc.mcCntlGcodeExecuteWait(inst,"g4 p1000");
so the machine waits for 1000ms or 1 second. The loop repeats in m3 and m5 macros 10 times before faulting out whereas the m4 macro
waits 5 times before faulting. Depending on your spindle, the vid you posted sounds like it takes some seconds to speed up, you may need to adjust
both the wait state length, say p1500, and you may want the timeout delay to be longer, 12 instead of 10 for example. I imagine you'll want to correct
my mistake in the m4 macro by only having the loop repeat 5 times before faulting, it should have been 10 but I missed it!

Craig

6496
Mach4 General Discussion / Re: Mach4 Spindle At Speed, Spindle Zero Problem
« on: September 30, 2017, 09:25:55 PM »
Hi Hakan,
I've been doing some testing and the code I've posted has lots of faults.

The first was my inclination to set up two global variables AtSpeed and IsStopped. They don't pass into the m3,m4 and m5 macros...don't quite understand why
at the moment. What I've done as a working alternative is in each macro get the signal handle and signal state and use that to control the wait loop.

Second issue is that if for whatever reason the spindle doesn't respond, in my case I'm using my laptop so clearly the signal will never go active, then the machine
hangs and will eventually crash.

What I did was set up a timeout variable in each macro which means that if the spindle doesn't respond after ten seconds or so the macro will end, report
an error rather than hang and crash out.

For m3
Code: [Select]
function m3();
local inst=mc.mcGetInstance();
local timeout=0;
mc.mcSpindleSetDirection(inst,mc.MC_SPINDLE_FWD);
mc.mcCntlSetLastError(inst,"m3 waiting");
local hsig= mc.mcSignalGetHandle(inst,mc.ISIG_SPINDLE_AT_SPEED);
local AtSpeed=mc.mcSignalGetState(hsig);
    while (AtSpeed~=1) do;
        mc.mcCntlGcodeExecuteWait(inst,"g4 p1000");
        timeout=timeout+1;
        if (timeout>=10) then;
            wx.wxMessageBox("Spindle does not respond");
            break;
        end;
    end;
    if (AtSpeed==1) then;
        mc.mcCntlSetLastError(inst,"m3 at speed");
    else;
        mc.mcCntlSetLastError(inst,"spindle does not respond");
        mc.mcSpindleSetDirection(inst,mc.MC_SPINDLE_OFF);
    end;
end
if (mc.mcInEditor() == 1) then
    m3()
end

For m4
Code: [Select]
function m4();
local inst=mc.mcGetInstance();
local timeout=0;
mc.mcSpindleSetDirection(inst, mc.MC_SPINDLE_REV);
mc.mcCntlSetLastError(inst,"m4 waiting");
local hsig= mc.mcSignalGetHandle(inst,mc.ISIG_SPINDLE_AT_SPEED);
local AtSpeed=mc.mcSignalGetState(hsig);
    while (AtSpeed~=1) do;
        mc.mcCntlGcodeExecuteWait(inst,"g4 p1000");
        timeout=timeout+1;
        if (timeout>=5) then;
            wx.wxMessageBox("Spindle does not respond");
            break;
        end;
    end;
    if (AtSpeed==1) then;
        mc.mcCntlSetLastError(inst,"m4 at speed");
    else;
        mc.mcCntlSetLastError(inst,"spindle does not respond");
        mc.mcSpindleSetDirection(inst,mc.MC_SPINDLE_OFF);
    end;
end
if (mc.mcInEditor() == 1) then
    m4()
end

For m5
Code: [Select]
function m5();
local inst=mc.mcGetInstance();
local timeout=0;
mc.mcSpindleSetDirection(inst,mc.MC_SPINDLE_OFF);
mc.mcCntlSetLastError(inst,"m5 stopping");
local hsig=mc.mcSignalGetHandle(inst,mc.ISIG_SPINDLE_AT_ZERO);
local IsStopped=mc.mcSignalGetState(hsig);
    while (IsStopped~=1) do;
        mc.mcCntlGcodeExecuteWait(inst,"g4 p1000");
        timeout=timeout+1;
        if (timeout>=10) then;
            wx.wxMessageBox("Spindle does not respond");
            break;
        end;
    end;
    if (IsStopped==1) then;
        mc.mcCntlSetLastError(inst,"m5 Is Stopped");
    else;
        mc.mcCntlSetLastError(inst,"spindle does not respond");
    end;
end
if (mc.mcInEditor() == 1) then
    m5()
end

You can ignore the code added to the SigLib in the signal load script, I don't think it will effect m3,m4 or m5 but I deleted the extra SigLib entries to
be sure.

Craig

6497
Mach4 General Discussion / Re: Mach4 Spindle At Speed, Spindle Zero Problem
« on: September 30, 2017, 06:00:22 PM »
Hi,
just realised that while I set the direction in m3 and m4 I didn't actually turn the spindle on, not sure what output signals you are using
to control the VFD but they may have to be added to m3, m4.

Craig

6498
Mach4 General Discussion / Re: Mach4 Spindle At Speed, Spindle Zero Problem
« on: September 30, 2017, 04:38:09 PM »
Hi,
try these macros, they must be in your current profile:
for m3
Code: [Select]
function m3();
local inst=mc.mcGetInstance();
mc.mcSpindleSetDirection(inst,mc.MC_SPINDLE_FWD);
mc.mcCntlSetLastError(inst,"m3 waiting");
while (AtSpeed~=1) do;
    mc.mcCntlGcodeExecuteWait(inst,"P1");
end;
mc.mcCntlSetLastError(inst,"m3 at speed");
end
if (mc.mcInEditor() == 1) then
    m3()
end

for m4
Code: [Select]
function m4();
local inst=mc.mcGetInstance();
mc.mcSpindleSetDirection(inst, mc.MC_SPINDLE_REV);
mc.mcCntlSetLastError(inst,"m4 waiting");
while (AtSpeed~=1) do;
    mc.mcCntlGcodeExecuteWait(inst,"P1");
end;
mc.mcCntlSetLastError(inst,"m4 at speed");
end
if (mc.mcInEditor() == 1) then
    m4()
end

for m5
Code: [Select]
function m5();
local inst=mc.mcGetInstance();
mc.mcSpindleSetDirection(inst,mc.MC_SPINDLE_OFF);
mc.mcCntlSetLastError(inst,"m5 stopping");
while (IsStopped~=1) do;
    mc.mcCntlGcodeExecuteWait(inst,"P1");
end;
mc.mcCntlSetLastError(inst,"m5 Is Stopped");
end
if (mc.mcInEditor() == 1) then
    m5()
end

Craig

6499
Mach4 General Discussion / Re: Mach4 Spindle At Speed, Spindle Zero Problem
« on: September 30, 2017, 03:22:50 PM »
Hi,
sick of me yet...

On the screen edit page the spindle control button at the lower right of the screen Spindle CW/Stop and SpindleCCW/Stop have two associated
event functions SpinCW() and SpinCCW(). The functions are in the screen load script and are interesting enuf even if simple.

What I suggest is that you replace the event scripts for these two buttons with:
for the left-up script for btnSpindleCW
Code: [Select]
local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);
if (sigState == 1) then;
    mc.mcCntlGcodeExecuteWait(inst,"m5");
else;
    mc.mcCntlGcodeExecuteWait(inst,"m3");
end;

and for the left-up script for btnSpindleCCW
Code: [Select]
local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);
if (sigState == 1) then;
    mc.mcCntlGcodeExecuteWait(inst,"m5");
else;
    mc.mcCntlGcodeExecuteWait(inst,"m4");
end;

Now when your Gcode program encounters a spindle start instruction, m3, the macro runs as normal. If you however manually turn your spindle
on it too will execute the m3 macro rather than the built in SpinCW() function which won't have the delay behaviour you want.

Will comeback with some suggestions for the all important m3,m4 and m5 macros shortly.

Craig

6500
Mach4 General Discussion / Re: Mach4 Spindle At Speed, Spindle Zero Problem
« on: September 30, 2017, 03:04:08 PM »
Hi,
in modern programming there is a distinction between an object and its action.

In this case we have two signals which have conveniently been predefined by the developers of Mach. We can easily connect them to an input pin
for instance but we could also connect it to some other software event.

So we have a signal defined and logically connected to a trigger of some description. We now have to define what that will mean.

You have a signal Spindle at Speed, what do you want Mach to do with it? Machs not magic nor are the developers clairvoyant....you have to decide what
behaviour the machine should exhibit and fortunately there are some clever and flexible tools for you to do that, it will require some learning.

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 »