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 01-10-2011, 01:39 AM
 
Join Date: Jan 2011
Location: USA
Posts: 23
AMTB is on a distinguished road
EMC + Pendant

How to install pendant to EMC2 machine?
Machine based on EMC working http://www.conceptmachinery.com/
it be interesting to install pendant to it
Reply With Quote

  #2  
Old 01-10-2011, 08:40 AM
wendtmk's Avatar
Moderator
 
Join Date: Dec 2005
Location: USA
Posts: 234
wendtmk is on a distinguished road

What kind of pendant, and what kind of interface? Joystick, MPG? USB, parallel port? How many pins required to interface the functions of the pendant to the controller?

Mark
Reply With Quote

  #3   Ban this user!
Old 01-10-2011, 10:26 AM
 
Join Date: Jan 2011
Location: USA
Posts: 23
AMTB is on a distinguished road
Pendant

I am using MPG type pendant. My machine based on EMC2 software and it is working as you can see on web AMTB
base information here EMC Documentation Wiki: EmcKnowledgeBase
and here
EMC Documentation Wiki: Hooking Up A MPG Pendant
also here
Jogging EMC2 | anderswallin.net

i do not know very good coding so i can not install my mpg pendant to my emc2 machine.
i couldn't get help from EMC2 list that i can use so , pendant is not joint to my machine
Thanks
Aram
Reply With Quote

  #4  
Old 01-11-2011, 09:23 AM
wendtmk's Avatar
Moderator
 
Join Date: Dec 2005
Location: USA
Posts: 234
wendtmk is on a distinguished road

Okay, so it's an MPG. is it a home-made MPG, or one commercially available? I've got both an MPG pendant and a joypad hooked up to my machine (likewise running EMC2). I bought my MPG and adapter from Keling the MPG3 and C22 adapter:

Services - look down towards the bottom of the page.

I didn't need to do any coding to make the MPG work, other than enabling the second parallel port and editing the ini file so that it recognized the custom.hal file. I used the code from this site (slightly edited because I only have a two axis machine, X and Z) and cut and pasted into the custom.hal file:

MPG2 Jog Pendant | chembal.com

Mark
Reply With Quote

  #5   Ban this user!
Old 01-11-2011, 12:25 PM
 
Join Date: Jan 2011
Location: USA
Posts: 23
AMTB is on a distinguished road

hi
I bought my MPG from PC for CNC Autol Dunkan. It is similar business to Kelling.
MPG home made or manufactured is same. MPG is a box where JOG wheel with A-A B-B and +5 and ground. Also switches XYZ ans increment switch.
I am using EMC2 machine and i think to plug in MPG to EMC2 machine need code.
Do you use EMC2 software to run your machine?
LinuxCNC.org - Home ???
Reply With Quote

Sponsored Links
  #6  
Old 01-12-2011, 09:50 AM
wendtmk's Avatar
Moderator
 
Join Date: Dec 2005
Location: USA
Posts: 234
wendtmk is on a distinguished road

Aram,

Did you read any of what I wrote or click on the links I gave? It pretty much spells out everything you need to do to connect the pendant to the PC and it gives you all the code you need to make the pendant work with EMC2. Not sure what other help I can give you. And I even said in the reply that I use EMC2.

Mark
Reply With Quote

  #7   Ban this user!
Old 01-12-2011, 02:55 PM
 
Join Date: Jan 2011
Location: USA
Posts: 23
AMTB is on a distinguished road

Hi Mark.
Thanks for helping me.

I have pendant MPG-3 and I think that you using MPG-2 pendant. My pendant MPG-3 also came with C22 PENDANT interface card. My C22 looks different that on photo that you referring, my C22 card has cord with USB connector on the end and no terminals with screw. I think those deferens should make any problem.
When I bought my pendant, that is MPG4 , I found that some wires aren’t connected to switch – XYZ - or Increment selectors -0.0001- 0.001-0.01.
So I rewired my pendant. Actually rewiring of pendant did John Elson on CNC work shop Cardinal Engineering in year 2007.

Here these a pins from my pendant

1. VCC
2. ---------
3. A (jog wheel)
4. B (jog wheel)
5. x1 (increment)
6. x10 (increment)
7. x100 (increment)
8. Z axis
9. Y axis
10. X axis
11. 4(Aaxis)
12. 5(Baxis)
13. -------
14. COM (ground) for switches and + for OV on JOG wheel.
15. Estop
16. Estop
17. ---
18. ---
19. ----
20. ----
21. ----
22. ----
23. ---
24. B -- (jog wheel)
25. A – (jog wheel)
//////////////////////////////////////////////////////////////////////////////////////////
How pins on my pendant will effect code that you using?



//////////////////////////////////////////////////////////////////////

# Jog Pendant
loadrt encoder num_chan=1
loadrt mux4 count=1
loadrt mult2 count=1
loadrt lut5 count=1

addf encoder.capture-position servo-thread
addf encoder.update-counters base-thread
addf mux4.0 servo-thread
addf mult2.0 servo-thread
addf lut5.0 servo-thread

# If your MPG outputs a quadture signal per click set x4 to 1
# If your MPG puts out 1 pulse per click set x4 to 0
setp encoder.0.x4-mode 0

# For velocity mode, set n to 1
# In velocity mode the axis stops when dial is stopped even if that means
# the commanded motion is not completed,
# For position mode (the default), set n to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
# This must be set for each axis you want to behave other than default
setp axis.0.jog-vel-mode 0
setp axis.1.jog-vel-mode 0
setp axis.2.jog-vel-mode 0
setp axis.3.jog-vel-mode 0
setp mux4.0.in0 0.01
setp mux4.0.in1 0.001
setp mux4.0.in2 0.0001
setp mult2.0.in0 100


net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-08-in


net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net pend-scale mult2.0.in1
net rot-scale axis.3.jog-scale <= mult2.0.out



net mpg-a encoder.0.phase-A <= parport.1.pin-02-in
net mpg-b encoder.0.phase-B <= parport.1.pin-03-in


net mpg-x axis.0.jog-enable <= parport.1.pin-04-in
net mpg-y axis.1.jog-enable <= parport.1.pin-05-in
net mpg-z axis.2.jog-enable <= parport.1.pin-06-in
net mpg-4 axis.3.jog-enable <= parport.1.pin-07-in



net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
net pend-counts axis.3.jog-counts

# Turn on the jog led if any jog axis is enabled
setp lut5.0.function 0x116
net mpg-x lut5.0.in-0
net mpg-y lut5.0.in-1
net mpg-z lut5.0.in-2
net mpg-4 lut5.0.in-3
setp lut5.0.in-4 0
net jog-on parport.1.pin-01-out <= lut5.0.out




////////////////////////////////////////////////////////////////////////////
My jog wheel from MPG-3 has A A- B B- and +5 V and ground. I know that some
MPG-2 comes with jog wheel that only has A B +5 and Ground.
How your code should change to accommodate extra 2 pins from jog wheel?
Is it --- quadture signal per click set x4 to 1-----?
But I need physical 2 more pins to join A- and B-. Am I right?




When you said -----“other than enabling the second parallel port and editing the ini file so that it recognized the custom.hal file.” -----
1. How you do enable second parallel port? Did you write some code? How to do that?
2. What you put into INI file to it can recognize custom.hal file?


Thank you, for helping me out
Aram
Reply With Quote

  #8  
Old 01-13-2011, 09:43 AM
wendtmk's Avatar
Moderator
 
Join Date: Dec 2005
Location: USA
Posts: 234
wendtmk is on a distinguished road

Aram,

I have the MP3 pendant from keling. I don't have my files here at work and since you've changed the wiring pinouts on the pendant, it'll take me a little more work at figuring out how yours needs to be set up.

As for enabling the second parport, that's posted in the wiki:

1. Figure out the address of your parallel port card

To find the address of your parallel port card in a terminal window

lspci -v

You will see something similar to this

0000:00:10.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
Subsystem: LSI Logic / Symbios Logic: Unknown device 0010
Flags: medium devsel, IRQ 11
I/O ports at a800 [size=8]
I/O ports at ac00 [size=8]
I/O ports at b000 [size=8]
I/O ports at b400 [size=8]
I/O ports at b800 [size=8]
I/O ports at bc00 [size=16]

In my case the address was the first one so I changed my .hal file from

loadrt hal_parport cfg=0x378

to

loadrt hal_parport cfg="0x378 0xa800 in"

note the double quotes surrounding the addresses.

and added

addf parport.1.read base-thread
addf parport.1.write base-thread

so the parport will get read and written to.

Your second parport address may not be the same as listed in the example above, so you need to find out what it is.

By the way, if you look at the first line of the wiki page, it is for hooking up an MPG3 with the C22 interface.

As for the entry in your ini file so it recognizes the custom.hal file, or whatever you want to call the file, it goes under the [HAL] section:

[HAL]
HALFILE = custom.hal


Mark
Reply With Quote

  #9   Ban this user!
Old 01-14-2011, 01:43 AM
 
Join Date: Jan 2011
Location: USA
Posts: 23
AMTB is on a distinguished road

Hi
Mark
I did edit code. What do you think about it?
Do you know where i can get help with code for C22 card?

I still can not see in your code how you connect increment switch 0.01 0.001 0.0001 ? there should be pin-??-in something similar.

//////////////////////////////////

# Jog Pendant
loadrt encoder num_chan=1
loadrt mux4 count=1
loadrt mult2 count=1
loadrt lut5 count=1

addf encoder.capture-position servo-thread
addf encoder.update-counters base-thread
addf mux4.0 servo-thread
addf mult2.0 servo-thread
addf lut5.0 servo-thread

# If your MPG outputs a quadture signal per click set x4 to 1
# If your MPG puts out 1 pulse per click set x4 to 0
setp encoder.0.x4-mode 1

# For velocity mode, set n to 1
# In velocity mode the axis stops when dial is stopped even if that means
# the commanded motion is not completed,
# For position mode (the default), set n to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
# This must be set for each axis you want to behave other than default
setp axis.0.jog-vel-mode 0
setp axis.1.jog-vel-mode 0
setp axis.2.jog-vel-mode 0
setp axis.3.jog-vel-mode 0
setp mux4.0.in0 0.01
setp mux4.0.in1 0.001
setp mux4.0.in2 0.0001
setp mult2.0.in0 100


net scale1 mux4.0.sel0 <= parport.1.pin-11-in
net scale2 mux4.0.sel1 <= parport.1.pin-12-in


net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net pend-scale mult2.0.in1
net rot-scale axis.3.jog-scale <= mult2.0.out



net mpg-a encoder.0.phase-A <= parport.1.pin-02-in
net mpg-b encoder.0.phase-B <= parport.1.pin-03-in

?net mpg-a encoder.0.phase-A+ <= parport.1.pin-04-in
?net mpg-b encoder.0.phase-B+ <= parport.1.pin-05-in





net mpg-x axis.0.jog-enable <= parport.1.pin-10-in
net mpg-y axis.1.jog-enable <= parport.1.pin-09-in
net mpg-z axis.2.jog-enable <= parport.1.pin-08-in
net mpg-4 axis.3.jog-enable <= parport.1.pin-11-in



net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
net pend-counts axis.3.jog-counts


I do not need that
/# Turn on the jog led if any jog axis is enabled
/setp lut5.0.function 0x116
/net mpg-x lut5.0.in-0
/net mpg-y lut5.0.in-1
/net mpg-z lut5.0.in-2
/net mpg-4 lut5.0.in-3
/setp lut5.0.in-4 0
/net jog-on parport.1.pin-01-out <= lut5.0.out
Reply With Quote

  #10   Ban this user!
Old 01-14-2011, 02:25 AM
 
Join Date: Jan 2011
Location: USA
Posts: 23
AMTB is on a distinguished road

hi

i found this wiring of mpg3 pendant -http://www.markusmechatronics.com/HandradAnschluss.jpg

diagram shows that increment switch should have 3 pins for 0.01 0.001 and 0.0001
it described not for emc2 but i think wiring should be same
Am i right?

Thanks
Aram
Reply With Quote

Sponsored Links
  #11  
Old 01-15-2011, 11:14 AM
wendtmk's Avatar
Moderator
 
Join Date: Dec 2005
Location: USA
Posts: 234
wendtmk is on a distinguished road

That's the wiring diagram I used when I added my MPG to the machine. Looking at my hal file, the A- and B- are not used and according to the wiring diagrams (both yours and mine) they are only used for line driver output. Here's my custom_postgui_pendant.hal file:

# Jog Pendant
loadrt encoder num_chan=1
loadrt mux4 count=1
loadrt mult2 count=1
loadrt lut5 count=1

addf encoder.capture-position servo-thread
addf encoder.update-counters base-thread
addf mux4.0 servo-thread
addf mult2.0 servo-thread
addf lut5.0 servo-thread

# If your MPG outputs a quadture signal per click set x4 to 1
# If your MPG puts out 1 pulse per click set x4 to 0
setp encoder.0.x4-mode 0

# For velocity mode, set n to 1
# In velocity mode the axis stops when dial is stopped even if that means
# the commanded motion is not completed,
# For position mode (the default), set n to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
# This must be set for each axis you want to behave other than default
setp axis.0.jog-vel-mode 1
setp axis.1.jog-vel-mode 1
setp axis.2.jog-vel-mode 1
#setp axis.3.jog-vel-mode 0
setp mux4.0.in0 0.01
setp mux4.0.in1 0.001
setp mux4.0.in2 0.0001
setp mult2.0.in0 100
net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-08-in
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net pend-scale mult2.0.in1
#net rot-scale axis.3.jog-scale <= mult2.0.out
net mpg-a encoder.0.phase-A <= parport.1.pin-02-in
net mpg-b encoder.0.phase-B <= parport.1.pin-03-in
net mpg-x axis.0.jog-enable <= parport.1.pin-04-in
net mpg-y axis.1.jog-enable <= parport.1.pin-05-in
net mpg-z axis.2.jog-enable <= parport.1.pin-06-in
#net mpg-4 axis.3.jog-enable <= parport.1.pin-07-in
net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
#net pend-counts axis.3.jog-counts

# Turn on the jog led if any jog axis is enabled
setp lut5.0.function 0x116
net mpg-x lut5.0.in-0
net mpg-y lut5.0.in-1
net mpg-z lut5.0.in-2
net mpg-4 lut5.0.in-3
setp lut5.0.in-4 0
net jog-on parport.1.pin-01-out <= lut5.0.out


Note: I've turned off any pins that go higher than XYZ on my pendant, since I don't use them. And I'm not using the quadrature type signaling, but rather the pulse signaling. Also, some pins may not agree with yours, since you re-wired your pendant. You'll have open up the halshow in Axis to find out exactly what pins are being read.

Mark
Reply With Quote

  #12   Ban this user!
Old 01-15-2011, 12:31 PM
 
Join Date: Jan 2011
Location: USA
Posts: 23
AMTB is on a distinguished road

Hi Mark
In PIN i can see that you using Pin for X Y Z A axis -4 5 6 7- and for jog wheel pin 2 and 3.
Question: how increment switch communicate to computer if it (switch) doesn't have any pin?

Is there OEM address for manufacture of C22 adapter to ask question about pins?
Who sold C22 - distributor.

thanks
Aram
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
Need Help!- mpg pendant BAM General Electronics Discussion 1 08-25-2008 08:23 PM
Pendant for under $10 teamtexas DIY-CNC Router Table Machines 2 04-24-2008 12:21 PM
MPG pendant troy676zsj Fadal 0 07-30-2006 09:15 PM
Anyone using this pendant? trevorhinze Mach Mill 3 09-10-2005 07:45 AM
Pendant? CNCadmin Carken Products (Deskam, DeskCNC etc) 0 05-07-2004 09:10 AM




All times are GMT -5. The time now is 05:01 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