I'm trying to learn how match8 works in a hal file. As I understand if the 
match8.x.b0 
is true and the match8.x.a0 is true then the match8.x.out should be true...

This the the hal file
# components
loadrt threads name1=partest_thread period1=1000000 
loadrt hal_parport cfg="0x0378"
addf parport.0.read partest_thread 1 
loadrt match8 count=1

# signals and links for the match8 blocks
newsig true bit
sets true 1

# create signals for the 6-position
# jog-selector switch
newsig jogsel0 bit
newsig jogsel1 bit
newsig jogsel2 bit
# link jog-selector bits to hardware
linksp jogsel0 parport.0.pin-10-in
linksp jogsel1 parport.0.pin-11-in
linksp jogsel2 parport.0.pin-12-in


# determine if the jog-selector bits indicate
# an X-jog
# the match is if no pins are on

linksp true match8.0.in
newsig Xjogen bit
linksp Xjogen match8.0.out
newsig Xsel0 bit
newsig Xsel1 bit
newsig Xsel2 bit
newsig Xsel3 bit
newsig Xsel4 bit
newsig Xsel5 bit
newsig Xsel6 bit
newsig Xsel7 bit
sets Xsel0 1
sets Xsel1 0
sets Xsel2 0
sets Xsel3 0
sets Xsel4 0
sets Xsel5 0
sets Xsel6 0
sets Xsel7 0
linksp Xsel0 match8.0.b0
linksp Xsel1 match8.0.b1
linksp Xsel2 match8.0.b2
linksp Xsel3 match8.0.b3
linksp Xsel4 match8.0.b4
linksp Xsel5 match8.0.b5
linksp Xsel6 match8.0.b6
linksp Xsel7 match8.0.b7
linksp jogsel0 match8.0.a0
linksp jogsel1 match8.0.a1
linksp jogsel2 match8.0.a2


This is the results in the Terminal Window
[EMAIL PROTECTED]:~$ halrun -I -f jog.hal
halcmd: start
halcmd: show pin
Component Pins:
Owner  Type  Dir     Value      Name
 05    bit   IN           TRUE  match8.0.a0 <== jogsel0
 05    bit   IN          FALSE  match8.0.a1 <== jogsel1
 05    bit   IN          FALSE  match8.0.a2 <== jogsel2
 05    bit   IN          FALSE  match8.0.a3
 05    bit   IN          FALSE  match8.0.a4
 05    bit   IN          FALSE  match8.0.a5
 05    bit   IN          FALSE  match8.0.a6
 05    bit   IN          FALSE  match8.0.a7
 05    bit   IN           TRUE  match8.0.b0 <== Xsel0
 05    bit   IN          FALSE  match8.0.b1 <== Xsel1
 05    bit   IN          FALSE  match8.0.b2 <== Xsel2
 05    bit   IN          FALSE  match8.0.b3 <== Xsel3
 05    bit   IN          FALSE  match8.0.b4 <== Xsel4
 05    bit   IN          FALSE  match8.0.b5 <== Xsel5
 05    bit   IN          FALSE  match8.0.b6 <== Xsel6
 05    bit   IN          FALSE  match8.0.b7 <== Xsel7
 05    bit   IN           TRUE  match8.0.in <== true
 05    bit   OUT         FALSE  match8.0.out ==> Xjogen
 04    bit   IN          FALSE  parport.0.pin-01-out
 04    bit   IN          FALSE  parport.0.pin-02-out
 04    bit   IN          FALSE  parport.0.pin-03-out
 04    bit   IN          FALSE  parport.0.pin-04-out
 04    bit   IN          FALSE  parport.0.pin-05-out
 04    bit   IN          FALSE  parport.0.pin-06-out
 04    bit   IN          FALSE  parport.0.pin-07-out
 04    bit   IN          FALSE  parport.0.pin-08-out
 04    bit   IN          FALSE  parport.0.pin-09-out
 04    bit   OUT          TRUE  parport.0.pin-10-in ==> 
jogsel0
 04    bit   OUT         FALSE  parport.0.pin-10-in-not
 04    bit   OUT         FALSE  parport.0.pin-11-in ==> 
jogsel1
 04    bit   OUT          TRUE  parport.0.pin-11-in-not
 04    bit   OUT         FALSE  parport.0.pin-12-in ==> 
jogsel2
 04    bit   OUT          TRUE  parport.0.pin-12-in-not
 04    bit   OUT         FALSE  parport.0.pin-13-in
 04    bit   OUT          TRUE  parport.0.pin-13-in-not
 04    bit   IN          FALSE  parport.0.pin-14-out
 04    bit   OUT         FALSE  parport.0.pin-15-in
 04    bit   OUT          TRUE  parport.0.pin-15-in-not
 04    bit   IN          FALSE  parport.0.pin-16-out
 04    bit   IN          FALSE  parport.0.pin-17-out

I have a true on match8.0.a0 and match8.0.b0 but the 
match8.0.out is false... What am I doing wrong?

Thanks
John


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to