ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
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.
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.
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?
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.
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?
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.
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?