Re: [Emc-users] m5i20_pidtest.hal
On Apr 2, 2009, at 10:45 AM, Jon Elson wrote: > Dave Engvall wrote: >> >> >> Indeed that ( + and - ) would be the intuitive way to do it but it >> doesn't work. >> >> I tried changing the sign on INPUT SCALE and the sign on >> OUTPUT_SCALE >> independently but that doesn't work either. Axis moves on command and >> then >> faults on following error. >> So I have more work to do. >> >> > On a servo system, you have to swap the signs on both INPUT_ and > OUTPUT_SCALE, or the servo runs away. > > Jon Thanks Jon, I did it the hard way ... swapped servo output and tach inputs and then only needed the INPUT_SCALE negative. D > > -- > > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
Dave Engvall wrote: > > > Indeed that ( + and - ) would be the intuitive way to do it but it > doesn't work. > > I tried changing the sign on INPUT SCALE and the sign on OUTPUT_SCALE > independently but that doesn't work either. Axis moves on command and > then > faults on following error. > So I have more work to do. > > On a servo system, you have to swap the signs on both INPUT_ and OUTPUT_SCALE, or the servo runs away. Jon -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Thu, 2009-04-02 at 09:59 -0700, Dave Engvall wrote: ... snip > Now that things are running I can relax a bit. Many thanks to all > those that offered > advise on my problem(s). > > Dave Oops, looks like you are way ahead of me on this. Kirk http://www.wallacecompany.com/machine_shop/ -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Apr 2, 2009, at 9:16 AM, Kirk Wallace wrote: > On Wed, 2009-04-01 at 22:18 -0700, Dave Engvall wrote: > ... snip >> Indeed that ( + and - ) would be the intuitive way to do it but it >> doesn't work. >> >> I tried changing the sign on INPUT SCALE and the sign on >> OUTPUT_SCALE >> independently but that doesn't work either. Axis moves on command and >> then >> faults on following error. >> So I have more work to do. >> >> Dave > > I briefly looked over the Servo Dynamics ( www.servodynamics.com ) > 1525-BR manual > ( http://www.servodynamics.com/Manuals/1525br_manual.pdf ). They do > seem > to indicate that the + input is a single ended common, but don't > explain > why. It would be nice to see what chip or circuit they use for the > input. If you can take the cover off without voiding your warranty, > can > you get a close up picture of the input area on both sides of the > board? > Another thing that came to mind is that the enable input is pulled > high > or active by default, so it seems that if the enable signal fails, > most > likely the amp will be active. It looks like the position limit switch > inputs are the same way, they seem to fail with the amp active. > > The manual indicates the amp has inputs for torque and velocity > feedback, which may complicate things. The amp output to the motor > will > vary with, the input from EMC2, and the feedback to the amp from the > motor. I like to have EMC2 handle all of the feedback, but looks like > the torque mode feedback really is a current limit to protect the > motor, > so this should be the setup to use. > > What are you using as the analog output to the amp? > > Now that you have some motion working, if you set the FERROR and > MIN_FERROR, for the axis under test, to a large number, such as 1", > does > the encoder display in AXIS match the the commanded motion? In other > words, for a command for a .5" plus movement at a slow feed rate , > increase the displayed position by .5"? > - > Kirk > http://www.wallacecompany.com/machine_shop/ > Hi Kirk, Yes, one can use torque mode as the crew did on the Mazak at Galesburg. However, tuning is much easier if one has an internal velocity loop and then has to tune only the position loop. Using a battery box and halscope I tuned the gain vs tach on the amp to get good response. The X is not geared right so is slow to respond, i.e like 200 ms to plateau on velocity. On the other hand the Y comes up in about 40 ms. I just finished tuning both axes and the Y is much better than the X. Both are pushing the resolution of the encoders tho. The FF1 values are quite high 8.5 for X and 15 for Y. Not exactly ideal but I'll take what works. Now that things are running I can relax a bit. Many thanks to all those that offered advise on my problem(s). Dave -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Wed, 2009-04-01 at 22:18 -0700, Dave Engvall wrote: ... snip > Indeed that ( + and - ) would be the intuitive way to do it but it > doesn't work. > > I tried changing the sign on INPUT SCALE and the sign on OUTPUT_SCALE > independently but that doesn't work either. Axis moves on command and > then > faults on following error. > So I have more work to do. > > Dave I briefly looked over the Servo Dynamics ( www.servodynamics.com ) 1525-BR manual ( http://www.servodynamics.com/Manuals/1525br_manual.pdf ). They do seem to indicate that the + input is a single ended common, but don't explain why. It would be nice to see what chip or circuit they use for the input. If you can take the cover off without voiding your warranty, can you get a close up picture of the input area on both sides of the board? Another thing that came to mind is that the enable input is pulled high or active by default, so it seems that if the enable signal fails, most likely the amp will be active. It looks like the position limit switch inputs are the same way, they seem to fail with the amp active. The manual indicates the amp has inputs for torque and velocity feedback, which may complicate things. The amp output to the motor will vary with, the input from EMC2, and the feedback to the amp from the motor. I like to have EMC2 handle all of the feedback, but looks like the torque mode feedback really is a current limit to protect the motor, so this should be the setup to use. What are you using as the analog output to the amp? Now that you have some motion working, if you set the FERROR and MIN_FERROR, for the axis under test, to a large number, such as 1", does the encoder display in AXIS match the the commanded motion? In other words, for a command for a .5" plus movement at a slow feed rate , increase the displayed position by .5"? - Kirk http://www.wallacecompany.com/machine_shop/ -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Apr 1, 2009, at 7:34 PM, Kirk Wallace wrote: > On Wed, 2009-04-01 at 18:43 -0700, Dave Engvall wrote: >> >> >> Am back from the beach and have tried things again. >> >> Finally found a fundamental mistake. 1525BR amps expect a >> differential input; so battery boxes give the expected result. >> However, the dacs are ground referenced. After I finally caught on I >> wired the 1525 inputs with gnd to gnd and + dac to -amp input. >> Now things move. >> >> The only problem is that both axes move in the wrong direction. So: >> how do I cleanly reverse the movement without having to >> fool with the encoders? >> >> BTW-the X axis that has absolutely awful response like 200 ms to max >> velocity tuned to about 0.001 at 60 ips and 0.4" at 10 ipm. >> We'll see what we can get out of the Y axis. ;-) >> >> So the m5i20 does really run right out of the box. The same cannot >> be said of my aging brain. >> >> Dave > > I'm glad your making progress. It has been a while since I have had to > think about this, but I believe you can change the direction of an > axis > by changing the .ini file OUTPUT_SCALE = 1 for the axis, to > OUTPUT_SCALE > = -1. If you have encoders, the .hal encoder settings may need to be > adjusted too. > Also I would have connected your amp inputs DAC signal > ground to - input and DAC signal to + input, but I haven't studied > your > particular setup. Indeed that ( + and - ) would be the intuitive way to do it but it doesn't work. I tried changing the sign on INPUT SCALE and the sign on OUTPUT_SCALE independently but that doesn't work either. Axis moves on command and then faults on following error. So I have more work to do. Dave > --- > Kirk > http://www.wallacecompany.com/machine_shop/ > > > > -- > > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Wed, 2009-04-01 at 18:43 -0700, Dave Engvall wrote: > > > Am back from the beach and have tried things again. > > Finally found a fundamental mistake. 1525BR amps expect a > differential input; so battery boxes give the expected result. > However, the dacs are ground referenced. After I finally caught on I > wired the 1525 inputs with gnd to gnd and + dac to -amp input. > Now things move. > > The only problem is that both axes move in the wrong direction. So: > how do I cleanly reverse the movement without having to > fool with the encoders? > > BTW-the X axis that has absolutely awful response like 200 ms to max > velocity tuned to about 0.001 at 60 ips and 0.4" at 10 ipm. > We'll see what we can get out of the Y axis. ;-) > > So the m5i20 does really run right out of the box. The same cannot > be said of my aging brain. > > Dave I'm glad your making progress. It has been a while since I have had to think about this, but I believe you can change the direction of an axis by changing the .ini file OUTPUT_SCALE = 1 for the axis, to OUTPUT_SCALE = -1. If you have encoders, the .hal encoder settings may need to be adjusted too. Also I would have connected your amp inputs DAC signal ground to - input and DAC signal to + input, but I haven't studied your particular setup. --- Kirk http://www.wallacecompany.com/machine_shop/ -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
Am back from the beach and have tried things again. Finally found a fundamental mistake. 1525BR amps expect a differential input; so battery boxes give the expected result. However, the dacs are ground referenced. After I finally caught on I wired the 1525 inputs with gnd to gnd and + dac to -amp input. Now things move. The only problem is that both axes move in the wrong direction. So: how do I cleanly reverse the movement without having to fool with the encoders? BTW-the X axis that has absolutely awful response like 200 ms to max velocity tuned to about 0.001 at 60 ips and 0.4" at 10 ipm. We'll see what we can get out of the Y axis. ;-) So the m5i20 does really run right out of the box. The same cannot be said of my aging brain. Dave -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Mar 27, 2009, at 2:25 PM, Peter C. Wallace wrote: > On Fri, 27 Mar 2009, Dave Engvall wrote: > >> Date: Fri, 27 Mar 2009 12:20:01 -0700 >> From: Dave Engvall >> Reply-To: "Enhanced Machine Controller (EMC)" >> >> To: "Enhanced Machine Controller (EMC)" > us...@lists.sourceforge.net> >> Subject: Re: [Emc-users] m5i20_pidtest.hal >> >> >> On Mar 26, 2009, at 5:52 PM, Stephen Wille Padnos wrote: >> >> >>> If a bare HAL setup won't do it, then it's unlikely that the full >>> EMC >>> setup will either. (but you knew that) >>> >>> - Steve >> >> OK, I've regrouped and downloaded 2.3 pre-beta 2 as a deb from Matt's >> site, >> installed it and modified the hal and .ini files for X and Y axis >> only. >> This is 5i20 only not hm2. My hope was that is would be mature enough >> to run >> right of of the box. Apparently I've been smoking the wrong >> stuff. ;-) >> >> With the axis gui and halmeter running I get output on Xoutput and >> m5i20.0.dac-00-value >> when I come out of estop but no output to the servo amp. Homing is >> set for no switches or index. >> The watchdog stuff is in the configs but is commented out. >> Uncommenting it gives errors. >> >> BTW- I'm using the pinouts in the 7i33 manual assuming they are right >> and >> Aout0 on pin 11 (ref to gnd) and Aout1 on pin 25 is correct. >> The encoders inputs on the same board work so the interconnecting >> cable is correct. > > What is the state of the ENA0 (pin 13) or ENA1 (pin 25) pins? I checked -00-enable-out and ... -01-enable-out and they are both FALSE. > > If the watchdog is commented out it should be inactive There is still one watchdog pin active and it is FALSE and I can't seem to set it true. If by inactive you mean non-functional that would be just fine. However, there must be something getting in the way of servo analog out. > > Surprised you re having so much trouble since the m5i20 config has > been used > by many people for close to 3 years now... Indeed! I am quite dismayed by the apparent fact that this doesn't just take off and run. More to the point though there doesn't seem to be anyway to easily debug the thing unless you are good at hal which I am not. Oh, well, off to watch a US First Robotics meet and then to the beach for a couple of days. Maybe this will look less daunting when I get back. Dave > > > Peter Wallace > Mesa Electronics > > (\__/) > (='.'=) This is Bunny. Copy and paste bunny into your > (")_(") signature to help him gain world domination. > > > -- > > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Fri, 27 Mar 2009, Dave Engvall wrote: > Date: Fri, 27 Mar 2009 12:20:01 -0700 > From: Dave Engvall > Reply-To: "Enhanced Machine Controller (EMC)" > > To: "Enhanced Machine Controller (EMC)" > Subject: Re: [Emc-users] m5i20_pidtest.hal > > > On Mar 26, 2009, at 5:52 PM, Stephen Wille Padnos wrote: > > >> If a bare HAL setup won't do it, then it's unlikely that the full EMC >> setup will either. (but you knew that) >> >> - Steve > > OK, I've regrouped and downloaded 2.3 pre-beta 2 as a deb from Matt's > site, > installed it and modified the hal and .ini files for X and Y axis only. > This is 5i20 only not hm2. My hope was that is would be mature enough > to run > right of of the box. Apparently I've been smoking the wrong stuff. ;-) > > With the axis gui and halmeter running I get output on Xoutput and > m5i20.0.dac-00-value > when I come out of estop but no output to the servo amp. Homing is > set for no switches or index. > The watchdog stuff is in the configs but is commented out. > Uncommenting it gives errors. > > BTW- I'm using the pinouts in the 7i33 manual assuming they are right > and > Aout0 on pin 11 (ref to gnd) and Aout1 on pin 25 is correct. > The encoders inputs on the same board work so the interconnecting > cable is correct. What is the state of the ENA0 (pin 13) or ENA1 (pin 25) pins? If the watchdog is commented out it should be inactive Surprised you re having so much trouble since the m5i20 config has been used by many people for close to 3 years now... Peter Wallace Mesa Electronics (\__/) (='.'=) This is Bunny. Copy and paste bunny into your (")_(") signature to help him gain world domination. -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Mar 26, 2009, at 5:52 PM, Stephen Wille Padnos wrote: > If a bare HAL setup won't do it, then it's unlikely that the full EMC > setup will either. (but you knew that) > > - Steve OK, I've regrouped and downloaded 2.3 pre-beta 2 as a deb from Matt's site, installed it and modified the hal and .ini files for X and Y axis only. This is 5i20 only not hm2. My hope was that is would be mature enough to run right of of the box. Apparently I've been smoking the wrong stuff. ;-) With the axis gui and halmeter running I get output on Xoutput and m5i20.0.dac-00-value when I come out of estop but no output to the servo amp. Homing is set for no switches or index. The watchdog stuff is in the configs but is commented out. Uncommenting it gives errors. BTW- I'm using the pinouts in the 7i33 manual assuming they are right and Aout0 on pin 11 (ref to gnd) and Aout1 on pin 25 is correct. The encoders inputs on the same board work so the interconnecting cable is correct. What I really miss is something similar to stgdiag which allows one to read the raw encoders and set dac voltages without having to fight the watchdog. Rather than just moan and groan here are the lines in the hal file and the emc2 output. In m5i20_io.hal # Connect watchdog reset to motion controller. newsig WatchdogRst bit linksp WatchdogRst <= m5i20.watchdog-reset linksp WatchdogRst => motion.watchdog-reset-out EMC2 - 2.3.0~beta2~pre Machine configuration directory is '/home/dave/emc2/configs/m5i20' Machine configuration file is 'm5i20.ini' Starting EMC2... HAL: ERROR: pin 'm5i20.watchdog-reset' not found m5i20_io.hal:80: link failed So what do I need to add and where to make this fly. TIA Dave > > > -- > > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
dave wrote: >[snip] > >I'm on 2.2.8 and I cannot find a hm2_5i20_pidtest.hal. But can find one >under m5i20 which is what I'm using. So I think I'm still stuck about >how to pet/feed the dog. > >Show all *dog* does reveal an m5i20.0.watchdog-reset which is set to >FALSE. I've been unable to set it TRUE so don't know what to do next. > > You aren't using hostmot2. There is no pidtest file for the hostmot2 driver, and unless you changed all the names in the m5i20_pidtest.hal file, it's still loading the m5i20 driver. Unfortunately, 2.2.x doesn't have any good hostmot2 samples to look at. You may want to download one of them from the CVS server to see how the watchdog has to be kept happy. You can download via the web at http://cvs.linuxcnc.org/cvs/emc2/configs/ - just go to the directory you want and there will be a "download this directory as a tarball" link at the bottom of the page. That said, it shouldn't be the hostmot driver changes that are making things hard for you, since you aren't using it ;) I think you said earlier that you get DAC output (in response to John K's suggestions). Did you mean that you can see physical output with a scope/meter, that you can see the dac-xx-value pins changing, or ??? >Just as an aside: >When I fire up axis and home and then try jogging the velocity shows >while I have the mouse down and then goes to zero when I let up. However >there is no attempt to drive the servo motor. > > If a bare HAL setup won't do it, then it's unlikely that the full EMC setup will either. (but you knew that) - Steve -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Thu, 2009-03-26 at 18:56 -0400, Stephen Wille Padnos wrote: > [snip] > > >Things are automagically better! > >Scripts runs after fixing the period. > >I do need to set the enable manually but that is minor. note: enable is > >for dacs and pid. > >DACS now show signal. > > > >Watchdog code; > ># enable a 16ms watchdog and DAC auto reset > >setp m5i20.0.watchdog-timeout 16000 > >setp m5i20.0.watchdog-control 3 > > > > > I don't see how this can work, since the hostmot2 driver is called > "hm2_5i20", not "m5i20". > > >and these can be verified from halmeter. > >do I need to do anything else to feed the dog? > > > > > The way the watchdog works may have changed. There is now a specific > function that tickles the watchdog. In halcmd, you can do this: > > show all *dog* > > and that will list the pins, parameters, and functions with dog in the > name (hopefully all related to the watchdog ;) ) > > As I mentioned, you must add the function hm2_5i20.0.pet_watchdog to a > thread for the card to output anything. > > >pid.0.Pgain is set to 10; still no movement. > > > > > Nope, not until you start petting the dog (they get very needy if you > ignore them :) ) > > >Is there a simple way to put a volt or so on the dac0 just to verify I > >can put out analog? > > > > > unlinkp hm2_5i20.0.dac.0.command (or is it value?) > setp [whatever the pin name should be] 1.0 > I believe the DAC gain should be set to 1, so whatever number you put in > is what you should measure on the output. > > - Steve I'm on 2.2.8 and I cannot find a hm2_5i20_pidtest.hal. But can find one under m5i20 which is what I'm using. So I think I'm still stuck about how to pet/feed the dog. Show all *dog* does reveal an m5i20.0.watchdog-reset which is set to FALSE. I've been unable to set it TRUE so don't know what to do next. Just as an aside: When I fire up axis and home and then try jogging the velocity shows while I have the mouse down and then goes to zero when I let up. However there is no attempt to drive the servo motor. Dave > > -- > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
[snip] >Things are automagically better! >Scripts runs after fixing the period. >I do need to set the enable manually but that is minor. note: enable is >for dacs and pid. >DACS now show signal. > >Watchdog code; ># enable a 16ms watchdog and DAC auto reset >setp m5i20.0.watchdog-timeout 16000 >setp m5i20.0.watchdog-control 3 > > I don't see how this can work, since the hostmot2 driver is called "hm2_5i20", not "m5i20". >and these can be verified from halmeter. >do I need to do anything else to feed the dog? > > The way the watchdog works may have changed. There is now a specific function that tickles the watchdog. In halcmd, you can do this: show all *dog* and that will list the pins, parameters, and functions with dog in the name (hopefully all related to the watchdog ;) ) As I mentioned, you must add the function hm2_5i20.0.pet_watchdog to a thread for the card to output anything. >pid.0.Pgain is set to 10; still no movement. > > Nope, not until you start petting the dog (they get very needy if you ignore them :) ) >Is there a simple way to put a volt or so on the dac0 just to verify I >can put out analog? > > unlinkp hm2_5i20.0.dac.0.command (or is it value?) setp [whatever the pin name should be] 1.0 I believe the DAC gain should be set to 1, so whatever number you put in is what you should measure on the output. - Steve -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Thu, 2009-03-26 at 17:42 -0400, John Kasunich wrote: > dave wrote: > > Hi all, > > > > CPU is a 1200 Duron, with an m5i20/7i33. The encoders show movement when > > I rotate the ballscrew and scale properly. > > Good. > > > I'm attempting to bring up an m5i20 with the hm2 driver. > > > > I've been thru the battery box servo setup and am getting good response > > out of the servo amps. > > Good. > > > However, my troubleshooting of the process from there on is not so good. > > I get no movement from the gui (either tkemc or axis). > > I assume you mean the motors don't move. Does the commanded position as > shown by the DRO change? If so, then EMC is telling HAL to move the > motors, and something in HAL isn't right. I would expect a following > error in that case, unless you have your following error limit set very > high. > > > Attempts to drop down a level and use the m5i20_pidtest.hal also elicit > > no movement. > > > > If I invoke the pidtest.hal from the command line then I get: > > > > Script started on Thu 26 Mar 2009 01:53:54 PM PDT > > ^[]0;d...@cinci: > > ~/emc2-trunk/configs/m5i20^gd...@cinci:~/emc2-trunk/configs/m5i20$ > > halrun -I m5i20-p^G^H^[[K^H^[[K_pidtest.hal ^M > > insmod: error inserting '/home/dave/emc2-trunk/rtlib/threads.ko': -1 > > Unknown symbol in module^M > > m5i20_pidtest.hal:11: exit value: 1^M > > m5i20_pidtest.hal:11: insmod failed, returned -1^M > > > > > > copied from dmesg output; > > > > 560.316311] RTAI[sched]: timer setup = 2010 ns, resched latency = 2688 > > ns. > > [ 560.438023] RTAI[math]: loaded. > > [ 560.776873] threads: Unknown parameter `period' > > Here is one problem - the threads component takes parameters named > "period1", "period2", etc. Not "period". That must be an error in > pidtest.hal. > > > [ 580.567152] RTAI[math]: unloaded. > > [ 580.644862] SCHED releases registered named ALIEN RTGLBF > > [ 580.666341] RTAI[malloc]: unloaded. > > > > However, if I hand type the m5i20_pidtest.hal then I get thru the whole > > script but still get no output. > > When you type it manually, do you type "period" or "period1"? > > The "period" thing doesn't explain the lack of motion, it just explains > why you are having trouble running pidtest. Fix that first. Once you > can run pidtest with no errors, you can start digging into the real problem. > > > The siggen sine wave (using halmeter) is on siggen, Xpos, and > > pid.0.command but no place else. > > > > Where do I go from here? > > pid.0.output ;-) > > You need to follow the flow of the signal through the system. When you > see something that doesn't make sense, investigate. > > Run pidtest, and check the following: > > Are you getting any output from the PID loops? Halcmd show or halmeter > on pid.0.output will tell you. > > If no output from PID: > > Are the PID loops enabled? (They have enable pins, use halcmd > to see them and see if they are connected to anything). > > Are the PID gains all set to zero? > > If output from PID but no output from DACS: > > Are the PID outputs connected to the DAC driver HAL pins? > > Are the 5i20 DACs enabled? > > Is the 5i20 watchdog happy? > > I don't have the details of these things memorized - you'll have to > refer to various manual pages, and the "halcmd show" lists of HAL pins > and parameters related to the 5i20 driver. > > Regards, > > John Kasunich > > Hi Steve and John: Things are automagically better! Scripts runs after fixing the period. I do need to set the enable manually but that is minor. note: enable is for dacs and pid. DACS now show signal. Watchdog code; # enable a 16ms watchdog and DAC auto reset setp m5i20.0.watchdog-timeout 16000 setp m5i20.0.watchdog-control 3 and these can be verified from halmeter. do I need to do anything else to feed the dog? pid.0.Pgain is set to 10; still no movement. Is there a simple way to put a volt or so on the dac0 just to verify I can put out analog? Thanks for getting me this far. Dave > -- > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
On Mar 26, 2009, at 2:50 PM, Stephen Wille Padnos wrote: > dave wrote: > >> Script started on Thu 26 Mar 2009 01:53:54 PM PDT >> ^[]0;d...@cinci: >> ~/emc2-trunk/configs/m5i20^gd...@cinci:~/emc2-trunk/configs/m5i20$ >> halrun -I m5i20-p^G^H^[[K^H^[[K_pidtest.hal ^M >> insmod: error inserting '/home/dave/emc2-trunk/rtlib/threads.ko': -1 >> Unknown symbol in module^M >> m5i20_pidtest.hal:11: exit value: 1^M >> m5i20_pidtest.hal:11: insmod failed, returned -1^M >> >> > It might be good to paste from terminal backscroll - all the ^H / [^K > are a little hard to read :) > >> copied from dmesg output; >> >> 560.316311] RTAI[sched]: timer setup = 2010 ns, resched latency = >> 2688 >> ns. >> [ 560.438023] RTAI[math]: loaded. >> [ 560.776873] threads: Unknown parameter `period' >> >> > The parameters are period1, period2 ... > The line is correct in the pidtest file in CVS, so it must have gotten > mangled somewhere in translation to hm2. > >> [ 580.567152] RTAI[math]: unloaded. >> [ 580.644862] SCHED releases registered named ALIEN RTGLBF >> [ 580.666341] RTAI[malloc]: unloaded. >> >> However, if I hand type the m5i20_pidtest.hal then I get thru the >> whole >> script but still get no output. >> >> The siggen sine wave (using halmeter) is on siggen, Xpos, and >> pid.0.command but no place else. >> >> Where do I go from here? >> >> > That file doesn't have the right stuff to keep the watchdog happy. > > You need to add the hm2_5i20.0.pet_watchdog function to the thread. > You'll also have to set the hm2_5i20.0.watchdog.has-bit (check the > spelling on that one), since it's really likely to bite before threads > get started. > > - Steve > Steve and John, Thanks for the rapid response. Lots of details to check on. ;-) Will work my way thru the list and post again. Dave > > -- > > ___ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
dave wrote: >Script started on Thu 26 Mar 2009 01:53:54 PM PDT >^[]0;d...@cinci: >~/emc2-trunk/configs/m5i20^gd...@cinci:~/emc2-trunk/configs/m5i20$ >halrun -I m5i20-p^G^H^[[K^H^[[K_pidtest.hal ^M >insmod: error inserting '/home/dave/emc2-trunk/rtlib/threads.ko': -1 >Unknown symbol in module^M >m5i20_pidtest.hal:11: exit value: 1^M >m5i20_pidtest.hal:11: insmod failed, returned -1^M > > It might be good to paste from terminal backscroll - all the ^H / [^K are a little hard to read :) >copied from dmesg output; > > 560.316311] RTAI[sched]: timer setup = 2010 ns, resched latency = 2688 >ns. >[ 560.438023] RTAI[math]: loaded. >[ 560.776873] threads: Unknown parameter `period' > > The parameters are period1, period2 ... The line is correct in the pidtest file in CVS, so it must have gotten mangled somewhere in translation to hm2. >[ 580.567152] RTAI[math]: unloaded. >[ 580.644862] SCHED releases registered named ALIEN RTGLBF >[ 580.666341] RTAI[malloc]: unloaded. > >However, if I hand type the m5i20_pidtest.hal then I get thru the whole >script but still get no output. > >The siggen sine wave (using halmeter) is on siggen, Xpos, and >pid.0.command but no place else. > >Where do I go from here? > > That file doesn't have the right stuff to keep the watchdog happy. You need to add the hm2_5i20.0.pet_watchdog function to the thread. You'll also have to set the hm2_5i20.0.watchdog.has-bit (check the spelling on that one), since it's really likely to bite before threads get started. - Steve -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] m5i20_pidtest.hal
dave wrote: > Hi all, > > CPU is a 1200 Duron, with an m5i20/7i33. The encoders show movement when > I rotate the ballscrew and scale properly. Good. > I'm attempting to bring up an m5i20 with the hm2 driver. > > I've been thru the battery box servo setup and am getting good response > out of the servo amps. Good. > However, my troubleshooting of the process from there on is not so good. > I get no movement from the gui (either tkemc or axis). I assume you mean the motors don't move. Does the commanded position as shown by the DRO change? If so, then EMC is telling HAL to move the motors, and something in HAL isn't right. I would expect a following error in that case, unless you have your following error limit set very high. > Attempts to drop down a level and use the m5i20_pidtest.hal also elicit > no movement. > > If I invoke the pidtest.hal from the command line then I get: > > Script started on Thu 26 Mar 2009 01:53:54 PM PDT > ^[]0;d...@cinci: > ~/emc2-trunk/configs/m5i20^gd...@cinci:~/emc2-trunk/configs/m5i20$ > halrun -I m5i20-p^G^H^[[K^H^[[K_pidtest.hal ^M > insmod: error inserting '/home/dave/emc2-trunk/rtlib/threads.ko': -1 > Unknown symbol in module^M > m5i20_pidtest.hal:11: exit value: 1^M > m5i20_pidtest.hal:11: insmod failed, returned -1^M > > > copied from dmesg output; > > 560.316311] RTAI[sched]: timer setup = 2010 ns, resched latency = 2688 > ns. > [ 560.438023] RTAI[math]: loaded. > [ 560.776873] threads: Unknown parameter `period' Here is one problem - the threads component takes parameters named "period1", "period2", etc. Not "period". That must be an error in pidtest.hal. > [ 580.567152] RTAI[math]: unloaded. > [ 580.644862] SCHED releases registered named ALIEN RTGLBF > [ 580.666341] RTAI[malloc]: unloaded. > > However, if I hand type the m5i20_pidtest.hal then I get thru the whole > script but still get no output. When you type it manually, do you type "period" or "period1"? The "period" thing doesn't explain the lack of motion, it just explains why you are having trouble running pidtest. Fix that first. Once you can run pidtest with no errors, you can start digging into the real problem. > The siggen sine wave (using halmeter) is on siggen, Xpos, and > pid.0.command but no place else. > > Where do I go from here? pid.0.output ;-) You need to follow the flow of the signal through the system. When you see something that doesn't make sense, investigate. Run pidtest, and check the following: Are you getting any output from the PID loops? Halcmd show or halmeter on pid.0.output will tell you. If no output from PID: Are the PID loops enabled? (They have enable pins, use halcmd to see them and see if they are connected to anything). Are the PID gains all set to zero? If output from PID but no output from DACS: Are the PID outputs connected to the DAC driver HAL pins? Are the 5i20 DACs enabled? Is the 5i20 watchdog happy? I don't have the details of these things memorized - you'll have to refer to various manual pages, and the "halcmd show" lists of HAL pins and parameters related to the 5i20 driver. Regards, John Kasunich -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] m5i20_pidtest.hal
Hi all, CPU is a 1200 Duron, with an m5i20/7i33. The encoders show movement when I rotate the ballscrew and scale properly. I'm attempting to bring up an m5i20 with the hm2 driver. I've been thru the battery box servo setup and am getting good response out of the servo amps. However, my troubleshooting of the process from there on is not so good. I get no movement from the gui (either tkemc or axis). Attempts to drop down a level and use the m5i20_pidtest.hal also elicit no movement. If I invoke the pidtest.hal from the command line then I get: Script started on Thu 26 Mar 2009 01:53:54 PM PDT ^[]0;d...@cinci: ~/emc2-trunk/configs/m5i20^gd...@cinci:~/emc2-trunk/configs/m5i20$ halrun -I m5i20-p^G^H^[[K^H^[[K_pidtest.hal ^M insmod: error inserting '/home/dave/emc2-trunk/rtlib/threads.ko': -1 Unknown symbol in module^M m5i20_pidtest.hal:11: exit value: 1^M m5i20_pidtest.hal:11: insmod failed, returned -1^M copied from dmesg output; 560.316311] RTAI[sched]: timer setup = 2010 ns, resched latency = 2688 ns. [ 560.438023] RTAI[math]: loaded. [ 560.776873] threads: Unknown parameter `period' [ 580.567152] RTAI[math]: unloaded. [ 580.644862] SCHED releases registered named ALIEN RTGLBF [ 580.666341] RTAI[malloc]: unloaded. However, if I hand type the m5i20_pidtest.hal then I get thru the whole script but still get no output. The siggen sine wave (using halmeter) is on siggen, Xpos, and pid.0.command but no place else. Where do I go from here? TIA Dave -- ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users