Step/dir outputs for a stepper motor from a mesa 5i25

More
10 Feb 2018 17:35 #105713 by Jakemestre1
How does the 5i25 output steps and dir signals? I'm trying to get classic ladder to control a new stepper motor and the example uses the following:
net tstep <= stepgen.2.step => parport.1.pin-17-out
net tdir <= stepgen.2.dir => parport.1.pin-16-out
any idea how to replicate the stepgen signals for mesa cards?
Thanks in advance.
Jake

Please Log in or Create an account to join the conversation.

More
10 Feb 2018 18:43 #105719 by PCW
The stepgens in mesa hardware are built into the firmware and wired to fixed interface pins
( which pins are determined by the particular firmware used )
you do not control them at the pin level but rather by position or velocity commands.

I would suggest either looking at one of the sample hm2 stepper configurations that come with
LinuxCNC, or create a configuration with pncconf (say choosing the 5I25 RXFX2 firmware ) to see
how the stepgens are connected in a Mesa compatible hal file
The following user(s) said Thank You: Jakemestre1

Please Log in or Create an account to join the conversation.

More
10 Feb 2018 19:09 #105720 by Jakemestre1
Thank you Peter,
This question stems from another thread I started in the ClassicLadder section. I figured this question was better here. So should I then try to convert the ladder to output position commands instead of step/dir signals? I have no idea what I'm doing here, lol. Sorry for my naiveté.

Please Log in or Create an account to join the conversation.

More
10 Feb 2018 22:11 #105723 by raglanlittlejohn
I had similar problems going from parallel port to mesa 5i25/7i78. You need the manual for the 5i25/7i76, and the list of pins mentioned in this thread.
forum.linuxcnc.org/39-pncconf/31819-cann...signals-in-mesa-5i25

loadrt hostmot2
loadrt hm2_pci config="num_encoders=4 num_pwmgens=1 num_stepgens=2 sserial_port_0=0xxxxx"

In your hal file you will have the equivalent of the above lines. my set up uses 4 encoders, but if I only had 2 encoders, I would put
num_encoders=2 instead of num_encoders=4. This would free up some input pins which could be used for other things.

Please Log in or Create an account to join the conversation.

More
10 Feb 2018 23:18 #105725 by Jakemestre1
Thanks raglanlittlejohn,
I'm sorry, I'm not being very clear what I need. So I already have the machine basically working with a solid hal file and now I'm trying to control the lathes turret. What I'm trying to figure out at this point is how to output position commands from the classic ladder so hal will execute the position change of the turret. I've got the y axis(angular) scale calibrated so each pocket is it's own integer(i.e. if I execute G0 Y3, tool 3's pocket lines up to be used).
Would this just be easier to command with an M6 remap? If so what is the best course of action to home the turret only after the air cylinder has been actuated?

Please Log in or Create an account to join the conversation.

More
11 Feb 2018 10:11 #105739 by raglanlittlejohn
I'm afraid its a bit beyond me. I think your saying you can call for a tool, say G0 Y8, and number 8 tool pocket will line up.
So a command goes from axis to the Mesa encoder and turns the turret to the right position. I guess you need to operate the air cylinder to open the turret, send the position command, confirm turret in position, then close air cylinder.
I would just have to look at other examples of classicladder tool turrets, and adapt one of them. I also find its helpful to draw out a schematic of what I'm trying to do. I find it much easier to visualize whats going on, than just looking at the hal file.

Please Log in or Create an account to join the conversation.

More
26 Feb 2018 21:00 #106569 by andypugh

What I'm trying to figure out at this point is how to output position commands from the classic ladder so hal will execute the position change of the turret.


Do you have any position sensors on the turret? If so, then it might be better to turn on and off a stepgen in velocity mode, and stop when the turret is in position.

There is a HAL component (carousel) for this sort of thing. But that might not suit your system.

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.093 seconds
Powered by Kunena Forum