Hello Guest it is April 19, 2024, 06:35:54 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 »
2471
Mach4 Plugins / Re: Mach4 Modbus with arduino UNO
« on: May 24, 2019, 04:36:05 PM »
Hi,
your welcome.

Mach4 and the ESS is going to blow your mind.....once you realize the potential you'll have machine designs and
control strategies for every situation!

Craig

2472
Mach4 Plugins / Re: Mach4 Modbus with arduino UNO
« on: May 24, 2019, 02:46:14 PM »
Hi,

Quote
The drivers I´m working with have isolators so the BoB is not essential right?

No, a Bob is not essential but one small slip and you will blow the ESS. Is that what you want?
The C25 is like having two C10's. Its a perfectly acceptable solution. The C10 is bi-directional so you can assign
the second C10 to use pins 2-9 as inputs OR outputs. Note the C25 has no optos or relays etc, but then neither
does the C10. The only thing that some users have found is that the LED and 220R current limit resistor across each
of the C25 inputs have dragged the inputs low unintentionally and some users have removed the 220R resistor or LED or
both to prevent them from loading the input.

Quote
The part about the 3.3V and the 5V, is what confuses me... According to the product details of the ESS, all pins are rated for 0V to 5V

No, you are correct, all IO is buffered through 5V TTL despite the FPGA being 3.3V

I work in the electronics field and get nervous when I encounter what amounts to unprotected inputs and outputs like
those on the ESS, one small slip on my part with a multimeter probe or oscilloscope probe can damage the device,
people bring me stuff to fix...not to break!

Craig

2473
Mach4 Plugins / Re: Mach4 Modbus with arduino UNO
« on: May 24, 2019, 01:07:32 PM »
Hi,

Quote
The part i do not understand is why i will need a BoB.

A BoB, or breakout board is not absolutely essential. The main device on the ESS board is the FPGA and is a 3.3V device.
You can hook direct to it but all your control circuitry but would have to be able to work with 3.3V TTL logic. If one
driver feeds back anything more than 3.3V the FPGA blows up.

The main point of having a, or several BoBs, is to provide isolation between the ESS and the real world of drivers and limit switches
and a safe and convenient means to attach the wires. The BoB's themselves don't add any logic or other capability.

The C10 from CNC4PC is a cheap ($23) bi-directional board. You would need one at least for your machine. One BoB would
provide 12 outputs and five inputs. If you want more you could add another BoB which would give you (assuming you set the
bi-directional capacity of the second BoB to 'input') 18 inputs and 16 outputs. That should be plenty.

Note that the C10's are pretty simple. They don't have opto-isolators or relays or PWM to analogue circuits. If you need or
want some of those you would have to make them yourself and add them to the BoB's.

https://www.cnc4pc.com/c10-bi-directional-parallel-port-interface-card.html

I use a pair of Homann Designs BoB's, very similar to the C10's but Aussie made.

https://www.homanndesigns.com/index.php?main_page=product_info&cPath=54_22&products_id=59&zenid=f5jiqild0t71ocv07ujtl80r43

There are more sophisticated BoB's that have all that extra circuitry built in, at greater cost. Also you are then required to
accept the BoB manufacturers solution as to the correct balance of inputs/outputs and the circuitry associated with each.

A good example is the MB3 of CNCRoom, it is specifically for the ESS, it has all three ports of the ESS developed with a balance
of opto-isolated inputs/outputs, differential and single ended inputs/outputs, relays and PWM circuits. Cost $180.

https://www.cncroom.com/interface-cards/mb3?zenid=bjg2fff5vgaekcvvaquepcint7

The ESS is a good choice for an external controller but it does really require a BoB or you risk damaging the ESS.

The PMDX-424 is another choice, it has two ports worth of IO and has a built-in power supply and does not require
a BoB. It is a highly practical solution of very good quality and support/backup. It does not have all the realtime
functionality of the ESS however, things like spindle PID and THC for instance, but does support lathe threading.

https://www.pmdx.com/PMDX-424

If you are scanning around for external controllers, what they support and what they require regarding BoBs:

https://warp9td.com/
https://www.cncdrive.com/UC300ETH.html
https://www.poscope.com/product/pokeys57cnc/
https://www.pmdx.com/SmartBOB-compare
http://www.vitalsystem.com/portal/motion/hicon/hicon_integra/hicon_integra.php

The CSMIO probably belongs on this list but is so pricey and its Mach4 plugin is that buggy that I hesitate to recommend it.
Likewise the XHC product, it doesn't work at all well.

If you have heaps of money and want true industrial quality then consider

http://www.galilmc.com/motion-controllers/multi-axis/dmc-40x0
starts at $2000 for a three axis controller.

Craig

2474
Mach4 Plugins / Re: Mach4 Modbus with arduino UNO
« on: May 24, 2019, 11:28:00 AM »
Hi,
you could use Arduinos to connect Mach4 to your drivers but the effort involved is huge.

Mach4 is a trajectory planner. It produces streams of numbers that describe the P(osition) and V(elocity) over
T(ime) in one millisecond slices. The motion controller takes that numerical data and converts that into pulse streams
for the drivers.

The external motion controllers I've mentioned have either microcontrollers, an FPGA or DSP chips on board or sometimes all
three. The combination is very much more powerful than an Arduino.

You could replicate what they have done but it would be thousands of hours worth of programming to write both the plugin
that lives in Mach4 to adapt it to your controller and also the software for the Arduinos themselves. Remember that the Arduinos
will be required to handle all the realtime functions like homing, probing, limits, THC, lathe threading......etc autonomously.
Making your own motion controller is a HUGE undertaking.

Using Arduinos as a Modbus node is entirely doable. The node could control a spindle or maybe a tool changer, in fact that
is the ideal application for the Modbus protocol.

What Modbus cannot do is transmit simultaneously pulse streams from Mach to your drivers. One is that Mach does not
produce pulse streams but rather PVT data. Two is that Modbus cannot transmit data to multiple devices simultaneously,
or in less than a few micro seconds.

Quote
Im looking the Ethernet SmoothStepper (B-ESS), using that and its plugin im going to be able to control my drivers?

The reason im doing all of this is because i didnt know how to connect my Mach4 to my drivers.

There are a number of motion controllers that you might consider, other than making your own out of Arduinos,
including the Darwin Parallel port. The Darwin Parallel Port ($25 license fee applies) is a software driver that lives on your PC
within the kernel and produces pulse streams for the drivers out of a DB25 parallel port plug. Like the Mach3 parallel port
that it resembles it to must run on a 32 bit Windows OS PC of Windows 7 or earlier. Also like the Mach3 parallel port driver
it has the same limitations like competing software running on the PC causing stuttering and stalling of Mach. Additionally
the Darwin parallel port does not do certain realtime functions like THC and lathe threading. Art Fennerty, who wrote
Darwin has long since stated the Darwin will NEVER have those advanced realtime functions.

Mcah4 was always intended to be complemented by an external hardware motion controller. There are five US and European
made controllers ranging from about $125 to about $600. Galil also do a Mach4 compatible controller but expect to pay over $2000
for a three axis controller.

If you are looking at cheap Chinese made controllers there are none that work with Mach4. There is one company who claim
to have a Mach4 compatible controller, XHC, but it doesn't work.......avoid like the plague.

At the current time the Ethernet SmoothStepper ($190) is the stand-out controller for Mach4 in the 'value for money segment'
of the market. It has recently acquired all the realtime functionality including Backlash Comp, single point Lathe Threading,
realtime THC, spindle PID etc. It has matched and exceeded the Hicon Integra ($600 from Vital Systems) in realtime
functionality and leaves all its competing controllers in its own price bracket like the UC300 and 57CNC in the dust
in terms of realtime functionality.

Mach4 is very good software but to get the most from it really requires an external motion controller like I have described.
Thus Mach4, an ESS and couple of cheapo bi-directional BoBs will set you back about $450-$600.
Mach3 is $175 and you can use a number of motion controllers from Mach3's parallel port driver for free and a number
of cheap, if you tolerate Chinese rubbish, controllers from $50 upwards.

Craig


2475
Hi,

Quote
there is no code under spindle cw and ccw buttons. All it is now, SpinCW() and SpinCCW()

That's correct, and its been that way for years. SpinCW() is a Lua function that turns the spindle on clockwise if its stopped
or stops it if its on. The function is defined and found in the screen load script, I posted a copy of it last post as an example
so you could see how to use it and what instructions Mach uses to do things.

I will repeat it here:

Code: [Select]
-- Spin CW function.
---------------------------------------------------------------
function SpinCW()
    local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
    local sigState = mc.mcSignalGetState(sigh);
   
    if (sigState == 1) then
        mc.mcSpindleSetDirection(inst, 0);
    else
        mc.mcSpindleSetDirection(inst, 1);
    end
end

The only instruction you need is this one:

mc.mcSpindleSetDirection(inst, 0).....it sets the spindle direction to zero, ie it stops it.

If you have an m5() macro execute that line the spindle will stop. Thus you simplest m5() macro would be:

Code: [Select]
function m5()
      local inst=mc.mcGetInstance()
      mc.mcSpindleSetDirection(inst,0)                                   --Stops the spindle
      local hsig=mc.mcSignalGetHandle(inst,mc.OSIG_OUTPUT12)             --assumes your output is output#12
      mc.mcSignalSetState(hsig,1)                                        --Sets the output high
      wx.wxMilliSleep(2000)                                              --Wait for two seconds
      mc.mcSignalSetState(hsig,0)                                        -- Sets the output low         
end

if (mc.mcInEditor()==1)then
      m5()
end


2476
Mach4 Plugins / Re: Mach4 Modbus with arduino UNO
« on: May 24, 2019, 03:37:19 AM »
Hi,
not quite sure what you are trying to achieve but Modbus cannot be used to control axis motors in realtime.

The correct way to control your machine is:

Mach4>>external motion controller (like an ESS or UC300 or Hicon)>>breakout board (if required by your motion controller)>>
Step/Dir servo or stepper drivers.

When you use the Mach Modbus plugin it will create registers, it is the 'owner' of the registers. If you want to access them
for anywhere in Mach you can using:

value, rc = mcRegGetValue(
      number hReg)

and

rc = mc.mcRegSetValue(
      number hReg,
      number value)

For instance if you wish to set a Mobus register to the same as a Mach output, (Machs outputs are owned by Machs core):

local hsig=mc.mcSignalGetHandle(inst,mc.OSIG_OUTPUT12)
local DesiredVariable=mc.mcSignalGetState(hsig)
local hreg=mc.mcRegGetHandle(inst,"Modbus0/YourVariableName")
mc.mcRegSetValue(hreg,DesiredVariable)

and so on.

Craig

2477
Mach4 General Discussion / Re: Mach4 Homing Incredibly Slow Problem
« on: May 24, 2019, 03:19:53 AM »
Hi,

Quote
Can I use the homing switches as limit switches?
Is there a 'best way' to set-up the limits on a machine like mine?

Yes you can combine home and limit functions in one switch ......but why?

If you combine the x++ limit switch and also make it your x axis home switch then WHEN HOMING  Mach will have to
ignore the switch activation as a limit and treat it as a home switch activation. So just while your machine is making
maximum extent excursions Mach has to ignore limits.....yeah right.....that's a good idea!.

If however you have separate limit and home switches no confusion exists. The limit switches are ALWAYS at the max
extents, any activation causes the machine to stop....no ifs or buts...always. Your home switches can be anywhere,
it is common to mount them just short of limits but they could in fact be anywhere in the travel zone. Using home offsets
allows you to define 'Home" as the lower left corner say but the home switches activate near the middle of travel in all axes.

It also means that you can use switches optimized for each job. For instance snap action microswitches have a defined
hysteresis and are superb home switches whereas proximity switches with ill defined hysteresis are not. They do make excellent
limit switches however as they can easily be mounted in such a fashion as not to be destroyed by an over-limit excursion.

Mach4 and your Hicon Integra have swags of spare inputs....why not use them and make your machine control robust?
In Mach3 when so many people had only a single port with only five inputs it was necessary to combine switches because of
the lack of spare inputs.....that is WELL BEHIND you now, so use the advantages that the software and hardware controller
offer.

Craig

2478
Hi,
yes it will be necessary to write a new m5 macro and put it in the macros folder of your profile.

When the Gcode interpreter encounters a macro call like m5() it starts searching for it, first in your macros folder.
If it finds it then Mach will execute the code in it. If it does not find it, it searches in higher folders of the search tree
until it finds Machs built in m5().

If you wish to write your own m5() you will need to include all the functionality of the built in m5() plus whatever
functionality you want.

The trick is trying to discover what the 'original' code is and THEN add to it.

This is the code from the m3/m5 button on the screen and is found in the screen load script:
Code: [Select]
[---------------------------------------------------------------
-- Spin CW function.
---------------------------------------------------------------
function SpinCW()
    local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
    local sigState = mc.mcSignalGetState(sigh);
   
    if (sigState == 1) then
        mc.mcSpindleSetDirection(inst, 0);
    else
        mc.mcSpindleSetDirection(inst, 1);
    end
end
/code]

The spindle is stopped when this instruction is executed:
mc.mcSpindleSetDirection(inst, 0), pretty simple.

You could make your own m5() by using that instruction plus whatever timer you want.

Craig

2479
LazyCam (Beta) / Re: Having issues loading GCode
« on: May 21, 2019, 10:06:33 AM »
Hi.
try removing the curly braces.

Craig

2480
Hi,

Quote
2 start plasma (type:input) -> I have these 2 wired to input pins # 11 & 15 of BoB

No, that is not correct. The manual tells you that you need  a dry contact between the two wires. That does not
mean two pins on your BoB. You need one pin on your BoB to turn on a relay and a normally open contact pair
of the relay are hooked to the two start wires of the plasma.

Quote
2 start machine motion (Type:output)-> I have these 2 wired to output pins # 16 & 17 of BoB

No, that is not correct. The manual tells you that this signal is the same as 'Arc OK' and it is signaled by a dry contact closure
between the two wires of the plasma. You would hook one to the 0V of your BoB and the other to one input pin of your
BoB assuming a pull up resistor at the input pin.

Quote
DIR_IN -> Wired to BoB same pin which is connected to Z axis servo motor DIR-
STEP_IN -> Wired to BoB same pin which is connected to Z axis servo motor STEP-

The THC3T is a hardware controller, it adds or subtracts pulses in addition to those coming from the Bob/ESS to the pulse stream
going to the Z axis driver. You realize that the Z axis will lose reference in Mach. Mach has no way to know how many extra
pulses have been added or subtracted and thus the Z axis will lose reference.

Quote
ARC_OK -> Wired to BoB input pin # 12
EXT_COM -> BoB ground pin

You could hoo these direct to the 'Arc OK' dry contact closure of the plasma OR have the 'Arc OK' hooked to a Mach input
and have that input reflected to a Mach output which in turn signals the THC3T.

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 »