Hello Guest it is March 28, 2024, 11:32:06 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 »
2981
Hi,
I could see a 10k pot and a +12VDCsupply and a -12VDC supply to provide both + and - voltages for forward
or reverse but no PWM input, the analogue input is the wiper of the pot. You cannot feed PWM straight into that.
it must previously have been converted to an analogue voltage. Uless you have a linear opto isolator in mind
I don't see how that would work.

Craig

2982
Mach4 General Discussion / Re: last line not executing
« on: March 01, 2019, 11:14:32 PM »
Hi,

Quote
is there a way to force mach to finish the instructions before it goes on to the next command?

That is exactly what mcCntlGcodeExecuteWait() does. Your problem is you are asking an API to do something it cannot
do because the Gcode interpreter is busy. You should test the machine state prior to calling the API if it critical that the
call progresses and you can, in fact should, test the return code when it completes.

Craig

2983
Hi,
I found a copy of a manual for that DC controller, all in Chinese. On page 11 however there is a diagram showing a 10 kOhm
pot spanning a +12Vdc output, c ground and a analogue input.

If you can arrange for your PWM to analogue converter to output a voltage from 0 to 12V you should be able
to adapt Mach3 to the DC controller.

Quote
Hey so Mach 4. This is a recommended upgrade yes?

I've used Mach4 for 2-1/2 years and am of the opinion that its light years ahead of Mach3.
Mach4 is native to, and really requires an external motion controller like a SmoothStepper or a UC300. Be prepared
to spend a 2-3 hundred dollars on hardware to take advantage of it. If you don't want to spend the money stick with
what you've got.

Craig

2984
Mach4 General Discussion / Re: pmdx411 cannot communicate with device
« on: March 01, 2019, 04:40:03 AM »
Hi,
I had problems with a customer who had an HF start plasma table with the PC some 20'-30' away.

The winning strategy was to put ferrites on the cable, but in three locations, approximately equal distance apart.
I reasoned that the cable was behaving like an antenna. By putting ferrites on it, it broke the antenna from one long
one to four shorter ones.

The customer tried one at each end and while it helped it still wasn't right until he put a third one on.

Craig

2985
Video P*r*o*b*i*n*g / Re: 3d Probing on Granite slabs
« on: March 01, 2019, 04:21:15 AM »
Hi,
the first picture declares the device is a go-nogo unit for tracing the outline of a template.

I don't think therefore that you could call it a scanner in the sense that it can produce a 3D point cloud.
In fact I don't think it can measure distance at all, therefore it might be able to assist in scanning an object or template
that would allow a 2D outline of the object to be produced but not its Z height.

Craig

2986
Hi,

Quote
I have a speed sensor on the lathe already for threading. Does Mach 3 read this speed input and then decide what output to send to the motor controller?

That depends on your motion controller. Mach's parallel port, despite being run in the same PC as the Mach application, is
a motion controller, and can vary its PWM under certain circumstances. There are other external controllers where that is not
the case. Indeed Mach3 always, historically, used to be an 'open loop controller', that is without feedback control.

The attached pic is from Config/Ports and Pins/Spindle Setup. I have never used this particular feature of Mach3, in fact I use
Mach4 now and wont be going back either, but I understand that Machs parallel port requires an index signal from the
spindle, that is one pulse per revolution. The PID control then adjusts the PWM signal to suit the commanded spindle speed.
Note that the control loop is pretty slow, it cannot accommodate rapid excursions in speed but is none the less an advance
on open loop control.

Quote
The Chinese motor controller has the three connections for a 10k pot for the speed control. Its plausible I can plumb my PWM converter into these connections to control the speed?
Yes it is plausible but it is not a slam dunk either. Some US made KB DC controllers can and do work that way, but not all.

Quote
The DC motor has CW written on it. I thought all DC motors were reversible? Wondering if this one is reversible or is there something mechanical that would make it unhappy going in the other direction

You are correct most DC motors are reversible. It depends on the phasing of the brushes on the commutator.
If the brushes are neutrally phased then the motor can run either way. If however you set the brushes a few degrees off neutral
then the motor will work much better one way than the other. It will still run backwards probably but you will likely
reduce the life of the brushes and/or wreck the commutator. It might be that you can adjust the position of the brushes
inside the motor. I personally am not familiar with the process. I have fiddled with and old school DC generator that had
adjustable brushes and you could tell it had a 'sweet spot', not very scientific but it worked.

Craig

2987
Video P*r*o*b*i*n*g / Re: 3d Probing on Granite slabs
« on: March 01, 2019, 03:35:54 AM »
Hi,
kool! This is a simple and cheap way to try it out. Having used Autoleveller I am confident that you could use it
to advantage, and even better, for next to no expense.

Should it prove otherwise or for any other reason you chose to try Mach4 then do yourself a favour and get yourself a decent
US or European external motion controller and be prepared to spend a few hundred on it.

Mach4 was and is intended to be complemented with such a controller. Mach4 has progressed to the point where it matches or in
some cases well exceeds Mach3. It is easier to transition from Mach3 to Mach4 than it used to be but is still far from trivial.
You would be commended to download Mach4 and run it in Demo mode, for free, until you are ready.

If you have not used an external controller before it will cause quite some confusion as to how they work together
and where one hands off to another. Thereafter however the Gcode and operation of Mach4 is very similar to Mach3.
The second learning curve is if and/or when you want to start modifying Mach4 to some specific need of your own.
It is very capable of such modification but is a steep learning curve. Fortunately 99% of Mach4 operations require no
such modification at all.

Let us know how you get on with Autoleveller.

Craig


2988
Mach4 General Discussion / Re: Mach 4 homing erroer
« on: February 28, 2019, 06:44:28 PM »
Hi,
that error is telling you that the code executing the homing routine is asking for the axis powered by motor 2 to drive
to its home switch. Clearly you do not have a motor 2.

Most people with a mill or router assign:
motor 0=X axis
motor 1=Y axis
motor 2=Z axis

With a lathe:
motor 0=X axis
motor 1=Z axis

and there is NO motor 2.

Two ways to skin this cat:
1) In configure/Control/Axis_Mapping assign a motor 2, even if you don't have one.....and set that axis to 'Home in Place'
   in the Configure/Control/Homing-Softlimits page
2) In the Configure/Control/Homing-Softlimits page assign '0' the Home_order of the unused axis.

Craig


2989
Hi,
smurph is one of the lead developers of Mach4 and a seasoned programmer. He has repeatedly suggested to all and sundry
that each and every API call return code be tested. I'm slack and only do so when I get into trouble but there are certain
API's where if you don't test the return code you ARE IN TROUBLE......you don't know when but it WILL BLOW UP IN YOUR FACE.

One such API is mc.CntlGcodeExecuteWait(). Another is mcSignalWait. Having being burnt I usually always test them,
I know it adds complexity to the code but it works and saves grief.

The only time I tend not to test them is if the extra (seeming) code complexity will obscure the program logic, particularly
if I'm posting on the forum for others benefit. In that situation clear concise code with minimal clutter conveys the most
understanding. Code that I develop for my own machine includes multiple test points.

Craig

2990
Mach4 General Discussion / Re: last line not executing
« on: February 28, 2019, 06:18:04 PM »
Hi,
the most likely reason its not executing is because the Gcode interpreter is busy or the motion controller is under command by
another chunk, the GUI chunk for instance. You are overlooking the fact that the API like all Lua functions has a return code.
You need to capture it and test it.

Quote
LUA Syntax:
rc = mc.mcCntlGcodeExecute(
      number mInst,
      string commands)

Description:
Execute G code as a unit of work and wait until it is complete.

Parameters: Parameter Description
mInst The controller instance.
commands A string buffer containing G code.


Returns: Return Code Description
MERROR_NOERROR No Error.
MERROR_INVALID_INSTANCE The mInst parameter was out of range.
MERROR_NOT_NOW The operation could not be completed at this time.
MERROR_NOT_COMPILED The macro scripts could not be compiled.

In particular MERROR_NOT_NOW, which is the same as the number -18.

So try adding this to your code:

Code: [Select]
local rc=mc.mcCntlGcodeExecuteWait(inst, GCodeXMov)
--use encoder positioning
If (rc== -18) then
       wx.wxMessageBox("MERROR_NOT_NOW)
      do return end
end


--set x position to 0.0

This wont solve your problem but will indicate if my guess that the Gcode interpreter is able to accept instructions.
You could also test and message the machine state which might give you an indication which chunk is I control.

Quote
LUA Syntax:
mcState, rc = mc.mcCntlGetState(
      MINSTANCE mInst)

Description:
Get the current controller state.

Parameters: Parameter Description
mInst The controller instance.
state The address of a mcState variable to receive the controller state.


Returns: Return Code Description
MERROR_NOERROR No Error.
MERROR_INVALID_INSTANCE The mInst parameter was out of range.
MERROR_INVALID_ARG state is NULL.

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 »