> You want the pyvcp LEDs to always be associated with the > same hardware pins, even if you change the function (aka > net name) that the pin is used for....
exactly! > This is kind of an odd application - usually the mapping of > hardware pins to functions is determined by the physical > wiring of the machine, and rarely changed. If it does change, > the effort required to tweak the HAL file is usually less than > that required to change the physical wiring. well. i'm using hardware names for a diagnostic tab with indicator grouped by function: inputs, outputs, encoders, servo status, alarms etc. and from time to time i need edit customer's configs and debug it on my machine. and it's nice to minimize changes and keep 'em in a single place when moving configs between machines. > Unfortunately the halcmd "alias" command only applies to > pins and parameters, not nets. > I don't recall if there is a technical reason for not allowing > aliases for signal/net names. If that could be added, it would > solve your problem. yes, you're right. this is what i was thinking giving the subject "net alias".. i will check the source and if it can be done without much trouble i can come up with a patch. i also thought of some kind of preprocessor for configs, but this looks to me a logical addition so i give it a try first. > You could then write: > > # these lines never change > net gpio0 sscii.0.gpio.0.in-not > net gpio1 sscii.0.gpio.1.in-not > > # these lines determine pin function > alias gpio0 x-neg-limit > alias gpio1 x-pos-limit i suppose alias net gpio0 x-neg-limit alias net gpio1 x-pos-limit to match the existing syntax "alias type name alias" > # these lines connect things that depend on pin function > net x-pos-limit => axis.0.pos-lim-sw-in > net x-neg-limit => axis.0.neg-lim-sw-in > > # these lines connect LEDs that depend only on physical pin > net gpio0 => pyvcp-led0 > net gpio1 => pyvcp-led1 /dmitry ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
