Hello Guest it is March 28, 2024, 02:29:25 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 »
341
Mach4 General Discussion / Re: How does G30 work?
« on: January 19, 2023, 05:23:50 PM »
Hi,

Quote
It is modal information. Look at #4000-#4025 or so. It may be listed as 1 for 54 and 2 for 55 etc…. Currently headed home from work so I can’t check in Mach.

Bloody magic....thanks.

Craig

342
Mach4 General Discussion / Re: How does G30 work?
« on: January 19, 2023, 05:00:48 PM »
Hi,
I had been doing some testing also and like you I had populated the fixture table:

G54 x=1 y=1.1 z=1.2
G55 x=2 y=2.1 z=2.2
G56 x=3 y=3.1 z=3.2

And like you I found that the #5041, #5042 and #5043  reflect the current position in work coords and that they changed whenever the current (G54, G55,G56...) work
coord set changes.

So I confirm the same stuff that you have found. What it does not do is tell me which G54,G55, G56 .....is active at the current time even though #5041-#5043 reflect
the current G54,G55 etc.

Craig

343
Mach4 General Discussion / Re: How does G30 work?
« on: January 19, 2023, 04:15:25 PM »
Hi,

Quote
As far as I know, I have only ever used the Machine position for G30... not the work coordinate system I'm currently in....

When I was experimenting with G30 yesterday I found the the intermediate point is described in the current work coordinate system but the final
location is described in machine coordinates.

For instance
G90 G30 X50 Y50 Z50

will cause the machine to drive to 50,50,50 in the current work coordinate system and then drive to the final location described by P1, P2, etc in machine coords.

Or alternately
G91 G30 X50 Y50 Z50

will cause the machine to drive an additional 50mm in X, 50mm in Y and 50mm in Z from its current position and thereafter drive to its final location described by P1, P2 etc in machine coords.

Craig


344
Mach4 General Discussion / Re: How does G30 work?
« on: January 19, 2023, 04:06:34 PM »
Hi,

Quote
Craig, can you just set the #5351,#5352,and #5353 variables right from the G Code Program?

Yes, that can be done, and it would work. What I want to do is automate it. I would prefer to use the Fusion generated Gcode file without alteration,
excepting the addition of one macro call, say m450(), for instance.

The purpose of the macro is to populate the  #5351,#5352,and #5353 variables. For this I would require the machine coordinates of the work zero,
that would suffice for the X and Y axis and the Z axis zero plus 50mm say. The most convenient place to get that data is as you say the system variables,
but I'd like to be sure that I'm using the variables that correspond to the work coordinate offset set that is actually in use.

Lets imagine for instance that the machine is in G55 mode and yet my macro causes the #5351,#5352,and #5353 to be populated but from the G54 set,
that would not end well.

That's why I would like to be able to interrogate Mach's core for the current G54, G55, G56 etc.....so that the macro can select the correct data set,

Craig

345
Mach4 General Discussion / Re: How does G30 work?
« on: January 19, 2023, 03:26:03 PM »
Hi,
I've started using the Machining Extensions of Fusion and for rotary four axis tool paths the more normal Clearance Height optin in the Fusion post no longer works.
G30 is the other good option, but I've never used it before and was struggling to understand how it works. I am reasonably happy about how
it works now but still need to use it properly.

I have used the G30 option in the Fusion post, and now I understand how G30 works its doing exactly as required and as coded. Thus I can have
no complaints about the Fusion post.

I understand I can put the machine coordinates of the safe location in the P1 variables, and that would be fine for say a tool changer which never varies
however I'm trying to replicate a Clearnce Height option For this I would require the Z axis to retract say 50mm above the external diameter of the part.
The X, Y location could be just its current X,Y location......ie
G91 G30 P1  Z10 would work. My understanding is that this would leave the X,Y location unchanged, the Z axis would retract upward by 10mm and then drive to the
Z coordinate of the P1 location. This would be fine.

This is the final few lines of code of a Gcode file produced by Fusion with rotary toolpaths:

Code: [Select]
M9
G30 G91 Z0.
G90
G0 A0.
G30 G91 X0. Y0.
G90
M30

Excepting that the Z axis does not retract to an intermediate point this combination works just fine....IF.....I program P1 location properly.

My plan is to write a small macro which would populate the P1 location in # variables, and that data could be derived from the existing G54.....or whatever
work coordinate set is in use. I cannot find a way for a macro to interrogate Machs core to provide the current work coordinate set. Can anyone think of a means to do so?
I'm thinking something like:

local CurrentSet= mc.mcGet????(inst)     --CurrentSet is an integer describing the current work coordinate offsets in use, eg '54' for G54, '55' for G55 etc

The remainder of the macro would extract the work offsets from the current set, and then apply at least the X and Y offsets directly to the P1 location and the Z offset
would be augmented by some reasonable value for clearance, say 50mm, and that applied to the Z coordinate of the P1 location.

If I can achieve this then I think I could put a macro call into the Gcode file produced by Fusion and it would automatically populate the P1 location and would
require no editing of the existing Fusion code.

Thats  the theory......what is actually practical remains to be seen!

Craig

346
Mach4 General Discussion / Re: How does G30 work?
« on: January 18, 2023, 09:53:16 PM »
Hi Graham,
I think I've got it sorted.

It appears that G30 will move ONLY the nominated axes, that is to say the axes listed in the G30 block. The numeric component of each axis,
say X10, is the location of the intermediate point, and then the machine linearly interpolates from the intermediate location to the stored point.

If you wish for the machine to go direct to the stored point then you use a G91 mode with zero moves in each of the applicable axes. Thus:

G91 G30 P1 X0 Y0 Z0

will cause the machine to go direct from its current location to the stored point P1, with P1 being in machine coordinates.

Conversely a:

G90 G30 P1 X0 Y0 Z50

will cause the machine to rapid to X0,Y0 and Z=50mm, so 50mm above the work zero and from there linearly interpolate to the stored P1 location.

So after some experimentation I think I have got it sorted out. There is a fault in the documentation though, the # variables listed in the Gcode manual
do match those that are actually used.

Craig

347
Mach4 General Discussion / Re: How does G30 work?
« on: January 18, 2023, 07:47:18 PM »
Hi,
I've made a few discoveries, one of which appears to be that the Gcode manual is wrong with respect to the pound varibles used.

In particular reading the Gcode manual for G30 suggests that the variable associated with P2 are #5301,#5302,#5303 etc but that is not in fact correct.
The variables associated with P2 are in fact #5351,#5352,#5353 etc.

These are from my own post:
https://www.machsupport.com/forum/index.php?topic=40051.0
and these values were discovered/evaluated by poppabear:

Quote
G 30 XPOS       5181
G 30 YPOS       5182
G 30 ZPOS       5183
G 30 APOS       5184
G 30 BPOS       5185
G 30 CPOS       5186
WORK SHIFT X       5201
WORK SHIFT Y       5202
WORK SHIFT Z       5203
WORK SHIFT A       5204
WORK SHIFT B       5205
WORK SHIFT C       5206
FIXTURES START       5221       // Fixture start in Parameter list
               Fixture increment is 20, Increment from fixture to fixture. G54 – G59
G 30 P2 XPOS       5351
G 30 P2 YPOS       5352
G 30 P2 ZPOS       5353
G 30 P2 APOS       5354
G 30 P2 BPOS       5355
G 30 P2 CPOS       5356
G 30 P3 XPOS       5361
G 30 P3 YPOS       5362
G 30 P3 ZPOS       5363
G 30 P3 APOS       5364
G 30 P3 BPOS       5365
G 30 P3 CPOS       5366
G 30 P4 XPOS       5371
G 30 P4 YPOS       5372
G 30 P4 ZPOS       5373
G 30 P4 APOS       5374
G 30 P4 BPOS       5375
G 30 P4 CPOS       5376

I have tested them and they are correct namely:

P1 #5181  #5182 #5183 etc
P2 #5351 #5352 #5353 etc
P3 #5361 #5362 #5363 etc
P4 #5371 #5272 #5373 etc

If anyone from NFS is reading this would they please confirm my observations and if they are found correct  then update/correct the gcode manual.

There is more to this yet. As it turns out if you do not include an axis in the G30 block then it will not move nor will it return to the required coordinate.

For example:

G90 G30 P1
will cause no movement what ever. If however you MDI:
G90 G30 P1 X50
then the machine moves to X=50 in work coordinates and then moves to the #5181 but neither of the Y or Z axes move.
I conclude that in order for G30 to work you must include all axes that you wish to move, firstly through the intermediate point in absolute work coordinates and then it will
go to the home location specified by the pound variables locations P1, P2, P3 or P4.

I have yet to do enough experimenting to decide how it works in G91 mode.

Craig

348
Mach4 General Discussion / How does G30 work?
« on: January 18, 2023, 05:52:42 PM »
Hi,
I have need for G30.  This is from the Gcode manual.

Code: [Select]
G30 – 2nd, 3rd, 4th Zero Return
G30 functions the same way as G28, moving the machine to a zero return point via an intermediate
point. However, instead of sending the machine to the home position, G30 movement ends at a user
definable 2nd, 3rd, or 4th zero return point, specified by P2, P3, or P4 respectively. If P is omitted the 2nd
zero return point is selected. This is handy for tool changers that are not located at the home position
or any number of other applications.
Format: G30 P__ X__ Y__ Z__ A__ B__ C__
The 2nd zero return point is defined by # variables as follows:
Axis P2 # Variables P3 # Variables P4 # Variables
X     5301               5311              5321
Y     5302               5312              5322
Z     5303               5313              5323
A     5304               5314              5324
B     5305               5315              5325
C     5306               5316              5326
The position values in the # variables can be set in a program or in MDI mode

The problem is that no matter what numbers I put into the pound variables the machine always drives to the machine zero (0,0,0) rather than the coordinates
UI have programmed into the pound variables. Does anyone know what I'm doing wrong?.

Craig

349
Hi,
have you bothered to do any research on kinematic solvers?

Google IKFast, its an open source kinematic solver.

I think the expectation that someone else is going to do it for you is a joke. If you cant be bothered to do anything why should anyone else?

Craig

350
Hi,
while Mach cannot do inverse kinematics, what Mach and a compatible motion controller can do is generate pulse streams for axis motors and
this it does very well.

If you wrote your own kinematic solver the you could use it to effectively 'feed Mach with Gcode' which would result in the motion controller producing
pulses for your drivers.

Gcode we are familiar with tends to be of the form:
G1 Xnnn Ymmm Zppp
which causes the machine to linearly interpolate from its current position to (nnn,mmm,ppp). We conventionally assume that the axes are mutually orthogonal,
ie X, Y, Z but they could be rotary axes just as well. With that understanding (nnn,mmm,ppp) would be the angular position rather than a cartesian position.
If your kinematic solver were to output a stream of angular positions then you could drive your robot arm.

I use Mach4 and am most familiar with it. The scripting language of Mach3 is called Cypress Enable and is a subset of Visual Basic and is a dogs breakfast. Mach4 uses
Lua, which has its challenges also but it blindingly fast and stable by comparison to VB. You could write a kinematic solver in Lua, which would in turn drive Mach4's core.
Note also you can write C code for Mach4, not that I have done so, so I can't give any details about how its done......but if you'd prefer to use C, and for a kinematic solver
I can well imagine C would be preferrable.

Are you up for a software challenge?

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 »