Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How doing cycle mode

 
0 Kudos
Message 1 of 11
(4,523 Views)
Thank you for using the discussion forum. Please be more specific with your question.

Jochen Klier
National Instruments Germany
0 Kudos
Message 2 of 11
(4,515 Views)
Hello,

I am using this vi ("Continuous Looping Trajectory in One Axis (On-Board) Flexmotion Controller") as a base for my program.

Basically I would like to make N cycles for a friction test .
So the target position is working properly as well as the number of cycles required.
But the user must always press the sequence motion button to get the next move (back or forward) and I'd like to get a subvi that permits, once the forward move is completed, to move reverse (or back) a...and so on N times.
In fact I would like just to make some cycles without pressing manually the button sequence.
Furthermore, I tried with the flexmotion trajectory VIs like "wait for move complete" or "read move complete status" but I haven't found a good configuration yet.

I tried also to set the boolean command to true but it cancel the move.
So if you have any suggestion, please let me know.

Thanks
0 Kudos
Message 3 of 11
(4,506 Views)
Maybe I don't understand exactly the problem. I have found the example that you are referring to. In this example the user needs to press "Start Motion Sequence" once in order to start the sequence. Then the motor cycles between two positions until the Stop button is pressed. The user doesn't have to press any button to start a new cycle.

Have you modified the vi? If so could you please attach it?
Have you put a while loop around the whole sequence structure? (This wouldn't make sense.)
How familiar are you with LV programming?

Best regards,

Jochen Klier
National Instruments Germany

P. S.: I'm attaching the example you have mentioned for reference for the rest of the community
0 Kudos
Message 4 of 11
(4,507 Views)
0 Kudos
Message 5 of 11
(4,491 Views)
Ah ok, so this example has nothing to do with the one you mentioned initially. Still I don't understand exactly the problem. The "Sequence" button stops the while loop and it halts the current move. The next move in your sequence is started after that. If you don't hit the button the move completes without any user interaction

"In fact I would like just to make some cycles without pressing manually the button sequence."

This need that you postulate in your last statement seems to be fulfilled by the program.

By the way: You shouldn't run a while loop with 0 ms timing as this takes a lot of CPU load.

Best regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 6 of 11
(4,486 Views)

Alright,

Thanks for replying so quickly.

But how can I set for example 15 cycles without pressing the 'sequence button'?

(One cycle is two moves: forward and reverse)

Regards

0 Kudos
Message 7 of 11
(4,484 Views)
Maybe there is a huge misunderstanding but I have just entered "15" in the Cycles control, a target position and I have started the vi.
Result: The axis moved back and forth 15 times without user interaction. The only additional thing that I did was to increase the velocity and acceleration values to 1000 as otherwise the moves would have been very slow.

Best regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 8 of 11
(4,480 Views)

Hello,

Sorry about the last mail but I made a confusion between the vi "continuous looping trajectory with flexmotion controller" and "one axis move between 2 positions (for loop)".

I enclose again the VI. I am using a PXI-7344 board with a UMI-7764 controller to steer a stepper motor.

I configured in MAX the axis 1 in stepper mode and closed loop with encoder feedback.

But When I use this vi, I get one move forward and I have to push each time the sequence buttob to go reverse or to start the next cycle...?

Has anyone an idea?

PS: See the vi enclosed

Thanks

Best regards

0 Kudos
Message 9 of 11
(4,466 Views)
Yes, that's exactly the the vi I was referring to in my last posting. In my tests there was no need to press the sequence button all the time (see attached screenshot). The only issue that I could find is the fact that with your settings for the data range of the velocity and the acceleration it takes very long until each move completes so you need to be very patient.

Why do you think you have to click the button all the time? This could only happen if the move complete flag is never asserted. The only reason I can think of why this might happen could be wrong settings when running in closed loop stepper mode. You also don't check for modal errors in the inner while loop of your vi. Please have at least a look at the modal error in 1D-Interactive in MAX. If you are running in closed loop stepper mode chances are that a following error occurrs due to a wrong stepper steps/revolution vs. encoder counts/revolution ratio.

Best regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 10 of 11
(4,459 Views)