ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

取消
显示结果 
搜索替代 
您的意思是: 

Linear motor: change direction with threshold function

I have a linear motor with an encoder.

I would like to change the direction of a linear motor using the threshold function.

In output I have the counter value and the counter direction.

If the value is >0 and <1.000, it goes in one direction... If the value is <1.000, it goes in the opposite direction.

How can I apply this, using Labview?

 

Thank you.

0 项奖励
1 条消息(共 15 条)
2,527 次查看

@Uniali wrote:

If the value is >0 and <1.000, it goes in one direction... If the value is <1.000, it goes in the opposite direction.

 


It cannot go in both directions if the value is <1.000. Please explain.

0 项奖励
2 条消息(共 15 条)
2,500 次查看

I made a mistake... I should have written:  

 

If the value is >0 and <1.000, it goes in one direction... If the value is >1.000, it goes in the opposite direction.

0 项奖励
3 条消息(共 15 条)
2,463 次查看

It helps to define the problem fully. For example:

 

Where should it go if the value is zero or negative?

If the first value is 0.5, which direction should it go?

If the first value is 1.5, should it reverse direction or travel towards the valid range?

If it overshoots slightly and the value is >1 twice in a row, should it reverse twice (getting stuck at the limit forever)?

 

Could it be you simply want it to reverse whenever it hits one of the limits?

0 项奖励
4 条消息(共 15 条)
2,452 次查看

We don't know the limits yet, but we know that it has to go one way and then the other way really really fast... so we thought to apply the threshold function to it.

 

0 项奖励
5 条消息(共 15 条)
2,435 次查看

@Uniali wrote:

We don't know the limits yet, but we know that it has to go one way and then the other way really really fast... so we thought to apply the threshold function to it.


Sorry, none of this is useful information.

0 项奖励
6 条消息(共 15 条)
2,424 次查看

I have a linear motor connected to an encoder. This motor should go in one direction until the counter value of the encoder reaches a certain value, for example, 1000. Then once it reaches this position, it should reverse direction until for example a value of 500. The motor should do this movement cyclically. I need to apply this motor to a test bench to simulate the heartbeat. How can I do it?

 

0 项奖励
7 条消息(共 15 条)
2,422 次查看

What code have you got so far? 
How are you reading the encoder value?

Once you can read the encoder value, you can apply a T/F state to the direction. 

0 项奖励
8 条消息(共 15 条)
2,417 次查看

luna30_0-1677490182732.png

This is an example of the code, I'm using myRio to read the encoder. 

0 项奖励
9 条消息(共 15 条)
2,413 次查看

I explain you better...

I have a linear motor connected to an encoder, using myrio.

This motor should go in one direction until the counter value of the encoder reaches a certain value, for example, 1000. Then once it reaches this position, it should reverse direction until for example a value of 500. The motor should do this movement cyclically.

I need to apply this motor to a test bench to simulate the heartbeat.

How can I do it?

 

example.jpeg

0 项奖励
10 条消息(共 15 条)
2,404 次查看