I think the hal syntax is a pretty neat way to wire up a directed acyclic graph. I've played with graph programming for a very long time and here is another syntax that, one day, we may want to think about:
value= function( input1, input2, ..., inputN ) more_output = another_function( value, 5 ) repeat... etc What is nice about the syntax is that it looks like regular functional programming and yet it actually wires a graph at the same time. Everything to the right of '=' is an rvalue or input pin; everything to the left is an lvalue or output pin. Another idea is that anything that outputs multiple pins could be dereferenced using matrix or pointer notation. E.g. Output[0] or output.0 Just ideas for thought. - Mike -----Original Message----- From: cmg...@sover.net [mailto:cmg...@sover.net] Sent: Monday, April 13, 2009 7:36 PM To: Enhanced Machine Controller (EMC) Cc: 'Enhanced Machine Controller ' Subject: Re: [Emc-users] HAL Direction arrow conventions Thanks Len! > I recently learned this myself... > >>From the HAL manual section 1.1.4 net: > "The direction indicator "<= and =>" is only to make it easier to read for > humans and is not used by net." > > HAL knows what can accept input and what can accept output and does what > it > needs to do automatically and will error if you try to make it do > something > it can't. > >>Len > > > > -----Original Message----- > From: cmg...@sover.net [mailto:cmg...@sover.net] > Sent: Monday, April 13, 2009 4:51 PM > To: Enhanced Machine Controller (EMC) > Cc: Enhanced Machine Controller @sover.net > Subject: [Emc-users] HAL Direction arrow conventions > > As a new guy, I start my study of the HAL literature. > Noting my questions, I thought to burden the group in a feeble jesture of > participation ;-) > > this example quizzes me: > > To connect a signal to a pin we use the net command. > halcmd: net X_vel <= siggen.0.cosine > To see the effect of the net command, we show the signals again: > halcmd: show sigignals: > Type Value Name float 0.00000e+00 X_vel <== siggen.0.cosine > When a signal is connected to one or more pins, the show command lists the > pins immediately following the signal name. The "arrow" shows the > direction of data flow - in this case, data flows > from pin siggen.0.cosine to signal X_vel. Now let's connect the X_vel to > the velocity input of a step pulse generator: > halcmd: net X_vel => freqgen.0.velocity > We can also connect up the Y axis signal Y_vel. It is intended to run from > the sine output of the signal generator to the input of the second step > pulse generator. The following command accomplishes > in one line what two net commands accomplished for X_vel: > halcmd: net Y_vel siggen.0.sine => freqgen.1.velocity [end of quote] > > Why no arrow between Y_vel and siggen? > > Also, the machine reply <== uses two =, is that significant? > > Perhaps additional study will explain it to me, but reading to this point > has me wondering. > > TIA > > Cal > > > ------------------------------------------------------------------------ ---- > -- > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > > ------------------------------------------------------------------------ ------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------ ------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users