10-31-2013 08:56 AM - edited 10-31-2013 08:56 AM
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.
Solved! Go to Solution.
10-31-2013 08:57 AM
when I say example in the picture i mean an example of what the users input could be.
10-31-2013 09:11 AM
sounds like you need in range coerce
10-31-2013 10:22 PM
That works perfectly but I need a pulse signal coming in how do I go about that?
10-31-2013 11:00 PM
@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?
10-31-2013 11:04 PM
it would be a myRio
10-31-2013 11:42 PM
or compact rio.. But im planning on the MyRio
10-31-2013 11:54 PM
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?
11-01-2013 12:13 AM
somewhat it does.. But it does give a good direction i appreciate the insight. I will research this more
11-01-2013 12:15 AM
Have a look at this link