Hello Guest it is June 03, 2024, 11:32:47 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 »
371
Mach4 General Discussion / Re: How to trigger "action" with an input?
« on: January 09, 2023, 02:58:33 PM »
Hi,

Quote
Is there a general way to execute the "actions" via siglib?  Some of the gui buttons have obvious scripts i can call, others have only these actions.

Some Mach elements have an 'Action' and others have a 'Script'.

In general an Action is a bunch of code within Mach4 that performs a specific action. It is not viewable or editable. For example open the screen editor,
select the Events tab, and inspect the actions available as a drop down menu when you select  say the GCodeLoad button, per the attached screenshot.

Other items items, for instance the CycleStart button has a script rather than an action.......although note from the Events tab it could have either or both. If you wish to see
the script the control to the right of the script will cause the script editor to open so you can view and in many cases edit the script.

Thosj has posted some code that he has put into the SigLib table, and it looks like it would work fine.

Note the the signal script triggers and runs whenever one of Machs many hundreds, both internal and external, of signal change state, which could happen many hundreds of times a second.
For this reason it is recommended that you keep the SigLib table very lean and clean, and in this regard I would write the SigLib table entries more like this:

Code: [Select]
[mc.ISIG_INPUT17]=function(state)
if(state==1) then
     MyBloodyCoolantPumpON()
else
     MyBloodyCoolantPumpOFF()
end
end,

The two functions (MyBloodyCoolantPumpON() and MyBloodyCoolantPumpOFF()) are actually functions in the screen load script. This means that there is minimal code burden
whenever the SigLIb table is called.

Please be assured I never call a spade, just a 'spade' but always a 'Bloody Spade', its a matter of technical pride you understand! :D

Craig

372
Hi,
when you create code for things like a toolchanger it goes into the screen script. Most people start with wx4.set or wx6.set as a basis and work from there.
What people mostly do not do is uniquely  rename the modified screen set script, and as a consequence when they update to the latest build of Mach their
wx4 or wx6 gets overwritten with the new incoming and all that work is lost.

Per Thosj's suggestion go back to a backup of your screen set prior to the 5000 update. Do yourself a favour and give it a unique name, something like MYwx4.set or
similar. Then when you update in a few months time it will survive without being overwritten.

Craig

373
Hi,
yes that would work just as well or better.

I was thinking that you'd need some hysteresis around the center, both NS and EW, otherwise any noise would cause the machine to start to jog.

Lua has a syntax 'only a mother could love' (Smurph's quote not mine) but for this sort of thing is great.

Craig

374
Hi,

Quote
I want directional jog plus proportional velocity (think electric wheelchair control joystick: the farther you push in a direction vector, the faster you go that way).

I think that could be done but would require some electronics.

With the joystick centralized, ie no input then the center contact of each pot would be 1/2 the resistance of the pots. If say 12V were applied to each pot
then the center contact of each would be 6V. If you move the joystick North, 1/2 value then the NS center contact would be 9V while the EW center contact would
remain 6V.

Some electronic circuitry would result in four switching outputs, one each for N,E,S,W.  The speed would be some combination of the absolute value of the voltage
difference between 6V and the center contact of each pot.

For the situation described, namely te joystick at the 1/2 North position I would expect the outputs to be:
N= high
E= low
S= low
W= low
Speed= ABS(9-6) + ABS(6-6)
         =3V

Note that the speed is the sum of the deviation from central of both NS and EW axes.

How are your electronic skills?

Craig

375
Hi,
I follow your general idea and it sounds OK.

Quote
If I use siglib to monitor the register and input, is it safe to assume that it will update at the 50ms rate?  That should be fast enough for reasonable manual control.

No, this is incorrect. Mach4 has dozens of signals, many of them internal but also external input signals for example.
Any time ANY ONE of those signals' changes state the SigLib table is triggered. If the signal has an entry in the SigLib table then
that functionality is triggered. None of these signals are 'polled'. That is to say that the only time the functionality is triggered is if that signal
changes state.

What you want is a polled signal. This is the prime use of the PLC script. It runs every few milliseconds, typically 12.5ms by default. If there is an
input, the joystick for example, that you wish to monitor on a regular basis then the PLC is the place to put the monitoring code.

Note also that Mach4 has ladder logic called the PMC module. It runs every millisecond or so, and thus could just about be considered realtime
and would be very useful for this project.

Can you tell us more about the joystick? I thought the majority of gaming joysticks just had four contacts, one at each carinal point. I would have thought
that a joystick would have been the ideal device to get the directional on/off switching signals rather than the jog speed. The jog speed is best done with
a single potentiometer.

Craig

376
Hi,

Quote
Did you find a solution to this issue? I'm having the exact same problem.

This post is thirteen years old.

USB connected SmoothSteppers, USS, are obsolete, that is to say they are no longer being manufactured, in favour of the
Ethernet connected SmoothStepper, ESS.

You will find support for both the USS and ESS at the Warp9TD Forum.

https://warp9td.com/index.php/kunena/index

Craig

377
General Mach Discussion / Re: Help on Mach screen modification.
« on: January 06, 2023, 05:07:53 PM »
Hi,
you can modify Mach3's screen...but its not particularly easy. You can also use two motors on one axis, its called a 'slave motor'. It can be done in Mach3, but it
it is not quite straight forward as you might imagine, but it can be done.

Mach4 on the other hand do both of these things very VERY much more easily.

Mach4 has a built-in GUI editor which allows you to adapt any screen set to your particular machine and then save it as your own screen set.
Mach4 allows up to six axes with up to five slave motors on each axis!. It can also couple and de-couple slave motors form the master motor
programmatically, at will, so you can devise any number of sophisticated schemes to synchronise or 'square up a gantry'.

If you have not purchased Mach, either Mach3 or Mach4, then I would recommend Mach4. All development and bug fixes on Mach3 ceased eight years
ago. Mach3 still works and many people still use because they are so familiar with it, but whatever bugs/shortcomings Mach3 has its stuck with.

Craig

378
Hi,
yes the ESS requires, or rather benefits from a breakout board. Attached is the picture of my ESS (the green board) atop the LED board and main breakout board.
It is my own design and make.

It has six axis (X,Y,Z,A,B,C) differential outputs, and alarm input for each axis, an ENABLE signal commoned to all axes, a RESET signal commoned to all axes,
an ON/OFF relay contact for the spindle, a PWM output for the spindle, four general purpose outputs capable of sourcing or sinking 50mA at 24V, and 25 general purpose 24V (sourcing 5mA)
inputs. Works a treat.

Craig

379
Hi,
I suspect what you want to do can be done....but you need to break it into two parts.

First part is that you need to be able to use Mach to continuous jog....at a given speed. Just how that speed is derived is another matter.
Lets assume that you have a register, or at least some other variable, that represents the continuous jog speed, it may be a percentage, or it may
be a real number on the range 0-1.

What you need to do is write code that would allow Mach to jog, presumably using keyboard entry, or maybe joystick inputs, at that given speed.

The second part would be to have the PoKeys to measure the analog voltage from your potentiometer or joystick, and convert that into numeric form
and in turn populate the speed register/variable with it.

Craig

380
Mach4 General Discussion / Re: PMDX-416 USB Can't Connect
« on: January 06, 2023, 04:33:00 PM »
Hi,

Quote
I suppose it Could be made to work but I am not going to be that guy who try's to do it!

I don't think so.

Mach4 is a Gcode interpreter and trajectory planner. It's output is a stream of numeric data, blocks of 32bit integer numbers, describing the position of the controlled
point in one millisecond time slices. The motion controller be it an ESS or AXBB-E or whatever converts those numeric coordinates into pulse stream for the axis motors.
The return data to Mach4 is blocks of 32 bit integers which represent the motion controllers machine position.

The format of the blocks of data sent to the motion controller and the format of the blocks of return data are specific to Mach4 and in no way compatible with GRBL.

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 »