Hello Guest it is April 26, 2024, 11:35:03 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 »
4261
Hi,
AC servos are the next generation of servos by comparison to DC servos. The smarts provided by the manufacturer for tuning is the proof of the pudding.
Make no mistake PID tuning is in there, its just that you haven't had to concern yourself with it.

To make use of the scope what you need to do is either expand the following error window greatly or even turn it off. Go to Mach and icrease the acceleration of your X axis to something
very high, in effect infinite. Then if you issue an MDI:
G0 X100
then the X axis will attempt to move to the programmed location very quickly and will only be limited by the maximum speed the servo can accelerate. If you have the scope 'on' to
observe you will see the following error of the axis. As you decrease the acceleration of the X axis in Machs tuning page the following error will reduce. When it reduces to what you determine is
acceptable, lets say 0.05mm then you have established the maximum acceleration your X axis can achieve and you can set your following error window to just accommodate it.

Craig

4262
Mach3 under Vista / Re: Mach3, Windows 7, XP Mode
« on: June 20, 2018, 07:01:02 AM »
Hi,
OK those shot suggest that Mach is installed and running correctly and that the parallel port and pulse engine are running OK.

How have you set up your machine? May I suggest that you post a  shot of your Ports and Pins pages.

Another suggestion is DO NOT TRY TO ASSIGN ALL INPIUTS/OUTPTS AT ONCE. It will almost certainly fail and you will be so confused that you can't work out what the fault/faults are.
Much better is to assign one input or output at a time. Then you will learn those things that work and those that don't. Usually once you have those first few hurdles under your
belt assigning all the other IO comes much easier.

The first input you should try is an Estop switch. You will need a physical switch. Attach it to pin 10 or port 1. Assign that pin and port in Machs Inputs page. You should now be able to disable
Mach (the Reset Button blinks red) by hitting the switch. That confirms that an input to your breakout board is being successfully communicated back to Mach.

Let us know how you get on.

Craig

4263
Mach4 General Discussion / Re: Implementation of physical buttons
« on: June 20, 2018, 06:07:38 AM »
Hi,
open Configure/Plugins/ESS and on the Pins Config page give the input pin, port1,pin10 for example, used for the button of interest a suitable alias, and maybe an active low status.
While still within the ESS configuration screen open the Input Signals page and scroll down and enable one of the general purpose inputs Input10 say, and attach the pin alias
you have allocated to that button. Hit <apply> so that the changes are save to the .ini file.

You can then enter some code into the SigLib table at the top of the Screen Load script, if you follow this example:

[mc.ISIG_INPUT10]=function(state)
      if (state=1) then
               CycleStart()
       end
end

It may not be clear how this simple statement can effect what you wish.

In Mach3 the program would occasionally, every 25ms or so, interrogate all its input signals to see if any had activated. This is called polling. Its not very efficient, it checks each input in turn whether it needs
it or not and then waits for a long time before it checks it again. Mach4 is much better. Whenever ANY signal, input or output changes state it runs the signal script. It doesn't wait until some sampling time
it acts as soon as a signal changes. If for instance one of Machs internal signals changes, say AXIS0_STOPPED the the signal script will run. We are not interested in this signal so we don't act on it. If however
ISIG_INPUT10 changes we are interested in doing something. This is how Mach goes about it:

It runs the Signal Script  as per usual and the standard script is:
if SigLib[sig] ~= nil then
    SigLib[sig](state);
end

I know....so simple ...how can such a simple three lines do anything useful???? All Mach knows at this point is that signal number <sig> has changed to <state>.
What happens is that Mach looks into the SigLib table, a Lua data structure to see if there is an entry in the table that matches <sig>. In our case there is in the form of ISIG_INPUT10.
Given that the test is affirmative Mach now executes the function associated with that entry and passes the variable <state> to the function. Mach now executes the function if <state>=1,
which in our case is yet another function called CycleStart() which is already in the screen load script.

This is an example of two important principles and concepts in Lua. The first is the table. Lua has ONLY one data structure, the table. The individual elements of the table may be arranged
in numerical order 1,2,3 etc. like we would an array in more familiar computer languages, but they can also be named out of order with positive AND negative arguments OR with STRING
arguments. Thus we could have a table:

MyFictiousTableInLua {
[1]='my first entry'
[2]='my second entry'
[2.345]= 'my third entry but note the real as opposed integer argument, perfectly legal in Lua'
[ARG4]='my fourth entry but with a string argument, again perfectly legal in Lua, even a mixed one like this'
[5] = function('it is also legal to have numbers , strings, functions and even a whole other table as an entry')
}

This is just an example of how flexible tables can be in Lua. As often happens in Lua what appears to be a very simple idea has remarkable flexibility and can
convey properties and possibilities well beyond what the simple idea would indicate.
The second  principle is a 'function as a first class value'. Thus you can see the last entry in my nonsense example table is a function whereas all the previous entries were
numbers or strings. A function can be treated just as another number...very simple and clever and allows Lua to perform great feats of computing despite being such a simple
language.

The upshot is that SigLib, a simple table in Lua, is in fact a table that contains functions, one function for each of the signals that we are interested in. Very clever, simple,
elegant and very lean computationally.

Lua is a real eye opener, I thought NFS had made a mistake when I first started to use it but these deceptively simple ideas mean that Lua is very powerful indeed. I
have very much changed my mind. C/C++ can do just about anything but is tightly typed and you have to manage your own memory. Lua is almost type free and
memory management is automatic such a boon to Mach4
When coding I have this link open pretty much permanently:

https://www.lua.org/manual/5.2/

Craig

4264
Hi,
I have a second hand Allen Bradley servo I use for a spindle motor. It has tuning software installed on my PC
to program the drives EPROM.

Amgonst the many many features of the software is a 'scope'. It allows you to follow various variables against
time for instance. Given that I use my servo as a spindle I've never really played with it. As a position
servo you can cause it to display position error (actual encoder count vs programmed position) in time.
It updates at the servo refresh rate, about 20kHz, so is hardly a 'high bandwidth oscilloscope' but none the less
provides a very useful visual indication of following error, all for the sake of a few keystrokes to program/set it up.

I don't know whether Teckincs have provided a similar facility for their Clearpath servos. Such a facility would go a long
way to answering your query about following error window verses positional accuracy. Note that such a display would
include the effects of the mass of the axis and its friction. Very useful and informative.

Years ago when I was at University studying this stuff much of the gear was analogue (resolvers, synchros, storage scopes
and some very groovy long stroke LDVT's), and while digital offer a few wrinkles of it own the principles of feedback
control remain the same. The gear was all expensive, often many many times the value of the servos and amps!

Craig

4265
Mach4 General Discussion / Re: Computer to run Mach4/Mach3
« on: June 19, 2018, 08:41:32 PM »

4266
Mach4 General Discussion / Re: Computer to run Mach4/Mach3
« on: June 19, 2018, 08:38:03 PM »
Hi,
it would appear that the Enterprise version of the LattePanda 4G/64G is still available:

https://www.dfrobot.com/product-1585.html

and for $209....

Craig

4267
Mach4 General Discussion / Re: Computer to run Mach4/Mach3
« on: June 19, 2018, 06:43:36 PM »
Hi,
yes I notice that the OS variant has changed. as of a month or so ago the LattePanda was advertised as
being shipped with Window 10 Enterprise, the Enterprise variant allowed you to turn off updates.

I am not interested any more in a parallel port, of no use whatever with Windows 10. I do like the built
in Arduino though.

Craig

4268
Mach4 General Discussion / Re: Implementation of physical buttons
« on: June 19, 2018, 06:39:10 PM »
Hi,

Quote
I am assuming this list will be like the DoOEMbuttons from mach3?
No, I don't think so.
Open the screen editor and look at the 'Action' property of some of the buttons, the jog buttons for instance.
If you click on it you will find a drop down list of stock actions. Nice to have a look at but not particularly useful
just at the moment.

You really need to set up input pins with the ESS plugin and then put functions/actions in the SigLib table.

Craig

4269
Hi,
if you stand back a bit from your system consider this:

If you issue a step change in position to your machine it will attempt to drive to the new location. If you have set the following error window wide enough that it doesn't
fault at least! The machine will approach its new location and may overshoot and the return for another go.

In classical control engineering parlance that behavior is described by two numerical variables:
OmegaN(atural) which is a measure of the speed of the response of your axis, generally the faster the better and
Zeta the damping figure, 0 is no damping and the machine overshoots wildy, 1 is slightly overdamped and it doesn't overshoot at all, and 0.7071 damping is considered optimal.

These two figures will allow you to calculate the maximum following error for any given input. You may have seen these figures of merit when talking about a servos PID ability.
and its closely related. The dynamics of the servo will be changed by the mass and friction of the axis that the servo is bolted into. Thus if you can calculate OR measure
the dynamics of your axis you can determine the absolute error for any given input. As it turns out calculating it is not easy unless you have very good and extensive
information about your servo/axis. Measuring it is a realistic alternative but will require a sophisticated setup.

Craig

4270
Mach4 General Discussion / Re: Computer to run Mach4/Mach3
« on: June 19, 2018, 02:57:28 PM »
Hi,
that's really good value....

A new PC with Windows 10 preinstalled (4G/64G):

https://www.lattepanda.com/products/3.html

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 »