587,189 active members*
2,709 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    3

    Mesa PWM Output Mode

    Hello Community

    After a few years with Stepper driven CNC machines I decided to build a real Servo CNC with 4 Axxis.

    I found EMC2 and tried something with the parallel Port (to slow !).
    So I ordered a Mesa 5i20 Card read the documentation and designed four PWM Amplifiers with low active Inputs.

    Most everything works well, but the PWM polarity is wrong !

    I need pure high Level on 0% PWM and a pure low level at 100% PWM.

    After some hours with the Hal pins I decided to change the BIT File for the Mesa Card.

    I want to add a new hm2_5i20.0.pwmgen.00.output-type (4) for inverted PWM polarity.

    I´ve downloaded the ISE 10.1 Webpack from Xilinx (what a mess).

    Can anyone help with a tutorial adding the sources and compiling a new .BIT file for the FPGA ?

    Thanks for any Help

    Best Regards Bernd

    PS: english isn´t nativ to me

  2. #2
    Join Date
    Nov 2005
    Posts
    496
    Greetings

    If you really need a new bit file Peter at Mesa probably could help you.
    He is subscribed to the EMC maillist.
    But I'm not sure you need to. I'm pretty sure you can inver the PWM pin.
    It's just a little tricky to figure out. I assume you are using hostmot2
    you need to set the parameter hm2_5i20.0.gpio.NUMBER.invert_output true
    NUMBER must be the pin number for the pwm pin.
    look in dmesg

    for instance:
    pin 7 is pwmgen 0 's pwm pin

    [ 1141.053386] hm2/hm2_5i20.0: 72 I/O Pins used:
    [ 1141.053394] hm2/hm2_5i20.0: IO Pin 000 (P2-01): IOPort
    [ 1141.053397] hm2/hm2_5i20.0: IO Pin 001 (P2-03): IOPort
    [ 1141.053401] hm2/hm2_5i20.0: IO Pin 002 (P2-05): Encoder #0, pin B (Input)
    [ 1141.053405] hm2/hm2_5i20.0: IO Pin 003 (P2-07): Encoder #0, pin A (Input)
    [ 1141.053408] hm2/hm2_5i20.0: IO Pin 004 (P2-09): IOPort
    [ 1141.053411] hm2/hm2_5i20.0: IO Pin 005 (P2-11): Encoder #0, pin Index (Input)
    [ 1141.053415] hm2/hm2_5i20.0: IO Pin 006 (P2-13): IOPort
    -> [ 1141.053418] hm2/hm2_5i20.0: IO Pin 007 (P2-15): PWMGen #0, pin Out0 (PWM or Up) (Output)
    [ 1141.053422] hm2/hm2_5i20.0: IO Pin 008 (P2-17): IOPort
    [ 1141.053425] hm2/hm2_5i20.0: IO Pin 009 (P2-19): PWMGen #0, pin Out1 (Dir or Down) (Output)
    [ 1141.053429] hm2/hm2_5i20.0: IO Pin 010 (P2-21): IOPort
    [ 1141.053432] hm2/hm2_5i20.0: IO Pin 011 (P2-23): PWMGen #0, pin Not-Enable (Output)
    ...
    [ 1141.053589] hm2/hm2_5i20.0: IO Pin 060 (P4-25): StepGen #2, pin Step (Output)
    [ 1141.053593] hm2/hm2_5i20.0: IO Pin 061 (P4-27): StepGen #2, pin Direction (Output)
    [ 1141.053597] hm2/hm2_5i20.0: IO Pin 062 (P4-29): StepGen #2, pin (unused) (Output)
    [ 1141.053601] hm2/hm2_5i20.0: IO Pin 063 (P4-31): StepGen #2, pin (unused) (Output)
    [ 1141.053605] hm2/hm2_5i20.0: IO Pin 064 (P4-33): StepGen #2, pin (unused) (Output)
    [ 1141.053609] hm2/hm2_5i20.0: IO Pin 065 (P4-35): StepGen #2, pin (unused) (Output)
    [ 1141.053613] hm2/hm2_5i20.0: IO Pin 066 (P4-37): IOPort
    [ 1141.053616] hm2/hm2_5i20.0: IO Pin 067 (P4-39): IOPort
    [ 1141.053619] hm2/hm2_5i20.0: IO Pin 068 (P4-41): IOPort
    [ 1141.053621] hm2/hm2_5i20.0: IO Pin 069 (P4-43): IOPort
    [ 1141.053624] hm2/hm2_5i20.0: IO Pin 070 (P4-45): IOPort
    [ 1141.053627] hm2/hm2_5i20.0: IO Pin 071 (P4-47): IOPort
    [ 1141.053811] hm2/hm2_5i20.0: registered
    [ 1141.053815] hm2_5i20.0: initialized AnyIO board at 0000:02:02.0

    so in your HAL file add:
    hm2_5i20.0.gpio.007.invert_output true

    and then your pwm should be inverted.
    I say should be cause I haven't tried it yet on pwm, but have for stepgen direction pins.

    Cheers Chris M

  3. #3
    Join Date
    Jan 2009
    Posts
    3
    Hi Chris,

    thanks for fast reply your tip worked well.

    This is really a first class forum go on like that!

    MfG Bernd

Similar Threads

  1. What is - Torque Mode? Position Mode? Speed/Velocity Mode?
    By sunmix in forum Servo Motors / Drives
    Replies: 48
    Last Post: 01-20-2024, 10:34 AM
  2. spline mode nurbs mode
    By cooltool in forum CamSoft Products
    Replies: 4
    Last Post: 03-10-2009, 08:03 AM
  3. Mesa de agua
    By goyoasturias in forum Spanish
    Replies: 5
    Last Post: 01-09-2009, 08:06 PM
  4. Mesa, AZ
    By john matthews in forum Mentors & Apprentice Locator
    Replies: 1
    Last Post: 08-24-2008, 07:48 PM
  5. Mesa 7i37 output wiring
    By 123CNC in forum LinuxCNC (formerly EMC2)
    Replies: 3
    Last Post: 03-05-2008, 07:49 PM

Posting Permissions

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