On Tuesday 05 December 2017 01:25:54 Frederic RIBLE wrote: > On 2017-12-03 17:04, andy pugh wrote: > > On 3 December 2017 at 16:00, Gene Heskett<[email protected]> wrote: > >> I find my self having to pick up and move a net statement in order > >> to satisfy the requirement that the src statement must be the first > >> encountered as the file is being parsed, > > > > There is no such requirement. You can connect the input and output > > pins to a net in absolutely any order you like. > > As far as I know, the only order constraint is that you cannot link a > pin via "net" statement until the component has been loaded. > If you split your HAL config in several files, the "loadrt" statements > are usually spread over different files. > The solution is to break "net" statements as below to keep well > structured config, for an easier reading and maintenance. > > file1.hal: > loadrt and2 > net mysig and2.0.in0 > > file2.hal: > loadrt not > net mysig not.0.out > > Which is fully equivalent to single HAL config file: > loadrt and2 > loadrt not > net mysig and2.0.in0 not.0.out > > Of course, this example is not representative of the interest for > multiple files config. > Typical usage is to split the config between hardware related > statements and GUI related statements. > > Frederic > http://cnc.f1oat.org
This is at odds with my experience. I have been yelled at by hal for doing: loadrt and2 names=a bunch of them and later, finding I needed another couple of and2's for a different function: loadrt and2 names=2 new names And it took an error exit until I moved those new names to be appended to the original loadrt and2 statement. In the not too distant past, a year perhaps. But I am about to hack my hal file for the G0704 up to incorporate Les Newall's idea for automatic spindle gear changing, and I might double check that as it sure would make organizing a hal file into a stanza per function, a whole lot more readable to this human than what I have now. If that can now be done it would be a huge help. ATM I am sure I have unused modules in memory, even in the addf list, that aren't in use any longer, the addf list being a couple pages in a printout now. For instance, with this new high resolution encoder which is actually 2 encoders, an ABX on both the motor and the spindle, using the A/B from the motor unit, the X from the spindle (which is why the scales involved aren't integers), if I can write the complete encoder function in one stanza, and establish the scales by way of tallying switches on the knob, then I can in the next stanza, connect that to motion, then combine the encoders scaled outputs with motions controls into the spindles pid, then do the boot of Jon's pwmservo and finally the rest of the startup enables, each in its own stanza like the XYZA is now. Actually I think each is about 4 stanza's. But its at least "organized". That hal file is a mess, probably 30+ % comments just so I can try to keep track of what it is I am trying to do. Losing that "must be in one statement" limitation would be a huge help. Just trying to keep the addf's in the proper order can be a challenge all by itself. If the addf's could be put right in the function stanza, scattered throughout the file, that would be a huge help in verifying its all in the proper order for data to fall completely thru a function in one servo-threads execution. Today I will attempt to clean up the main box and get the new bob mounted as its bolt pattern is different from the one I took out. Then when the new servo amp I am using for spindle drive arrives, its installation will be unplugging the failed one, pulling the 4 screws mounting it, then trying to get the new one aligned and bolted back down. Plug it in and reconfigure the spindles pid. But right now its a mess that needs a serious cleanup. I'm doing all this on a shelf thats about 6 feet off the floor. To a main box I had to rig a block and tackle to put it up on that shelf as its just short of 75 lbs. I'll start by stuffing the rs485 receivers converting the balanced differential encoder on the motor into a small cast alu box and making that a permanent part of the cabling between the G0704's head and a plugin strip on the end of the box. Then finish boxing up another psu and 2m542 driver, rigging it to be axis A when its mounted on the mills table, its a 4" rotary table I've motorized. But all unpluggable when not in use. I carry it up and down the hill to the shop and an expanded X1 in the shop building. At some point, I need to find a spot to hold these accessories thats out of the air hose blast when cleaning up the swarf. Doing metalwork and woodwork in the same room sure makes it hard to keep the woodwork clean. And I've all the parts except the lids for 3 of a blanket chest that was on the front cover of an issue of Fine Woodworking back in 2014. I made one and gave it to my oldest stepson, started on another but had to src the mahogany from a different seller, and when I tried to make the lid, the crap warped so bad it wasn't usable. Now I've had another kilobucks worth of it laying flat on the floor on a rug remnant, walking on it for about a year. And its not showing any signs of warpage. Yet. So many projects, so little time and space. But it keeps me out of the bars. :) Thanks for listening while I ramble. Being stuck here till the Missus dies, (final stages of COPD) I need someone to "talk to". I talk to myself too much, and I should never listen to that idiot. :) Now I need to go see about some breakfast for a good woman. Cheers Frederic, Gene Heskett. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
