586,114 active members*
3,311 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2) > How to get Encoder readings and change analog output using Mesa 5i20 + 7i33?
Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2010
    Posts
    0

    How to get Encoder readings and change analog output using Mesa 5i20 + 7i33?

    Hi, I am new to Ubuntu/Linux. Currently, I am trying to test out my own controller on a Brushed DC Motor. So I borrowed a Mesa 5i20 and a 7i33 Quad Servo Driver card from a friend and attached it to my PC and a DC motor at port 0 of the 7i33.

    However, I do not know how can I acquire the encoder readings nor write output analog in Ubuntu. Any guidance would be appreciated. Thanks!

    ~BQ

  2. #2
    Join Date
    Jul 2003
    Posts
    1754
    take a look a the hm2-servo servo config within the emc2 sampe configs.

    It is a 3 axis config using encoder feedback and PID

    sam

  3. #3
    Join Date
    Sep 2010
    Posts
    0
    Thanks sam. So theoretically i can modify hm2-servo servo config and change their PID controller to my own?

  4. #4
    Join Date
    Jul 2003
    Posts
    1754
    theoretically... What do you mean - change their pid controller to your own?

    sam

  5. #5
    Join Date
    Sep 2010
    Posts
    0
    As in remove their PID controller and implement my fuzzy controller.

  6. #6
    Join Date
    Apr 2005
    Posts
    263
    with the old-school hostmot-4 fpga firmware I was using this kind of pyVCP test panel to try everything out without PID loops and without EMC2:
    http://www.anderswallin.net/2007/09/...-4-test-panel/

    it may or may not be easily adaptable to the hostmot2 FPGA firmware/driver which is now probably the right choice with the latest EMC2.

    Anders

  7. #7
    Join Date
    Sep 2010
    Posts
    0
    Thank you Andy. This seem useful . I was wondering where can i add in my C code inside this environment?

  8. #8
    Join Date
    Apr 2005
    Posts
    263
    Quote Originally Posted by Shen Bingquan View Post
    Thank you Andy. This seem useful . I was wondering where can i add in my C code inside this environment?
    comp is a tool for writing your own realtime components in a C-like language. you could then replace the standard pid-component with your own component.

    see: http://www.linuxcnc.org/docs/2.4/html/hal_comp.html

  9. #9
    Join Date
    Jul 2003
    Posts
    1754
    Sounds neat - if you could also add in auto-tuning.....

    sam


    Quote Originally Posted by Shen Bingquan View Post
    Thank you Andy. This seem useful . I was wondering where can i add in my C code inside this environment?

  10. #10
    Join Date
    Sep 2010
    Posts
    0
    Hi Andy,

    Got one question regarding the pyVCP test panel you linked me earlier. It worked properly, but there are still some problems after some editing.

    Being reading up on the codes and I have shorten the XML and HAL files by deleting parts of other motors (etc, "linkpp iotest.enc1 m5i20.0.enc-02-position") .

    But the HALmeter still shows those respective PINs and Parameters for other motors 01 02 03. Where are all these parameters define in? And how can I change them? And how can I add other parameters?

    I am thinking 'loadrt hal_m5i20 loadFpga=1 dacRate=16666' define all those, but where can find this file and edit it?

    Moreover, i cant seem to just add another thread by "addf m5i20.0.digital-in-read tt" into the HAL file.

    ~BQ

  11. #11
    Join Date
    Nov 2005
    Posts
    496
    If you just want to do open loop testing you can use pncconf.
    Though it sounds like you wish to test your component....

Similar Threads

  1. Mesa 7i33 and AMC amplifiers
    By Monroe Design in forum LinuxCNC (formerly EMC2)
    Replies: 2
    Last Post: 04-12-2009, 04:09 PM
  2. Anyone with Mesa 5I20 and 7I33 stories?
    By karl1 in forum LinuxCNC (formerly EMC2)
    Replies: 15
    Last Post: 12-14-2008, 06:28 AM
  3. Spindle Encoder to Mesa 5i20
    By RogerN in forum LinuxCNC (formerly EMC2)
    Replies: 3
    Last Post: 10-17-2008, 01:55 PM
  4. Problem using EMC with MESA 5I20 + 7I33 + 7137
    By hooeey in forum LinuxCNC (formerly EMC2)
    Replies: 6
    Last Post: 03-05-2008, 10:39 PM
  5. change analog output voltage
    By Karl_T in forum CamSoft Products
    Replies: 4
    Last Post: 12-21-2005, 03:03 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
  •