Hello Guest it is April 26, 2024, 02:26:42 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 »
3081
Mach4 General Discussion / Re: Connect to Mach4 using VS 2012 C++
« on: February 13, 2019, 03:37:02 AM »
Hi,
so you want to use C++ because you are not familiar with Lua?

If you look at the API.chm the vast majority of APIs have both Lua and C++ syntax. Those few APIs that do not
have Lua bindings are intended for plugins only. Within those few exceptions anything you can do in C++ you can do in
Lua. Everything required to write, debug and run Lua code is ALREADY INCLUDED in Mach4.

No doubt you can use C++ but not as simply or easily as Lua, at the very least you will have to attach or integrate a C++
compiler/IDE.

Craig

3082
Mach4 General Discussion / Re: Buttons and the script/gcode
« on: February 12, 2019, 07:21:31 PM »
Hi,
OK you don't really care about machine coordinates. To be honest I think that is a mistake. I used to have a few
crashes until I fitted Home switches and 'took control' of my machine coordinates and have had only one crash in the four
years since.

Quote
p.s. i DO have a coordinate DRO in mach3, but never look at it.

You have the same in Mach4. See the pic attached.

What you really require is when you turn on Mach (and enable it) that the machine 'Homes in Place' and then
applies a work offset so that your DROs read 0,0,0.2

Here is some code to do it:

Code: [Select]
function m666()
local inst=mc.mcGetInstance()
mc.mcAxisDerefAll(inst)
mc.mcAxisSetHomeInPlace(inst,mc.X_AXIS,1)
mc.mcAxisSetHomeInPlace(inst,mc.Y_AXIS,1)
mc.mcAxisSetHomeInPlace(inst,mc.Z_AXIS,1)
mc.mcAxisHomeAll(inst)
mc.mcAxisSetPos(inst,mc.X_AXIS,0.0)
mc.mcAxisSetPos(inst,mc.Y_AXIS,0.0)
mc.mcAxisSetPos(inst,mc.Z_AXIS,0.2)
end
if (mc.mcInEditor()==1) then
m666()
end

By way of explanation;
mc.mcAxisDeRefAll()   dereferences any axis that happens to be already homed, unlikely at start up but just to be sure....
mc.mcAxisSetHomeInPlace() just is to make sure that your machine can home in place, I know that you don't have home switches
so the machine should therefore home in place by default.....its just the 'fault' part of 'default' that I don't trust!
mc.mcAxisHomeAll() will now cause your machine to be referenced TO ITS CURRENT LOCATION. Thus if you were to look at the
machine coordinates you would see that the position 0.2 above the corner of your vice will be 0,0,0 (machine coordinates)
mc.mcAxisSetPos() sets the DRO and implies a matching work offset.

This code should be in Mach4Hobby/Profiles/<your profile name>/Macros as:
m666.mcs  The reason for the m666 is because its 'devil' code, to be used at your own risk ::)

You could open the Zero Brane editor, paste the code in and then <save as> and browse to your profiles macro directory.

The last thing you need to do is ensure that the macro will run at start up, or more specifically the initial Enable of
Mach after start up. This has been provided for in Configure/Control/General/Initialisation Codes.

Craig

3083
Mach4 General Discussion / Re: Buttons and the script/gcode
« on: February 12, 2019, 06:10:27 PM »
Hi,
no, you can't set the machine coordinates in Mach3 programmatically either. If all you want is the DROs to read
0,0,0.1 when you start up, that's easy. In Mach4 it requires a script of a few lines, easy.

That does not accommodate the machine coordinates however. The fact that you used this method in Mach3 suggests that you
don't care about machine coordinates and so it would work in Mach4 in exactly the same way.

Woe betide you if you issue a G28 or similar!

The correct way to do it, and if you worked on an industrial machine you would, when you turn it on you would 'reference'
or 'home' it and then MDI g0 x0 y0 z0.1. The machine coordinates would remain referenced for the remainder of your
working day.

If you fit home switches to your machine you could do exactly the same thing.

If you don't have or don't want to fit home switches, then your machine coordinates are all 'over the shop' and if you crash
because of it its your fault.

If you want a script to write the DROs on start up let me know, I will help.

Craig

3084
Mach4 General Discussion / Re: Buttons and the script/gcode
« on: February 12, 2019, 04:35:45 PM »
Hi,
yes that is what I thought, many newcomers have tried to do exactly that.

The problem is even if you can cause the DROs to reflect the actual position, that is where you left it,
you cannot programmatically set the machine coordinates.

https://www.machsupport.com/forum/index.php?topic=39309.0

Craig

3085
Mach4 General Discussion / Re: Buttons and the script/gcode
« on: February 12, 2019, 03:27:35 PM »
Hi Kenneth,
this thread should be in the Mach4 General Discussion board to get maximum exposure.

If I understand you want the machine to move to 0,0,0.1......is that correct?

Do you want a button on Mach's screen OR do you want a macro like m100 that you can MDI?

Quote
can i get mach4 to reopen to the last start it was in ?
like x0 y0 z.2.   right now it starts all axis at zero.

Yes, that can be done, although I suspect your intention has  flawed logic.

If you want the DRO's to read a certain set of numbers on start up, that can be done. What happens though if the machine
has stopped hard to the left, front and top at the end of the last session. Now you start a new session and the DRO's
display 0,0,0.1 when the machine is in its last position? It doesn't make sense.

I think that what you are trying to do, exactly as I did or at least tried years ago, was to devise some means of being able to
turn Mach on and it magically knew where it is and display its position on the DROs. If that is the case you are going to
be disappointed. There are a few workarounds and tricks that can be used to accomplish what you want with fair accuracy,
but those tricks and workarounds are actually harder to understand and implement than using 'homing' or 'referencing'
in the first place.

Can you explain what it you want to achieve and why?

Craig

3086
Mach4 General Discussion / Re: Buttons and the script/gcode
« on: February 12, 2019, 02:49:57 PM »
Hi,
some of those questions are answered here:

https://www.machsupport.com/forum/index.php?topic=39111.msg263977#msg263977

Craig

3087
Mach4 General Discussion / Re: Connect to Mach4 using VS 2012 C++
« on: February 12, 2019, 04:37:31 AM »
Hi,
why? Lua is the scripting language provided....why not use it?

Craig

3088
Hi,
Mach4 Demo does run your machine but craps out after 3-5 minutes. That's what Demo does.

If you don't want it to crap out then buy a licence. If the Demo conditions were any more generous then NFS would
be giving it to you for free.

I notice that in another thread you support the call for better documentation for Mach4. NFS is a small company that
does not have the resources to employ the people necessary to keep up with the documentation, yet in this thread
you seem to demand even freer Demo terms denying NFS the resource to do anything, development, documentation
or even hosting this site.

If you buy Mach4 THEN you become a customer of NFS,  THEN you get the support of the ticket system. If you went all
out and paid for Mach4 Industrial you get priority service including phone support.

Craig

3089
Hi,
well that code is already in Mach4....that's where I got it from.

Craig

3090
Hi,
whether you believe it or not it is Mach4 Demo timing out. Licence it.

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 »