On Thursday 28 January 2016 05:54:14 Marius Alksnys wrote: > How to make one LinuxCNC config suitable in both cases: real and sim? > I face this often trying to config, tune, program machines being at > the field and away. > > One example could be alter start of lines in hal files like: > > # Will work only with real hardware: > [SIM](REAL) net some-signal my-hardware.port.pin... > > # Will work only in sim: > [SIM](SIM) net some-signal simulated-feature.pin... > > And in ini file, [SIM] section specify skipping depending on scenario: > > For simulation: > [SIM] > REAL = skip > SIM = > > For real hardware: > [SIM] > REAL = > SIM = skip > > The problems I face now that there is no such dedicated halcmd command > to skip a line (or I can't find it). Comment symbol is not accepted > too. And I don't know a way to give an empty line. Maybe this could be > easily implemented?.. > > What I tried and works: > > [SIM] > REAL = show param > > It would be even better to be able to skip from the middle of the hal > line. More ideas: > use exit > use IF or GOTO in HAL files > > Your thoughts? > Mine are: It would be handier than sliced bread, one could switch a postgui feature on and off with a single edit, or even a gui button if a means to 'undo' a given hal bit were available. And that is just one scenario.
Another might be to re-assign the spindle controlling pins if you have the normal spindle, but have a high speed one for engraving too. I have, left over from the late 90's, a drawer full of db25 switchboxes that I will be forced to use for the 2nd spindle if I can hack up a hal file that doesn't depend on encoder feedback to do a decent job. In this case, a hal switch effect might be to use 2 different postgui's to configure the spindle drive since it will never be run without the gui. One would make use of the PID & feedback from the encoder, and the other would send the command direct to the pwmgen in the 5i25. This can be easily specified by moving a # in front of the postgui that doesn't apply for the job at hand. I can think of several ways to switch, but they all involve hand editing the ini file at least. I could also envision having the spindle selection as an MDI-like command just by expanding on the align.xml file. But that brings up a very big BUT, once a given configuration has been loaded, I know of no way to undo it so that the switch to the other spindle could actually be done from the running gui. hal needs an "unset signalname signal-source signal-target [signal-target]" command. I rx'd that VFD Andy recommended on Tuesday, and was amazed at its lack of weight, but the booklet that comes with it makes zero mention of going above 400Hz. Since it needs 240 volt power that I haven't installed a breaker for yet, and the motor seems to be in a wheelborrow someplace between here and the left coast, I haven't had a chance to "play". I am not the least impressed with that "manual" as it seems much more interested in lawyer stuff than in technical. For instance, can the 5 volt analog input use a 20 kilohertz carrier PWM signal direct from a 5i25, (thru the BoB of course) doing its own averaging in its input noise filtration or do I have to run that thru a Mesa Spinx1 to make a pure analog signal out of it to be fed to the 0-10 volt input? The motor I have coming, and which may be too big physically to use, is supposedly a 24k rpms motor so 400 Hz is enough. To me, that seems to imply it has very expensive bearings in it. Can anyone advise me as to its expected life spinning an engraving bit at 24k revs? In retrospect in all this, I think I might have been better off, for no more PCB's than I'll make in any one run, to have bought the Taiwanese Saber machine for $780 & freight, as it looks to be capable of some quite finely detailed work, the gantry is rigid and the table moves for the long axis, with a 15 by 20 cm XY envelope. And its small enough it could be shelved out of the way when not in use. All it would need would be one of those db25 switches and load a new config. It comes ready to be driven by LCNC or (spit) Mach. They also sell that spindle separately for a $100 bill, and it does 10k revs when powered by their psu kit. And that may in fact be the path I take here to get going at more than 1.5 ipm when engraving a pcb. Thats like watching paint dry... Speaking of watching paint dry, some guy did a crowd source to raise mony to show how stupid he thought the movie ratings board, the one that issues the PG-13 or whatever ratings is. Their rules say that they MUST watch the submitted movie in its entirety. So he has sent them 10.5 hours of watching paint dry. 10.5 hours because they charge by the hour and thats how much money he raised. IMO? Some folks have entirely too much time on their hands. ;-) Cheers, 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> ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
