LabVIEW Interface for Arduino Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Grow steps value in stepper write function

Hi communauty

Today i have new modification proposition for stepper function in LIFA.

If you have playing with stepper function perhaspe have you see than you can only  define I16 at "# of Steps to Move" in  Stepper write.vi .

That can wil be not enough.in some project (+/-32768 steps) . In my case ( stepper with 100step/turn) it be rapidely consumme and not autorize

long move.

After rapide look to LIFA code, i have see in AccelStepper library than move function can support "long" as parameter value.

For resolve the previous limitation i have modify LIFA for support I32 at "# of Steps to Move" in  Stepper write.vi. And i propose this modification in my BOB_LIFA3 firmare version.

This modification  include 3 new vi's for be use with it.

1) Stepper Write 3.Vi who run steppers with I32 steps to move capability.

2) Stepper to Go 3.Vi who is equivalent to Stepper to Go.vi of library but with I32 at Remaining steps output. (this function return coposite value if you use few steppers at same time).

3) Stepper Remainig steps.Vi who get the remaining steps for one steppers and also return I32 value.

All are in LV9.0

I have also add one test vi to see how that run.

Best regards

Eric Bobillier

Comments
gtone
Member
Member
on

Great job!!!

There is the possibility to know the absolute position of each stepper? Something like current Position() in accelstepper?

Thank you!

Eric_BOB
Member
Member
on

Hi gtone

i think it's possible de work with absolute position with the differents function like current position , set current position, run to position,... but in this case you must rewrite a set of command in the bob_lifa to obtain and set thoses values. It's not very complicate (you can look  my modification (case 0x35:) to have one idéa.

But i think it's more easy to use relative position with my stepper to go 3.vi and make it absolute through a simple set of VI's.

1) Take the actual position as 0 (for exemple) and intialiase one registrer.

2) add or substract steps values to register each times you move stepper

like that you can obtain absolute position refered from your previous 0.

The only case where it's interresting to use absolute(i think), is when you stop steppers during one travel. Because there is incertitude of velalive position you are exactely. It's because like you asynchronusly resquest position, your stepper can have move few steps more between the last position request and the stop.

In the case of use of absolute position , like the move is calculate internaly in Arduino you can obtain surely the real position of your stepper. In the case of asynchronus stop during move, if your read position after stop, you obtain exact position.

I have no time to developp absolute functions, but if you can do it , it will be super.

Eric

gtone
Member
Member
on

Thank you Eric, I'll try...

jesmenpad
Member
Member
on

Hey, great Job, I was trying to do it with the normal Stepper VI with two motors and I was having that problem. Eirc, how do you think this man did this project with two stepper motors? http://www.youtube.com/watch?v=7XXYpBUJFmE

jennny
Member
Member
on

hello,

I've tried it, and I go crazy.

I have 4 wire steppers. EasyDriver is not like you have you tried.

I think that's wrong ....

looking at the data the stepper togo 3. few bytes to and coming from aruino fail, sometimes enter and when not out 0.

I have given him many turns with the timing and configuration.

course was based flash lifa 3.

is more I tried, lifa original lifa base 2, and 3, with their default vi each. all fail, the better he goes is 3, the given values ​​of 16b, except 32, that number fails frac split.

beautifully motors turn his steps. it both ways.


any suggestions.

Eric_BOB
Member
Member
on

Hi Jenny

Sorry but i don't understand  what's wrong. (The motor don't turn like expected? Value return by Stepper remaining step.vi ?, arduino crash ?....)

Can you be more clear about your problem?

Have you test my test stepper Motor exemple.vi without motor and driver connected,

Eric

Zahkay
Member
Member
on

Sir

hello

i need ur help

I have  try your test. i am using 4 ouput of a stepper , i modify it in ur VI of labview

i upload the LIFA.

but still it is not  working sir

Actually i try to do my own  coding using arduino and then my L298 on breadboard where

i press a switch, it goes to a position

but now i am trying to intergrate it in LIFA

and do a VI in the labvie.i am not able

can u please help

iyahyapour
Member
Member
on

Thanks Eric!

That was exactly, what I was looking for!

tsakitsan
Member
Member
on

Hello guys,

I have an issue and I think the updated Bob's version of lifa solves it.

I gave a bipolar stepper motor connected to a puldir driver.

With the original stepper motor example my stepper only rotates counter-clockwise. No matter what I tried (negative number, reversed pins changed stepper number etc.)

With bobs test stepper motor example my motor rotates clockwise... but ONLY clockwise.. I was ready to quit but now I think I have a hope.

I have seen every single thread regarding my issue with no luck. Thanks in advance guys

Contributors