>That's pretty slick.

You could also automtically detect hardware and substitute simulated
components if real hardware is not available, for example
     if: parport 0 exists, use it
   else: use sim_parport

Example haltcl excerpt:
#-------------------------------------------------------------
if [catch {loadrt hal_parport "cfg=0 in"} msg] {
  puts msg="\n$msg\n"
  puts "\nNo parport available, trying sim_parport"
  loadrt sim_parport names=parport.0
  set text "\n************Using sim_parport************\n"
} else {
  set text "\n************Found real parport 0 ********\n"
}
puts [show pin parport*]
puts "$text"
#-------------------------------------------------------------

Note: The sim_parport hal component exists in the LinuxCNC
      distribution, other hardware could require new hal sim
      components or just some custom hal connections to take
      the  place of unavailable hardware for testing.
-- 
Dewey Garrett


------------------------------------------------------------------------------
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

Reply via email to