Using a 7i92t as replacement for a parallel port

More
1 year 3 months ago #331826 by Cerezas
Hello,

After some research, I came to the conclusion that a 7i92t could replace a parallel port. My old computer died and I purchased a mesa card and attached it to a computer running LinuxCNC 2.9.4. I flashed the 7i92t_benezanx2d firmware following suggestions in another thread. 

I'm trying to control a very simple CNC Lathe by Taig. The signals that it requires on a parallel port are:

ESTOP - Pin 1
XDIR - Pin 2
XSTEP - Pin 3, Inverted
ZDIR - Pin 4
ZSTEP - Pin 5, Inverted
SPINDLE - Pin 16. Just ON-OFF, no speed control.

Is it possible to make this work with a 7i92t? 

I'm attaching the parport .ini and .hal that I was using.

Thank you in advance.
 

Please Log in to join the conversation.

More
1 year 3 months ago #331827 by PCW
Yes, that should work.

You can use pncconf or MesaCT to created a configuration for the 7I92.

You can use a similar daugtercard if the Benezan card is not supported. 
 

Please Log in to join the conversation.

More
1 year 3 months ago #331831 by Cerezas
Thanks PCW. Sorry for the noobiness: I'm confused by the "daughterboard" terminology. I was hoping to be able to connect the DB25 male connector that comes from the lathe's control box directly into the DB25 female connector of the card. I'm confused because when I tried to use pncconf, I'm always asked about a daughterboard.

Is it correct to assume that in this case the daughterboard is the male connector from the lathe?

The benezan is not listed as firmware in the pncconf utility. Is it correct to assume that a firmware that has stepgens on pins 3 and 5 works? Or are there other criteria for choosing a firmware? 

Please Log in to join the conversation.

More
1 year 3 months ago #331832 by PCW
The 7I92 is intended to work with a separate breakout/daughtercard that
does things like buffer step/dir signals, accept 24V input signals from switches
etc etc.

You choose firmware that matches your breakouts (daughtercards) pinout.

When this is done, things like stepgens will be on the breakouts stepgen pins
and will be in a standard order like:

0  X
1  Y
2  Z
3  A
4  B

As long as you choose a similar daughtercard in pncconf or MesaCT, the
configuration should be usable. If the configuration utility does not have
a exact daughterboard match, there may be small details like GPIO pin
assignment for things like limit switches or spindle-on that require a
bit of hand editing of the hal file.

If you have a Benezan breakout, a G540 configuration should be close.

Please Log in to join the conversation.

More
1 year 3 months ago #331893 by Cerezas
After more research, RTFM, watching videos, I finally managed to produce a configuration with pncconf, but I doubt it will work. The question still remains:

If I have the proper configuration, can I connect the DB25 male connector from the lathe's control box directly to the DB25 female connector of the 7i92? I'm still thinking in very simple terms: the 7i92 can completely emulate the behaviour of a parallel port (including, IOs and GND pins).

Sorry if my questions show my ignorance, I'm trying to put the pieces of the puzzle together.

Please Log in to join the conversation.

More
1 year 3 months ago #331899 by unknown
The 7i92t has 17 signal pins that are on the same pins as a parallel port. The gnd pins are on the same pins as well. So yes electrically it is the same.
The only thing is that some ground pins can be jumpered to supply 5v, the manual explains this.
The major difference being, your are not locked into pin direction as you are with a parallel port. The pin function (direction) is controlled by the bitfile loaded into the card.
So yes if a system previously used a parallel port, the 7i92t can with a suitable config be a "drop in replacement" with Linuxcnc. With the bonus of having an extra 17 Io pins on the second connector, so one could think of it as replacing 2 parallel ports.
Obviously one can not use it to actually connect to a printer to print.
If you compared the pinout on the ports of the 7i92t with that of a parallel port you will see the pins that have IO are connected physically to the same pins on a parallel port, as are the gnd pins,with the exception of those pins on the 7i92t that can be jumpered to supply 5v instead of being gnd pins.

Please Log in to join the conversation.

More
1 year 3 months ago #331908 by Cerezas
Thank you unknown, that's very important information. I noticed that the card came with the W1 and W2 jumpers in pull-up mode. I moved them to pull-downs. 
Hardware-wise, I'm closer to my goal. 

Now, regarding software configuration. I used pncconf to generate a configuration using 7i92t_g540d.bin, since pncconf does not show the firmware that corresponds to what I need (in the stepconfs, dir and step are swapped). The firmware that matches the lathe is 7i92t_benezanx2d.bin.

Can anyone review my hal and ini files (attached) and tell me how to handle swapping the dir and step pins? After the hal is corrected, I assume I need to flash the benezan firmware, right?

Also, if someone can suggest how to clean up those files... I only need to control the pins I mentioned when I opened this topic (see top).

I may need to come back later about the PID stuff and the scale calculation. One of the issues I found in pncconfig is that the pitch can only be a value >= 1, I needed to enter a value of 0.8 mm/rev.

Please Log in to join the conversation.

More
1 year 3 months ago #331909 by PCW
Look like the scaling is wrong on the X Axis ( max velocity is .1666 mm/s )

If there is an issue with pncconfs scaling helper, you could just calculate
the steps per mm and enter that directly.

The PID boilerplate is fine.

To setup pin 16 for spindle control you need to set the number of stepgens to
3 or 2 in pncconf to free up pin 16 as GPIO 5. I would also set the number of pwmgens
and encoders to 0, then hit "Accept components changes" to free up all GPIO
for any other outputs or inputs you need:


 

Attachment not found




GPIO outputs need to be set to "GPIO Output" in the pin type menu:


 

Attachment not found




 

Please Log in to join the conversation.

More
1 year 3 months ago #331915 by Cerezas
Strange. I'm attaching the pncconf file that generated the HAL and INI I posted before. When I load it, I see different screens from what you are showing. I had already set pwms and encoders to 0 and steppers to 2.

Anyway, the question remains: how do I change pin 2 (002)  to be XDIR, pin 3 (004) to be XSTEP (Inverted), pin 4 (006) to be ZDIR and pin 5 (008) to be ZSTEP (Inverted)? I was thinking this needs to be done in the HAL file, but I don't see how.
 

Please Log in to join the conversation.

More
1 year 3 months ago #331916 by PCW
I think there's a misunderstanding...

You don't need to change any pins.

If you use 7i92t_benezanx2d.bin firmware, the pins are
already correct:

Code:
IO Connections for P2 DB25 pin#             I/O   Pri. func    Sec. func        Chan     Sec. Pin func   Sec. Pin Dir  1                      0   IOPort       None            14                      1   IOPort       None             2                      2   IOPort       StepGen          0        Dir/Table2      (Out) 15                      3   IOPort       None             3                      4   IOPort       StepGen          0        Step/Table1     (Out) 16                      5   IOPort       StepGen          4        Step/Table1     (Out)  4                      6   IOPort       StepGen          1        Dir/Table2      (Out) 17                      7   IOPort       PWM              0        PWM             (Out)  5                      8   IOPort       StepGen          1        Step/Table1     (Out)  6                      9   IOPort       StepGen          2        Dir/Table2      (Out)  7                     10   IOPort       StepGen          2        Step/Table1     (Out)  8                     11   IOPort       StepGen          3        Dir/Table2      (Out)  9                     12   IOPort       StepGen          3        Step/Table1     (Out) 10                     13   IOPort       None            11                     14   IOPort       QCount           0        Quad-A          (In) 12                     15   IOPort       QCount           0        Quad-B          (In) 13                     16   IOPort       QCount           0        Quad-IDX        (In)  

Please Log in to join the conversation.

Time to create page: 0.114 seconds
Powered by Kunena Forum