CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-13-2009, 05:16 PM
 
Join Date: Jan 2009
Location: Germany
Posts: 2
tig-tec is on a distinguished road
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
Reply With Quote

  #2   Ban this user!
Old 10-14-2009, 01:52 AM
 
Join Date: Nov 2005
Location: Canada
Posts: 465
chester88 is on a distinguished road

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
Reply With Quote

  #3   Ban this user!
Old 10-14-2009, 03:43 PM
 
Join Date: Jan 2009
Location: Germany
Posts: 2
tig-tec is on a distinguished road

Hi Chris,

thanks for fast reply your tip worked well.

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

MfG Bernd
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Machine Build- spline mode nurbs mode cooltool CamSoft Products 4 03-10-2009 02:03 AM
Mesa de agua goyoasturias Spanish CNCzone 5 01-09-2009 01:06 PM
What is - Torque Mode? Position Mode? Speed/Velocity Mode? sunmix Servo Motors and Drives 25 10-26-2008 03:53 AM
Mesa, AZ john matthews Mentors & Apprentice Locator 1 08-24-2008 01:48 PM
Mesa 7i37 output wiring 123CNC LinuxCNC (formerly EMC2) 3 03-05-2008 12:49 PM




All times are GMT -5. The time now is 05:12 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

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