Thanks for the input. The motenc sample runs just fine by itself. It also 
runs just fine with the mesagpio.hal file and the I/O points on the motenc 
work just fine. I will change that to "net" instead of linksp. That end 
statement thingy to the email was just my signature. Sometimes I work a 
little from home and forgot to prevent the signature from attaching itself 
to the email. I don't think that managing I/O points on a GPL program was 
what they had in mind. But thanks for pointing that out, I'll remove it from 
future posts as I am doing this project at home. We are required to use that 
statement for work related emails but I'm just having fun learning emc.

Thanks,
     Paul

----- Original Message ----- 
From: "Sebastian Kuzminsky" <[email protected]>
To: "Enhanced Machine Controller (EMC)" <[email protected]>
Sent: Saturday, February 13, 2010 10:20 PM
Subject: Re: [Emc-users] Hostmot question


> Paul Keeton wrote:
>> 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
>
> That little hal snippet looks pretty good.  Two bits of feedback:
>
> 1. No need to run both the read() and the read_gpio() function, and no
> need to run both the write() and write_gpio() function.  read() reads
> everything including gpios, and read_gpio() only reads gpios.  write()
> writes everything including gpios, and write_gpio() only writes gpios.
>
> 2. linksp works, but is deprecated.  Consider using net instead.
>
>
>> 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!
>
> I dont know why it would lock up, but i'd love to find out!  I would
> expect a system with both a hostmot2 5i20 and a motenc should work just
> fine, shouldn't be a problem.
>
> Does the motenc sample config (without hostmot2 stuff added) work?
>
>
>> "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."
>
> You know this is an open list with plenty of non-US subscribers, right?
>
>
> -- 
> Sebastian Kuzminsky
>
> ------------------------------------------------------------------------------
> 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