Haltcl is an option, but:
Clean files and least skills required would be very nice not only for 
me, but for others, who might touch these files or take them as an 
example. Tcl requires knowledge of yet another (at least) language.

How about being able to skip only one line in simple way by not 
disturbing the order of lines? How about skipping from the middle of the 
line?

I don't find the line
f {[info exists ::OPTIONS] && $::OPTIONS(SIM) == 1} {
clean and elegant.

In most cases I am not building working sim configs. I just want to 
verify hal files are loading to some extent and maybe test some parts, 
UI, etc., which can be checked before testing at the field.

I do like content grouping and order in hal files by purpose and logical 
sequence. This means a lot of lines with and without references to HW 
interlaced / mixed.

A simple one-to-several symbol skipping like \ or in G-code would do the 
trick.

And this is not just to figure it out for now - I am about the 
possibilities, features and future.

I saw tcl, I saw python HAL configs in machinekit, but they make things 
more and more complicated, hacky-coded-scrambled style text instead of 
quite elegant HAL with small set of commands used most often. Basically, 
loadrt, loadusr, addf, net and setp.

Apart from simplicity and cleaniness I like names with meanings 
abbreviations and too. When using a few boards they make life much 
easier. Check these HAL lines from one of my configs:

addf [HM2](FPGA)write servo-thread
...
# --- Encoders ---
# --- X
setp [HM2](ENC)00.scale [AXIS_0]INPUT_SCALE
net x-pos-fb [HM2](ENC)00.position => pid-x.feedback axis.0.motor-pos-fb
net x-vel-fb [HM2](ENC)00.velocity => pid-x.feedback-deriv
net x-index-enable axis.0.index-enable <=> [HM2](ENC)00.index-enable
# --- Y
...
setp [HM2](AO)analogout2-scalemax  [AXIS_2]OUTPUT_SCALE
setp [HM2](AO)analogout2-minlim    [AXIS_2]OUTPUT_MIN_LIMIT
setp [HM2](AO)analogout2-maxlim    [AXIS_2]OUTPUT_MAX_LIMIT
net x-output => [HM2](AO)analogout0
...
# --- Tool changer ---
loadrt arrowdrum
...
net tc.arm-to-spindle motion.digital-out-02 => not-arm.in [HM2](DO)06
net tc.arm-park not-arm.out => [HM2](DO)05
net tc.arm-is-at-spindle [HM2](DI)08 => motion.digital-in-02
net tc.arm-is-parked [HM2](DI)07 => motion.digital-in-04

setp arrowdrum.pockets 21
setp arrowdrum.home-pocket 19
net tc.home [HM2](DI)03-not => arrowdrum.sense-index
net tc.sense-each [HM2](DI)28 => arrowdrum.sense-pocket
...


01/28/2016 04:45 PM, Dewey Garrett rašė:
> One can perform all kinds of programming logic using a haltcl file.
> Ref:http://linuxcnc.org/docs/2.7/html/hal/haltcl.html


------------------------------------------------------------------------------
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to