An update on the IO issue. Maybe this will help someone else........

I have been working on this problem for the past few days and made no 
progress until this evening. I now have the outputs working as they should. 
This is what is required to make the Mesa 5i20 100% gpio with the first pin 
being the example for all outputs you are going to use. The plan was to add 
two 24 point opto racks. One for Outputs, One for Inputs. The output rack 
plugs into the P2 header on the M5i20 and the ins two P3. This leaves P4 
open for future upgrades to the machine. I am using a Motenc-lite for the 
servos and the operators panel I/O. I found that loading the hostmot driver 
and parameters thru the motenc_io.hal file locks the PC up cold. The only 
recovery is to kill the power and start over. So I wrote a file .hal called 
mesagpio.hal to handle all of the field I/O. Here is an excerpt from that 
file.

#Load the hostmot2 driver
loadrt hostmot2

#Load the config and set all pins to GPIO
loadrt hm2_pci config="firmware=hm2/5i20/SVST8_4.BIT num_encoders=0 
num_pwmgens=0 num_stepgens=0"

addf hm2_5i20.0.read servo-thread 1
addf hm2_5i20.0.write servo-thread 1
addf hm2_5i20.0.read_gpio servo-thread 1
addf hm2_5i20.0.write_gpio servo-thread 1
addf hm2_5i20.0.pet_watchdog servo-thread 1



setp hm2_5i20.0.gpio.000.is_output 1
setp hm2_5i20.0.gpio.000.is_opendrain 1
setp hm2_5i20.0.gpio.000.invert_output 1
linksp mainstart <= classicladder.0.out-04
linksp mainstart => hm2_5i20.0.gpio.000.out

           This allowed me to control  hm2_5i20.0.gpio.000.out with %Q4 in 
classicladder. My big problem was not "petting the watchdog" with the servo 
thread. All the other outputs are setup the same (except the pin number). 
Thanks for the help to those of you who answered my email a few days ago. 
Would anyone know why it locks up when loading thru the io.hal file? It 
seems to do fine when loading thru it's own hal file. I don't have the 
servos running yet though. Will this be an issue using the 2 different 
boards (Motenc-Lite and Mesa 5i20) in the same control? I only used the 
Motenc because we purchased it a year ago for a dropped project. Hate to see 
good hardware go to waste!



Thank you,
Dave Keeton
Technical Services Manager
The Eagle Tool & Machine Co.
Springfield, Ohio
Phone 937-325-1586
Fax: 937-325-9309
Email: [email protected]


"The attached documents may contain technical data within the definition of 
the International Traffic in Arms Regulations (ITAR), and are subject to the 
export control laws of the U.S. Government. Transfer of this data by any 
means to a foreign person, whether in the U.S. or abroad without an export 
license or other approval from the U.S. Department of State, is prohibited."







----- Original Message ----- 
From: "Paul Keeton" <[email protected]>
To: "EMC Users Group" <[email protected]>
Sent: Wednesday, February 10, 2010 7:46 PM
Subject: [Emc-users] Hostmot question


> Hello,
>
>              I am using a mesa 5i20 for general purpose I/O. All pins are 
> gpio. This is what I am doing.....
>
> setp hm2_5i20.0.gpio.000.is_output 1
> net classicladder.0.out-00 => hm2_5i20.0.gpio.000.out
>
>              When classicladder.0.out-00 is on hal config shows that 
> hm2_5i20.0.gpio.000.out is also on but I get no output out of the opto22 
> module. The led on the opto board doesn't light up either. If I check an 
> input with the same cable on a different opto board through a different 
> 5i20 port it works fine and shows in hal config also. Any clue on what is 
> causing this? I want to use 48 I/O pins with 24 inputs on one opto board 
> and 24 outs on the other. In other words my ins are working but my outs 
> are not.
>
> Thanks,
>        Paul
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 



------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to