Greetings all;
The attached file would be quite a bit easier to trace and hook up in
a .hal file if it was subjected to the joints update script. There now
exist in both the listings for halmeter, halshow and halscopeidentical
names for signals I need, some of which I have been able to exercise to
prove they would work, but some, like jogs, don't seem to be valid
signals although they'll show in halshow too.
signals I have not managed to find would be the input to axisui? that
will trigger a change in the radio buttons for active axis indication in
the axis gui.
It would be helpfull if this old style .comp file was converted with the
axis/joint splitter script. Can this be done?
Thanks a bunch.
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, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>
//jogaxisget.comp:
// sudo halcompile --install --install-doc jogaxisget.comp
component jogaxisget "determines which axis is jogging";
pin in bit Xin0 "axis.x.kb-jog-active";
pin in bit Xin1;
pin in bit Yin0 "axis.y.kb-jog-active";
pin in bit Yin1;
pin in bit Zin0 "axis.z.kb-jog-active";
pin in bit Zin1;
pin in bit Ain0 "axis.a.kb-jog-active";
pin in bit Ain1;
pin out bit Xtrigger ;
pin out bit Ytrigger ;
pin out bit Ztrigger ;
pin out bit Atrigger ;
pin out bit activeX ;
pin out bit activeY ;
pin out bit activeZ ;
pin out bit activeA ;
pin in bit Xverify =FALSE "axisui.Xisactive";
pin in bit Yverify =FALSE "axisui.Yisactive";
pin in bit Zverify =FALSE "axisui.Zisactive";
pin in bit Averify =FALSE "axisui.Aisactive";
variable hal_bit_t prev_Xtrigger = FALSE;
variable hal_bit_t prev_Ytrigger = FALSE;
variable hal_bit_t prev_Ztrigger = FALSE;
variable hal_bit_t prev_Atrigger = FALSE;
license "GPL";
function _;
;;
FUNCTION(_) {
if (( Xin0 && !Xin1 ) || ( Xin1 && !Xin0 )) {/* XOR2 axisX */
Xtrigger = 1;
} else {
Xtrigger = 0;
}
if (( Yin0 && !Yin1 ) || ( Yin1 && !Yin0 )) {/* XOR2 axisY */
Ytrigger = 1;
} else {
Ytrigger = 0;
}
if (( Zin0 && !Zin1 ) || ( Zin1 && !Zin0 )) {/* XOR2 axisZ */
Ztrigger = 1;
} else {
Ztrigger = 0;
}
if (( Ain0 && !Ain1 ) || ( Ain1 && !Ain0 )) {/* XOR2 axisA */
Atrigger = 1;
} else {
Atrigger = 0;
}
if(!!Xtrigger != !!prev_Xtrigger) /* Xtrigger has changed */
{
activeX = 1;
if(!!Xverify) {prev_Xtrigger = Xtrigger; activeX = 0;}
}
if(!!Ytrigger != !!prev_Ytrigger) /* Ytrigger has changed */
{
activeY = 1;
if(!!Yverify) {prev_Ytrigger = Ytrigger; activeY = 0;}
}
if(!!Ztrigger != !!prev_Ztrigger) /* Ztrigger has changed */
{
activeZ = 1;
if(!!Zverify) {prev_Ztrigger = Ztrigger; activeZ = 0;}
}
if(!!Atrigger != !!prev_Atrigger) /* Atrigger has changed */
{
activeA = 1;
if(!!Averify) {prev_Atrigger = Atrigger; activeA = 0;}
}
}
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users