LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

motor speed implementation

Solved!
Go to solution

My objective is to create code that will change the motor speed based off of user input and conditions. I am confused on how to get the motor input in. I am still new to this labview. I attached a block diagram for this if someone could lead me in the right direction it would greatly appreciated. With a timer for how long for the program to run before updating( I get that part). But I dont understand how to get the comparison to work correctly. When I say comparison I mean comparing the speed the user enters versus the max an min temp. I was reading and I think I would have to loop around the area I looped in the block diagram picture. Any help would be great like I said.

0 Kudos
Message 1 of 10
(3,257 Views)

when I say example in the picture i mean an example of what the users input could be.

0 Kudos
Message 2 of 10
(3,254 Views)

sounds like you need in range coerce

Example_VI_BD.png

0 Kudos
Message 3 of 10
(3,241 Views)

That works perfectly but I need a pulse signal coming in how do I go about that?

0 Kudos
Message 4 of 10
(3,194 Views)

@Gotti_uncc wrote:

That works perfectly but I need a pulse signal coming in how do I go about that?


That depends, what hardware are you using to acquire the signal? PXI, cRIO, cDAQ, USB DAQ, etc?

0 Kudos
Message 5 of 10
(3,189 Views)

it would be a myRio

0 Kudos
Message 6 of 10
(3,187 Views)

or compact rio.. But im planning on the MyRio

0 Kudos
Message 7 of 10
(3,181 Views)

I'm not too familiar with myRio, but if you program it the same way you do a cRIO, you will have to check if a digital line changes, and you need some time interval to count the number of changes over. The way I have done it in the past is check if your DI changes (you can store your DI line value in a shift register and check if the current value is greater than the stored value to indicate a change from false to true). If this change happens, increment a count. Also, keep a timer, say, for 100 ms. When the timer expires, stick the count into a DMA FIFO to the RT, and then let the RT convert pulses/time to whatever units you need it in. Does that make sense?

0 Kudos
Message 8 of 10
(3,179 Views)

somewhat it does.. But it does give a good direction i appreciate the insight. I will research this more

0 Kudos
Message 9 of 10
(3,175 Views)
Solution
Accepted by topic author Gotti_uncc

Have a look at this link

Message 10 of 10
(3,173 Views)