Kirk wrote: > I attached the hal file on the last message. I am also attaching it > again here. The link to the file on the wiki is > http://wiki.linuxcnc.org/uploads/joypad.hal
Oops... I apologize, I missed the attachment. The hal file shows that you are NOT using halui for jogging, only for some on/off stuff like machine on, pause, and resume. That explains how you were able to get analog jogging to work without using CVS head. So, lets figure out what isn't working. Start EMC, then open a shell (terminal window), and start halcmd using "halcmd -kf". That will get you an interactive session with a halcmd prompt: halcmd: start two halmeters: halcmd: loadusr halmeter halcmd: loadusr halmeter halcmd: On one of the meters, click the select button. When the dialog comes up, click the signals tab. Select the signal "velX" from the list, then click OK. That signal is the output from the joypad, going to a simulated encoder. On the other meter, click select, then the signals tab, then select the signal "countX" and click OK. That signal is the counts from the encoder, going into EMC's motion controller. Now try jogging with the joypad. When you move the stick away from center, VelX should become non-zero. The farther you go, the larger the value. Full deflection on the stick should give you plus or minus one. If that is not what happens, the problem is in the joypad or the joystick driver, or the connections to the driver. "show sig vel" should show you the signals, so you can verify that the right pins are connected. If velX looks OK, then check the other meter. countX should be constant (not neccessarily zero) when the stick is centered. As you move the stick away from center, countX should start changing. With the scaling you have in your file, countX should change by about 500 counts per second with full stick deflection. If you center the stick again, countX should stop changing. If that is not what happens, the problem is between the joypad output and the encoder output. Use "show sig X" to verify signals XA and XB are connected properly, "show sig countX" to make sure that countX is connected to the output of the encoder block. If countX looks OK, then its time to look at the motion controller. "show pin axis.0.jog" will show you the jogging related pins. jog-counts should have the same value as countX. jog-enable should be TRUE. jog-vel-mode should be FALSE, and should be whatever you have set as the "jog distance per count". In your case, it is either 0.1 or 0.01, as selected by two joypad buttons. You can check that by clicking select on one of the halmeters, clicking the "pins" tab, then selecting "axis.0.jog-scale" and clicking OK. The value on the meter should be either 0.1 or 0.01, and should change when you push the appropriate joypad buttons. I think I see the problem... (maybe). You have the scaling set up so that it will move either 0.1 or 0.01 units per count, and it will generate 500 counts per second at full deflection. Are your units inches or mm? If they are mm, then 0.1mm per count and 500 counts per second means 50mm/sec, or 3 meters/minute. If it is inches, 0.1 inches per count means 50 inches per second or 3000 inches per minute. A moderately fast machine can move at 3 meters per minute, but I doubt any machine can move 3000 inches per minute. If the scaling results in a ridiculously high jog rate, the position commanded by the jog is going to get way ahead of the machine. So when you let go of the stick, the machine is going to keep going, trying to catch up. There are two ways to deal with this problem. First, set more realistic scaling. If this is an inch machine, with rapid speed of 180 inches/min (3 inches per second), then set the high scale to 0.006. 0.006" per count times 500 counts/second = 3 inches/sec. Set the low scale factor ten times smaller, 0.0006 in this example. The other thing you might want to do is switch the jogwheel input into velocity mode. Unlike a real jogwheel, a joystick doesn't deal with position anyway. If you set axis.0.jog-vel-mode to TRUE (setp axis.0.jog-vel-mode 1), then the commanded position will not be allowed to get far ahead of the machine. When the counts stop changing, the machine will stop moving right away. Please let us know what you find! Regards, John Kasunich ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users