LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smoothing the output .CSV file to Stepper Motor

Is this correct?

 

screenshot_1996.jpg

0 Kudos
Message 21 of 33
(1,063 Views)

This is where I am.

 

screenshot_1997.jpg

 

screenshot_1998.jpg

0 Kudos
Message 22 of 33
(1,060 Views)

I went home to test the motor with the latest .VI and here is the link to the result.

 

The results are the same and further investigation is needed.

 

Here is the video link: https://youtu.be/irhrKMQJdzw

 

Hope you find this interesting.

 

Regards,

 

Mike 

 

0 Kudos
Message 23 of 33
(1,057 Views)

I am looking into "Using a State Machine (Event Driven) Architecture

 

But it looks complicated: http://www.ni.com/white-paper/2926/en/

0 Kudos
Message 24 of 33
(1,052 Views)

Here is more info that might help to solve this problem.

 

Normally this type of motor is controlled with its own MCode Terminal.

 

Schneider have their own software (that said, they also created the .VI's): 

 

The Terminal ooks like this:

 

screenshot_2001.jpg

screenshot_1999.jpg

 

The commands there made the motor move very smoothly in several curves. Blue is forward and Red backward. The Motor ramps up and down very smoothly.

 

I think the commands in the code are the same as the commands in the .VI below.

The VI. was made by 

 

screenshot_2000.jpg

 

I feel that something is mising from the current .VI that is shown in the MCode.

 

Hope someone outthere undersands this stuff ;o).

0 Kudos
Message 25 of 33
(1,050 Views)

One observation is the "H" 

 

This is my thoughts on the problem.

 

That H (HOLDS) the second input/number while the motor finishes the first. Without that, the second number (and the following) jump in and send the motor to the new number.

 

I feel, and it looks like this is happening. As all the numbers load, the motor moves to them, "BIG BUT" But I think the numbers pour in faster than the motor moves, thus creating the fragmented moves. The last (Go to Zero) works because nothing else gets loaded.

 

Here is the video again: https://www.youtube.com/watch?v=irhrKMQJdzw&feature=youtu.be

 

0 Kudos
Message 26 of 33
(1,048 Views)

I'm trying to get this to work in LabView:

 

screenshot_2002.jpg

 

screenshot_2003.jpg

0 Kudos
Message 27 of 33
(1,046 Views)

It has been recommended that I look into the Slew command of the motor. I did experiments and got very smooth results. I am currently working on a VI that allows the motor to match the Slew to the .CSV file. 

 

If anyone has ever done this please help.

0 Kudos
Message 28 of 33
(1,027 Views)

I asked some "big picture" questions before but didn't fully understand your answer.  

1. How many motors will you eventually be controlling?

2. Will you need them coordinated to move in sync with one another?

3. What about camera control?  Do you also need to sync frame grabs with specific waypoints within your trajectory? 

 

A brief scan of the motor doc suggests that only trapezoidal velocity profiles are supported.  You won't be able to fully match the arbitrary trajectories generated in your modeling software.

 

It seems kinda unlikely that you'll be able to track a desired trajectory very closely using "immediate mode" to communicate with the controller, whether you're doing positional moves or slewing at a fixed speed.  Just warning you so you can set your expectations realistically.

 

There's a programmed motion mode available that may help some, but you'll still be stuck with trapezoidal motion segments.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 29 of 33
(1,024 Views)

You could try doubling the wait time inside your FOR loop as it may be an update/lag issue between the vi-->Controller-->Stepper.  See what your results look like.  If they are worse, you might even have to speed things up.  Perform a few experiments - Design of Experiments (DOE) to determine.  Your communication Baud rate is set at 9600.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 30 of 33
(1,024 Views)