11-28-2018 11:02 AM - edited 11-28-2018 11:10 AM
Hello Guys!
I make a friction measure program. It gives the value of the degree the inclane when it is arrives to the first optical sensor. In the second step of the program the first optical sensors high value start the measure of the time and the second optical sensor high value give the elapsed time between this 2 high signal. After that on the 2 next step I'm reading the details. I measure the kinetic and the static friction as well. I have a problem that I want to up the inclnae with a motor between limit switches and with a next motor i want to pull back the thing that i am slip on the inclane. I write a "basic program" the basic program contains the basic measure and the other one which is contain a " motor control" but when i control the motor in a desparete step the program doesnt measure the degree and the elapsed time and dont fill the arrays. Can someone tell me how can I control the motor in the same time and measure my parameters?
11-28-2018 11:22 AM
Hello Guys!
I make a friction measure program. It gives the value of the degree the inclane when it is arrives to the first optical sensor. In the second step of the program the first optical sensors high value start the measure of the time and the second optical sensor high value give the elapsed time between this 2 high signal. After that on the 2 next step I'm reading the details. I measure the kinetic and the static friction as well. I have a problem that I want to up the inclnae with a motor between limit switches and with a next motor i want to pull back the thing that i am slip on the inclane. I write a "basic program" the basic program contains the basic measure and the other one which is contain a " motor control" but when i control the motor in a desparete step the program doesnt measure the degree and the elapsed time and dont fill the arrays. Can someone tell me how can I control the motor in the same time and measure my parameters?
11-28-2018 11:18 PM
Please resave your VI's. I can't open them in LabVIEW and I believe it is because you have non-English characters in the filenames.
11-29-2018 01:27 AM
1- remove the stack sequence that you put
2- reduce the screen size so we can see all the code in one page or scroll only on one direction.
3- use error bus to synchronize your task.
4- do a proper error management.
Benoit
11-29-2018 04:10 AM
Hi Greg,
never use non-English chars in filenames, it's just annoying for other people (using default English Windows installations)!
@RavensFan: just rename the files…
To add to other comments:
- Don't use DAQmx tasks in parallel: why do you need to read "USB6001 D1" in several loops?
- Use proper programming schemes like state machines or producer-consumer!
- Use less local variables! (Example: why are there 3 locals of "Le" in the first frame of that big sequence? None is needed!
- Don't read single points from DAQmx in loops without any timing: this will just burn CPU power!
- Why are there empty frames in the sequence? Why is there a sequence at all?
- Why do you write data to a file, just to read that file and use those data?
- Why do you use some much duplicated code in the last frame?
- Why do you AND with TRUE? Rube-Goldberg!
- Why do you create an array with just one element, just to index that one element? Rube-Goldberg! (We had discussed that already!)
- When you attach code you should also attach all subVIs. ZIP your project folder!
11-29-2018 06:59 AM
Hello guys!
I would like to control a motor between two limit switches with a simple state machine. But it would not want to work for me. Can someone help with some advice? I am make it in LabVIEW 2016.
11-29-2018 07:06 AM - edited 11-29-2018 07:07 AM
11-29-2018 07:26 AM - edited 11-29-2018 07:27 AM
Thank you very much for your help!!!
11-29-2018 07:48 AM
I have a further problem. I have a measurement part of my VI and the motor control and the measure doesnt work at the same time. So I can not measure and control the motor at the same time because I just can measure my parameters but the motor control does not change when it is arrives to the limit switch. How can I solve this problem?
11-29-2018 07:58 AM - edited 11-29-2018 07:58 AM
Hi Greg,
I have a further problem.
Yes: you didn't follow my request not to use non-English chars in your filenames.
You still don't supply subVIs! And you don't use auto-cleanup…
I have a measurement part of my VI and the motor control and the measure doesnt work at the same time.
Again you placed while loops in your state machine.Place your state machine in its own while loop in parallel to your other code parts