586,071 active members*
3,820 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 34
  1. #1
    Join Date
    Mar 2007
    Posts
    52

    Changing M5i20 Output signals

    Ok getting closer to getting this machine working however.

    Here is my situation.

    I have EstopWrite hooked up to a relay to my amps. So if there is a failure to the system power is stopped to the amps. At least that what the comments are on the mesa_io.hal file tell me. However I am getting no output signal on m5i20.0.out-07. Please if someone has an idea of how I can hook this up correctly it would be appreciated. Or should I connect this to a different output.

    Here is the current area of the code that I am trying to modify.

    # Connect e-stop write/sense to I/O controller.
    #
    # The estop from the opto module should be jumpered to one of the
    # m5i20 estop pins. This will notify the motion of the estop condition
    # and it will zero the DACs and turn off all output even if the PC
    # has crashed.
    #
    newsig EstopSense bit
    newsig EstopWrite bit
    # create a signal for the estop loopback -- remove for external
    #linkpp iocontrol.0.user-enable-out iocontrol.0.emc-enable-in


    # use this if you have an external estop switch
    #linksp EstopSense <= m5i20.0.estop-in-not
    linksp EstopSense <= m5i20.0.in-15-not
    linksp EstopSense => iocontrol.0.emc-enable-in
    linksp EstopWrite => m5i20.0.out-07
    linksp EstopWrite <= iocontrol.0.user-enable-out


    Also does anyone know how to invert a output signal on the mesa. I also need to change the spindle output from 3.5v at startup which it is now, to 0v. And then when I run the program my relay can turn on the spindle.

    Here is that code from the mesa_io.hal

    # Connect spindle fwd/rev to I/O controller.
    newsig SpindleFwd bit
    linksp SpindleFwd => m5i20.0.out-00
    linksp SpindleFwd <= motion.spindle-forward

    The current system is running emc2 2.2.8 on Ubuntu 8.04

    I hope this makes sense and someone can help.

  2. #2
    Join Date
    Oct 2008
    Posts
    78
    Hi

    I'm fairly new at this too. Are you getting any outputs? I haved a problem with the watchdog not get set the file I started with had watchdog commented out.

    On inverting the output is something like this

    Setp m5i20.0.out-00.invert 1

    Mine is a little different in that I use the 5i23 with a 7i33 and 7i37 card and the hostmot2 driver were you have the orginal hostmot witch I should have used.

    Donnie

  3. #3
    Join Date
    Oct 2006
    Posts
    323

    I said STOP!

    Bringing back fond memories.

    I am not using HOSTMOT2, rather the default (older) EMC 5i20 configuration. To invert an input just add '-not' to the signal.

    Here are the modifications I made to make a functional e-stop.

    # Connect amp enables to motion controller.
    linksp Xenable => m5i20.0.out-03
    linksp Yenable => m5i20.0.out-09
    linksp Zenable => m5i20.0.out-04

    # Connect amp enables to m5i20 dac enables
    linksp Xenable => m5i20.0.dac-00-enable
    linksp Yenable => m5i20.0.dac-01-enable
    linksp Zenable => m5i20.0.dac-02-enable

    # use this if you have an external estop switch
    linksp EstopSense <= m5i20.0.in-15-not
    linksp EstopWrite <= m5i20.0.in-15
    linksp EstopSense => iocontrol.0.emc-enable-in
    linksp EstopSense => m5i20.0.out-07

    I am not using the watchdog.

    The amp enables get tied into the internal e-stop logic. I also tie the amp's ac power to the m5i20.0.out-07 signal, physically. The enables only should cover you, but I like to kill power all the way down to life support on an e-stop, i.e. controller only thing alive.

    In my case, I don't believe the EstopWrite has any functionality.

    This part just didn't make any sense to me,
    linksp EstopWrite => m5i20.0.out-07
    linksp EstopWrite <= iocontrol.0.user-enable-out



  4. #4
    Join Date
    Oct 2008
    Posts
    78

    Talking

    With Hostmot2 you have no choice on the watchdog, pet it or die.

  5. #5
    Join Date
    Jan 2006
    Posts
    58
    It's a bummer that first example hostmot2 config had the watchdog commented out in the .hal file... I think that confused lots of folks.

    The new hostmot2 configs in 2.3 all have the watchdog working right.

  6. #6
    Join Date
    Oct 2006
    Posts
    323

    New dog?

    Quote Originally Posted by DonnieET View Post
    With Hostmot2 you have no choice on the watchdog, pet it or die.
    :banana:

    How about, 'my watchdog doesn't bite...that's not MY watchdog.'

    The last post sounds like the 'watchdog' Donnie was referring to got hauled to the pound.

    I have a 5i23? board waiting in the wings for a future install on another machine, but want to allow others the golden oppurtunity to blaze a new trail. So PLEASE keep us updated with your journeys.

  7. #7
    Join Date
    Oct 2008
    Posts
    78

    Talking

    123CNC

    The thing about that watch dog, he was one of the silent type never heard or saw him just felt the bite

    Donnie

  8. #8
    Join Date
    Mar 2007
    Posts
    52
    Ok I have an update

    I figured out how to do the invert output

    setp m5i20.0.out-00-invert 0 or 1

    thanks everyone for the help


    so I have all my safety signals working correctly and also the spindle. The problem now is I am not get a PID on the X and Z channels. I have checked and I am just getting a High signal on the X and Z.

    I know all my amps are working as I have switched the working y axis to the two other channels and it works.

    The only thing I can think of is the mesa 5i20 board has a problem. Mind you I am getting all the other outputs and inputs working on it? If someone knows how I can test the card to see if it is in working order. I know all my settings work as I have had this system working to cutting parts.

    Again help is always appreciated

  9. #9
    Join Date
    Nov 2005
    Posts
    496

  10. #10
    Join Date
    Mar 2007
    Posts
    52
    How do you set up the test panel correctly?

  11. #11
    Join Date
    Feb 2008
    Posts
    644
    Quote Originally Posted by TZak View Post
    Ok I have an update

    I figured out how to do the invert output

    setp m5i20.0.out-00-invert 0 or 1

    thanks everyone for the help


    so I have all my safety signals working correctly and also the spindle. The problem now is I am not get a PID on the X and Z channels. I have checked and I am just getting a High signal on the X and Z.

    I know all my amps are working as I have switched the working y axis to the two other channels and it works.

    The only thing I can think of is the mesa 5i20 board has a problem. Mind you I am getting all the other outputs and inputs working on it? If someone knows how I can test the card to see if it is in working order. I know all my settings work as I have had this system working to cutting parts.

    Again help is always appreciated

    Our experience is that a failed (damaged by excessive I/O voltage) 5I20 card will almost always completely fail (will not even configure). Having just a few bad I/O bits is possible but really unlikely. If you can configure the card and the majority of I/O works, It is most likely your problem lies elsewhere.

    If you can boot DOS or Windows (requires driver installation) on your test computer, we can supply a GPIO or loop-back test program. Or you can send the card back to us for evaluation and repair/replacement if needed.

    Another way to check for open/damaged I/O pins is to use a Digital Volt Meter (DVM) that has a diode check function. Unplug the 5I20 card from the PC and remove all 50 pin cables, then with the DVM set to diode-check function, connect the positive DVM lead to 5I20 ground and check each of the I/O pins. They should all have similar voltage drops (~.5v), a bad pin will normally show open or shorted (higher or lower than a diode drop voltage) You are checking the I/O protection diodes in the FPGA

  12. #12
    Join Date
    Mar 2007
    Posts
    52
    if you could let me know how to get a test program that would be great.

    I have downloaded the support software on the mesa electronicssite, however Im not exactly sure how to test the board,

    I have a spare windows machine that I can check it on I just need to know how to configure the software to test it.

    If you could let me know what I need that would be great.

    thanks.

  13. #13
    Join Date
    Feb 2008
    Posts
    644
    Quote Originally Posted by TZak View Post
    if you could let me know how to get a test program that would be great.

    I have downloaded the support software on the mesa electronicssite, however Im not exactly sure how to test the board,

    I have a spare windows machine that I can check it on I just need to know how to configure the software to test it.

    If you could let me know what I need that would be great.

    thanks.
    you can do this under windows but its fairly painful as setup is much more trouble

    The easiest and most thorough way is to boot DOS (FreeDOS will work)
    and use the DOS loopback utility
    To do this you will need a three connector flat cable to connect all
    three 5I20 connectors together. Then you configure the FPGA with
    the 24 bit I/O configuration:

    SC5I20 IOPR24.BIT

    Then you run the loopback program

    5I20LOOP

  14. #14
    Join Date
    Mar 2007
    Posts
    52
    Can i run this program through dos on windows ?

    also for connector it's just a flat 50 pin ribbon on all three connectors p2 p3 p4 ?


    how do you run SC5I20 IOPR24.BIT ?

    next question ...

    if the board is ok what else could be the problem? really the only signal im not getting is the pwm on x and Z ? it really doesn't make sense?

    could it be in the emc2 software or firmware from a system update?

    thanks

  15. #15
    Join Date
    Nov 2005
    Posts
    496
    To use the testpanel here:
    http://wiki.linuxcnc.org/cgi-bin/emc...vcp_Test_Panel
    click on the testpanel package to download save it on your desktop (or some where else).
    when it's down right click the folder and extract it. It will make another folder called testpanel open it and click the file called m5i20testpanel_startup. pick run in terminal when it asks. If all goes right the testpanel will pop on screen.

    if not let me know.
    Chris

  16. #16
    Join Date
    Feb 2008
    Posts
    644
    Quote Originally Posted by TZak View Post
    Can i run this program through dos on windows ?

    also for connector it's just a flat 50 pin ribbon on all three connectors p2 p3 p4 ?


    how do you run SC5I20 IOPR24.BIT ?

    next question ...

    if the board is ok what else could be the problem? really the only signal im not getting is the pwm on x and Z ? it really doesn't make sense?

    could it be in the emc2 software or firmware from a system update?

    thanks
    1. Yes, just parallel all connectors

    2. By typing SC5I20 IOPR24.BIT on the command line
    (you will need to put the SC5I20.EXE and 5I20LOOP.EXE utility and the IOPR24.BIT file in the same directory,)

    3. Basic m5i20 firmware has been unchanged for close to 4 years, so I dont think its firmware related.

    4. Really dont know what the problem could be, What Version of EMC are you using and can you post your HAL file somewhere? Have you updated EMC?

  17. #17
    Join Date
    Feb 2008
    Posts
    644
    Oops forgot to say:
    Loopback is DOS only, DOS window will not work

  18. #18
    Join Date
    Mar 2007
    Posts
    52
    Thanks for the help so far.

    I have not tested the card yet as I need to make up a ribbon cable however, here is all the code im using to run the machine.

    I also did a fresh install of the newest EMC2 build 2.2.8 and Ubuntu Linux 8.04 on a spare hard drive. So as far as i know im am current. I also have a system running with EMC2 2.2.6 and Ubuntu Linux 6.06. I switched the hard drive and on both setup still the same issue.

    Not sure if I mentiond that its just the

    X - dac-00 output
    Z - dac-02 output

    are always high?

    I am getting a direction signal and all encoders are reading correctly.

    Please see attached files. I had to add a .txt to the files as i couldn't upload them otherwise.

    thanks
    Attached Files Attached Files

  19. #19
    Join Date
    Feb 2008
    Posts
    644
    Did you look at Xoutput or Zoutput? (with HALMeter)
    Just in case they were saturated

  20. #20
    Join Date
    Mar 2007
    Posts
    52
    I did look at Xoutput and Z output with the HALMeter.

    What do you mean 'saturated'?

    The state of the X and Z output is +5v and does not change. No pulses are coming out.

    Also wondering if the files I attached make sense or if you see any issues with the code?

Page 1 of 2 12

Similar Threads

  1. M5i20 & spindle control
    By albova in forum LinuxCNC (formerly EMC2)
    Replies: 2
    Last Post: 05-12-2008, 12:00 PM
  2. Help Changing VQC inout/output
    By Moparmatty in forum Haas Visual Quick Code
    Replies: 5
    Last Post: 03-12-2008, 05:36 PM
  3. Changing Arc Output?
    By Moparmatty in forum Mastercam
    Replies: 6
    Last Post: 01-30-2008, 03:34 PM
  4. parallel port settings/output signals
    By TMaster in forum Xylotex
    Replies: 6
    Last Post: 04-24-2006, 05:16 AM
  5. To convert Quadrature Encoder signals to Tachogenerator signals
    By Babar in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 02-21-2006, 07:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •