Re: PPMC progress



And, a LOT more progress!

I got past some quirky compile problems and got the
I/O and task executables to build this time.  And, when
I ran it in the full, RT mode, the encoders worked perfectly,
and the first channel of the DAC also woked perfectly.
The remaining DAC channels didn't respond, and the
program would either hang or crash the whole system
after a few minutes.  Still, that is a rather amazing jump
in just one day.

So, there are a couple of things I need some help with.

The big one is how do you set up to run the motion control
routines in user mode, so you can debug the code?
There are comments in the code that seem to indicate
you can do this, as in stg.c - or, is the user mode operation
just for diagnostic programs, but not EMC?

EMC may be using different calls to the encoder and DAC
routines than I was using in testing them with the diag program.

I made an executable, plat/linux_2_0_36/bin/ppmcmot
(created by copying stgmot).  Does that do the i/o in user
mode, or is that a software simulated motor?

The second problem I had was a quirk in the way asm/io.h
works.  The stg.c routine does not run into it, because all
port I/O is in one c file.  What Eric put together has a general
EPP port driver routine, and then separate c files for each
major function, ie. encoder, DAC, digital I/O, etc.
To get better performance, I used some inb and outb inline
macro calls in these separate c files, as well as using them
in the port driver.  This caused multiple definition messages
on the inb, outb etc. macros.  The problem is that asm/io.h
not only defines stuff needed by every c source file that is going
to use them, it also instantiates some extern stuff that needs to
be instantiated only once per executable.  (At least, I think
that's the problem.)  My quick solution was to take out the
macro calls and the #include <asm/io.h>in the higher level
routines, and only have them in the port driver.  But, that
slows the program down.

Anyone who has any comments on all of this, I'd be glad
to hear what you think!

Thanks,

Jon




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact