I got Hal running as just the input for encoders. It needed the write to the port. The command 'loadrt hal_parport cfg="0x378_in"' seems to be legal. I've been running 1 encoder through it for a few hours. Now I need to talk about how to link it to something like QT3.
You guys are great! Thanks for the help. >From: [EMAIL PROTECTED] >Reply-To: "Enhanced Machine Controller (EMC)" ><[email protected]> >To: "Enhanced Machine Controller (EMC)" <[email protected]> >Subject: Re: [Emc-users] parallel port initializing >Date: Tue, 02 Jan 2007 21:34:33 +0000 >MIME-Version: 1.0 >Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by >bay0-mc4-f15.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Tue, 2 >Jan 2007 13:34:46 -0800 >Received: from sc8-sf-list1-new.sourceforge.net >(sc8-sf-list1-new-b.sourceforge.net [10.3.1.93])by >sc8-sf-spam2.sourceforge.net (Postfix) with ESMTPid 16548125B0; Tue, 2 Jan >2007 13:34:46 -0800 (PST) >Received: from sc8-sf-mx2-b.sourceforge.net >([10.3.1.92]helo=mail.sourceforge.net)by sc8-sf-list1-new.sourceforge.net >with esmtp (Exim 4.43)id 1H1rHO-0002cg-Vwfor >[email protected]; Tue, 02 Jan 2007 13:34:43 -0800 >Received: from mtiwmhc11.worldnet.att.net ([204.127.131.115])by >mail.sourceforge.net with esmtp (Exim 4.44) id 1H1rHN-0002J3-HFfor >[email protected]; Tue, 02 Jan 2007 13:34:42 -0800 >Received: from mwebmail37.att.net ([204.127.135.76])by worldnet.att.net >(mtiwmhc11) with SMTPid <200701022134341110092elge>; Tue, 2 Jan 2007 >21:34:35 +0000 >Received: from [63.161.86.254] by mwebmail37.att.net;Tue, 02 Jan 2007 >21:34:33 +0000 >X-Message-Info: LsUYwwHHNt2TeQAX1knWS+5uyVW/gRQ1759da/BRbAc= >X-Mailer: AT&T Message Center Version 1 (Jul 31 2006) >X-Authenticated-Sender: am1rYXN1bmljaEBhdHQubmV0 >X-Spam-Score: 0.2 (/) >X-Spam-Report: Spam Filtering performed by sourceforge.net.See >http://spamassassin.org/tag/ for more details.Report problems >tohttp://sf.net/tracker/?func=add&group_id=1&atid=2000010.2 NO_REAL_NAME > From: does not include a real name >X-BeenThere: [email protected] >X-Mailman-Version: 2.1.8 >Precedence: list >List-Id: "Enhanced Machine Controller >(EMC)"<emc-users.lists.sourceforge.net> >List-Unsubscribe: ><https://lists.sourceforge.net/lists/listinfo/emc-users>,<mailto:[EMAIL >PROTECTED]> >List-Archive: ><http://sourceforge.net/mailarchive/forum.php?forum=emc-users> >List-Post: <mailto:[email protected]> >List-Help: <mailto:[EMAIL PROTECTED]> >List-Subscribe: ><https://lists.sourceforge.net/lists/listinfo/emc-users>,<mailto:[EMAIL >PROTECTED]> >Errors-To: [EMAIL PROTECTED] >Return-Path: [EMAIL PROTECTED] >X-OriginalArrivalTime: 02 Jan 2007 21:34:46.0959 (UTC) >FILETIME=[D322F3F0:01C72EB5] > >"James Reed" <[EMAIL PROTECTED]> wrote: > > > I am attempting to run HAL without the use of EMC2. As I have stated > > before, I want a DRO only at this point in time, and am not interested >in > > the extras EMC offers. > > > > I have successfully run HAL as an internal (to the computer) program >(using > > the function generator in the HAL tutorial and a couple of comparators > > instead of the parport quadrature input). HOWEVER, when I try real >hardware > > and the parport, I neet 40mA at 5 volts to drive a pin high. This >usually > > indicates the port it configured for output still. > >Which pin? Sorry if I'm repeating stuff you already know, but I'm just >making sure. Pins 2-9 can be configured as inputs or outputs. Pins 10, >11, 12, 13, and 15 are always inputs. And pins 1, 14, 16, and 17 are >(almost) always ouputs. > >To use pins 2-9 as inputs, you need to specify "i" or "in" in the config >string when you load the driver. > >To use pins 1, 14, 16, and 17 as inputs, you first need a parport that >supports it, not all do. Then you need to specify "x" in the config >string. And finally, you need to set the corresponding outputs high. >The ports that support input on those pins do so by using open-collector >drivers that can pull down but not up. If you set them high, there is >an internal pullup resistor that pulls the pin high, but it can be >overcome by an external source to read a low input. You should not >attempt to force these pins high if they are being driven low. >Using pins 1, 14, 16, and 17 as inputs should be considered experimental. >I don't think it is supported at all in version 2.0.x, so unless you are >running code from CVS, ignore this entire paragraph. > > > My question is this? When in the program does parport get initialized to > > inputs, and how do I make sure it is initialized before I try to drive >it? > >The direction of pins 2-9 is set when the parport.N.write is executed. >So you must "addf" it to a realtime thread, and start the thread, even >if you don't intend to use any outputs. > >(This might be a bug - I will look into setting the port direction as >soon as the driver is loaded.) > > > Thanks for your help. > >Hope this is usefull, let us know what you find out. > >Good luck, > >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 >[email protected] >https://lists.sourceforge.net/lists/listinfo/emc-users _________________________________________________________________ Get live scores and news about your team: Add the Live.com Football Page www.live.com/?addtemplate=football&icid=T001MSN30A0701 ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
