Hello Guest it is April 27, 2024, 03:15:12 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 »
7401
General Mach Discussion / Re: Does this product exist?
« on: September 22, 2016, 04:39:05 AM »
Hi Davek0974,
some good vid's on youtube about them. Reamarkably simple tho, three coils side by side
with the centre one energised by some AC voltage, few kHz is common, mine is 160kHz.
A magnetic core slips down the middle of the coils, if nearer one end than tother the outer coil
gets energised by transformer action, shift the core to the other end and that coil becomes energised.
Little bit of electronics and you have an infinite resolution linear gage with core in the centre
equal zero V.
They are available comercically as rugged contact free transducers. One with 1mm stroke but centre
accuracy of 100nm right through to 200mm and more stroke with centre accuracy of 20um.
I can't afford to buy one but I can make one! My current one offers 38mV/mm sensitivity and a linear
range of plus/minus 2mm. Not great but getting better.

Craig

7402
General Mach Discussion / Re: Does this product exist?
« on: September 22, 2016, 02:56:06 AM »
Hi Davek0974,
I've had a look at Tweaky's probe and its really nice, his workmanship is superb.
I've not seen anything like it for sale and can only guess that whomever bought
his design went no further with it, a shame.
Except for a few operator bungles I've never had a problem with probing. Nonetheless
I have considered no 'overrun' to be less than desirable.
A good microswitch is not a bad idea. Both Ormron and Honeywell make a competitive
line of switches with good repeatability, hysteresis and overrun. I achieve .01mm repeatability
with 2.5mm overrun with one such switch, I also use the same series of switches for home switches.

More recently I became a bit more ambitious and started making a linear voltage differential transformer.
Project not finished yet but testing shows .002mm absolute accuracy with +-2mm stroke. The example
I'm working on has an overall height of 110mm so not compact. Subsequent designs will be about 50mm
height 4mm stroke and 1um accuracy.

Given that probing works as well as it does this is probably a waste of time but I'm having fun!

Craig

7403
Hi Preso,
I'm not familiar with your controller but your description suggests that it is governed by the parallel port.

It's not an ironclad test but running the Mach3 Driver Test program is simple and can often point you in the
right direction. Does it show a  'clean' or nearly so output. While I run my machine at a kernel speed of 25kHz
I sometimes test much higher, up to 100kHz just to get a feel for the PC's ability. Note that if you change kernel
speed you have to close then restart Mach to see the change, a mistake I've made.

Another useful test is to find the physical terminal on the controller board for the Estop and short it to 0V with a piece of
wire or a 100Ohm resistor if your concerned about letting the smoke out. It should signal Mach to Estop and if so
the controller can communicate with the PC. You could in theory test all inputs this way but becomes pretty tedious
often without learning much more.

If you have the original documentation for the controller find out if it needs an enable signal or possibly a charge
pump. A lot of non responsive BOB's are cured by getting the enable/charge pump settings correct.
Not sure why such a setting may have changed but subtle changes between one setup and another can be very
hard to spot.

One other possibility it the pullup/pulldown resistor settings. Not even sure that your controller has jumpers for
either but can be a source of much confusion when setting up. Given that you have tested the controller on the
old PC makes me think this is unlikely but sometimes changing something and thinking about the results will
inspire a 'lightbulb' moment.

Craig

7404
Mach4 General Discussion / Re: Return Codes
« on: September 18, 2016, 06:25:05 AM »
Hi DTG,
you're right, its totally pointless and your insight suggests not possible.

I imagined that an MDI call to a function that would navigate to a file and load it
would be pretty straightforward. The way you framed your question suggests that you consider
an MDI macro call to be in the nature of 'running Gcode' and such a function would fail as it
would be trying to overwrite itself.

The real purpose is to gain familiarity with Lua and wxLua. The example file dialog that I found in
the Lua Examples folder is really my focus. I need to manipulate it to navigate to a file, read line
by line, preform a mathematical correction and output line by line to a new file, suitably named.

I have done a similar thing in Mach3. My feeling is that the VB variant in Mach3 works but has holes
and Mach3 as good as it is has bugs. If I'm going to make the effort to learn a new language then
Lua is  more modern and capable, ergo the effort should be made there.

Craig

7405
Mach4 General Discussion / Re: how to connect analog joystick to Mach4?
« on: September 18, 2016, 03:57:57 AM »
Hi Leo,
I cant really help much but certain things are clear...

In order to use an analogue signal it will have to be converted to digital before Mach can use it.
On possibility is to use two ADC's (or one two channel) and communicate those values via Modbus.
The ADC's commonly used in microcontrollers are 12 and 14 bits and may therefore lack the resolution
you require. All in all this approach could be a major project.

I may be mistaken but I think HICON have an addon board which accepts two channels analogue. There may well
be others but I recall seeing that feature listed when I was surfing around.

Craig

7406
Mach4 General Discussion / Re: Return Codes
« on: September 18, 2016, 03:44:23 AM »
Hi,
now understand how errorcodes are passed around, thanks DTG.

I'm not out of the woods yet tho...

if(file:ShowModal() == wx.wxID_OK)then
            local path = file:GetPath()   
            local linecount
            local buf
            local rc
            local pathGenerating=1

       rc=mc.mcCntlLoadGcodeFile(inst, path)
            wx.wxMessageBox(tostring(rc))
            rc = mc.mcToolPathGenerate(inst)
           
           
            while(pathGenerating==1)do
                pathGenerating, rc = mc.mcToolPathGetGenerating(inst)
            end
            linecount, rc = mc.mcCntlGetGcodeLineCount(inst)
            buf, rc = mc.mcCntlGetGcodeFileName(inst)




            wx.wxMessageBox(buf.."    lines loaded  "..linecount)
                     
        end

The file dialog gets a good path and filename. If I debug it works ok.
If I run it as m150 at the MDI line it fails. The file dialog operates normally
but the file does not load or generate a toolpath neither the message boxes
come up to indicate progress.
One possibility I considered was that the instructions imediatley following the load
were happening so fast that it was 'breaking' the load.
You can see I've tried to put a while loop in there to allow the load/generate to
complete. It didn't work either, although that may be my poor coding than anything.

The other possibility that occurred to me is that when I start the macro the panel is
showing the MDI input and maybe the Gcode has got nowhere to go.

Might point out that this is not really necessary macro but rather an experiment
in Lua coding.

Craig

7407
Mach4 General Discussion / Re: Return Codes
« on: September 17, 2016, 02:48:37 PM »
Hi DTG,
thanks for that. I guess the definitions are in a C header file somewhere.

I have found, as you suggested I might, a file dialog example in the examples
folder which I can modify for my purpose.

Thanks again
Craig

7408
Mach4 General Discussion / Return Codes
« on: September 17, 2016, 06:52:00 AM »
Hi All,
yet another dumb question from a  Lua virgin...

Have written this code in a file dialog:

rc=mc.mcCntlLoadGcodeFile(inst, path)
            if(rc==MERROR_NOERROR)then wx.wxMessageBox("success")

When debugging the path variable is good, it correctly indentifies a Gcode file
but the return code is a number, value=0.

The API.chm reference:

rc = mc.mcCntlLoadGcodeFile(
      number mInst,
      stringFileToLoad)

and the return codes are:

MERROR_NOERROR No Error.
MERROR_INVALID_INSTANCE The mInst parameter was out of range.
MERROR_INVALID_ARG FileToLoad is NULL.
MERROR_FILE_EXCEPTION Exception while loading file.
MERROR_FILE_EMPTY No data a in file.
MERROR_FILE_SHARING Violation sharing file.
MERROR_FILE_INVALID Not a valid file type.
MERROR_FILE_BADSIZE Invalid file size (over 1.5GB).
MERROR_FILE_NOT_FOUND The file cannot be found in the file system.
MERROR_FILE_BADFORMAT The file had a line end without a new line character. The file may be incomplete.

How is it that the return code from my function call is numeric?

Is MERROR_NOERROR=0
and MERROR_INVALID_INSTANCE=1
and MERROR_INVALID_ARG=2

etc.

Craig

7409
Mach4 General Discussion / Re: Namespace?
« on: September 13, 2016, 03:18:55 AM »
Hi DTG,
looking at the range of mc.mcCalls 99% of any script I'm likely to want/need
are going to be these.
There is one feature that I would like to build into a script however is a 'file browse' window.
When you call 'load Gcode' for instance you can browse to your file of interest and
I presume the function returns a path/filename to the calling app.
I haven't yet found a script or program fragment which codes such a feature but when I
do I will study it mighty hard that I might replicate it for my own use.
Clearly such a feature would be coded with the wx.wxFuncs which in turn create and
manipulate graphics windows and access Windows file structures. Also seems likely to
be reasonably complicated so may have to take some patience pills!

Craig

7410
Mach4 General Discussion / Re: Namespace?
« on: September 13, 2016, 02:58:56 AM »
HI DTG,
thanks for your reply.
That example is great, exactly the style of thing that I'm looking for. Enuf
detail to get the basic structure and syntax and a clue as to how it works.
Then go to a reference manual to get the nitty gritty details.

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 »