Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit switch and encoder wiring to NI9512 module

Hi RJ45, 

 

Answers to your questions:

 

I know feedback in axis settings needs to be set to Encoder 0 for this, but can Stepper Axis Loop Mode still be Open-Loop?

 

You should have the stepper set to closed loop for the feedback to be meaningful. I'm not sure what you are asking here. 


 

I have a few questions for you to help break up the problem and hopefully get us to a solution quickly. 

 

1) Can you perform a simple linear move with the motor? When you command it to move a certain number of encoder pulses, does that work?

 

2) Do you have a home switch set up, or are you just using the encoder z-index as your home switch? The find home move will search for a home limit switch if configured. 

 

You shouldn't have to reprogram the FPGA or use the RT side to determine if the motor is in its home position. 

National Instruments
Staff Certification Engineer
0 Kudos
Message 11 of 13
(2,760 Views)

Yes, I understand why open loop doesn't make sense because if I use feedback at all, it should be in closed loop mode, however just adding Feedback did change indexing behaviour for the better, so I thought I was on to something. Anyway, I just solved my problem today with you leading me into checking closed loop operation.

In Closed loop mode, it never “line moved” as expected. When I increase the position error limit it runs farther, and I see error: -70219 telling me after the move, so I know it is something with this. In Open loop mode, the stepper "line move” looks like it runs perfectly. However, I added a position error SoftMotion read and could see that it was off by a factor of 45. Should have used my head instead of just following Knowledgebases. This led me to realizing the stepper is before my gearbox and my external encoder is after the gearbox. So counts/rev of encoder = quadrature x pulses(PPR) = (4 x 4096) = 16384 and steps/encoder rev = steps/revolution with microstepping, 18000 x 40 = 720000.

Hybrid mode requires the open FPGA reference + SoftMotion initialization code at the beginning of my RT code. I didn’t think Interactive Panel includes this and I ever since I started hybrid mode, I got an error with Interactive Panel immediately upon opening it (-77055). I didn’t realize this error could have something to do with position error limit. This is why I never finished configuring my closed loop system and wanted to keep it as open loop. There is not as much help with cRIO + hybrid compared to other devices, so I really wanted to have this background in a forum somewhere.

My main question from the beginning is now answered: a Find Reference(Home) is not required before Find Reference(Index). The Help and example is a little misleading with this.

Also, with my Find Reference(Index) move, the motor overshoots the index and then comes back. I’m assuming a little bit of fiddling with deceleration will get rid of this. This is probably similar to my forward and reverse motion when it couldn’t find index.

On a side, I find it weird that SoftMotion axis settings in “Find Home and Index” example has “Home” switch as disabled. I would think this would need to be enabled in order to find home.

0 Kudos
Message 12 of 13
(2,755 Views)

Just thought I'd attach this error I mentioned above (-77055) that I get in hybrid mode with the 9076. It was not due to my open / closed system position error. I can still simulate it. I started getting it when I first put the chassis in hybrid mode. The errors happen when opening Interactive Panel on the axis (which is recommended for setting up a closed loop system). To use interactive panel in hybrid mode I have to (I'm sure there are other ways unknown to me):

1. Run my FPGA vi

2. Run my code/example that loads bitfile and reinitializes SoftMotion

3. Open Interactive Panel - opens with no errors, and can do moves.

If I omit any of the above steps I will get this error 77055 and cannot make any moves or do anything in Interactive Panel. If I just restart controller and go into Interactive panel, I get error 70229. The steps above will get rid of this error too, there is no ethernet connection issue. In hybrid mode, if you get an error at step 1, try disconnect and connect by right clicking on controller and then following the steps.

0 Kudos
Message 13 of 13
(2,734 Views)