07-16-2016 04:22 PM
Hello,
I would appreciate any help and or guidence. I am new to labview. I am running labview 2015 on windows 10, an PCIe-6361, and a futek fsh02057 torque and position sensor.i am trying to make a read VI that will read and log torque and its position. I need as much data as i can possibly get. The shaft is running at a constant 1 rpm and i am only rotating it 90 degrees. the futek sensor read every half degree. So I need 180 points with atleast 50 but as many torque values as i can get. My next step is I have to take all of those points and get the average torque value for each position and ouput it to an oriental Nx series servor motor running in tension mode.
Now with that said, I can't get enough readings and I know it has to be the way my VI is set up, but i am at a loss. I have triued to set the daq up manually instead of using the Daq assist, but i cant get it configured correctly. If that is what i have to do I am ok with that but i need help setting it up. I tried to set it up in continous sample instead of single sample, but apparently i need an external clock rate for my counter and I am at a loss for that as well. I have went through a bunch of examples and a lot of posts on here but I am still at a loss.
If anyone can help even point me in the right direction or show me how to set up the Daq or explain what I need to do I would greatly appreciate it. for the record this is not homework I work for a custom machine design and fabrication company that consist of just 2 people. I was given this job and i have only had a few weeks to not only learn labview but to get a working or program up and going. i am using a producer consumer loop for my main program and calling this read VI when the Start Read Test Button is pressed.
Thank you for your time and again any kind of help would be appreciated.
Josh Combs
Sewell Machine Design
Solved! Go to Solution.
07-16-2016 06:21 PM
Sorry, I cannt see how your express VIs are configured because I don't have DAQmx installed.
Some questions:
Have you looked at the shipping examples?
07-16-2016 09:11 PM
My Post is titled FPGA .... I'm not sure didnt see a header when i posted this.
Yes i am opening and closing every iliteration because the only way i could get it to write to my tdms correctly is by appending the file.
i would love to get away from using dynamic data, I know it slows the program down.
Yes i have looked at them and I have had a hard time intergrating the example into a usable VI that works and writes correctly I was told to try shift registers but it was creating new channels on my tdms each loop and considering I need to be able to average out the torque values for each position before I can initialize the next step in my program it wouldnt work.
07-16-2016 10:06 PM - edited 07-16-2016 10:06 PM
See if this does what you want. One of the tricks I did here was set the sample rate of the counter to be the analog input sample clock. So those two readings will always sychronized and you do not need an external clock.
07-16-2016 11:32 PM
Thank you very much. That worked out beautifully and i now see which settings I was incorrectly wiring. again thank you very much.
I do have a question about it though I ran it for roughly 15 seconds and applied torque and got it to 90 degrees the only problem i can for see is it was missing some torque and some position values.
since my next step requires me to average out the torque at all the positions this might be an issue i have to look into that a little more but I do appreciate it very much.
07-17-2016 07:08 AM
A couple of suggestions here:
1. Use a Producer/Consumer architecture. The idea here is to have one loop do the acquisition and then another loop do the logging. This way the logging does not slow down the acquisition.
2. Increase the sample rate. I had it set to 10kS/s. But I somehow doubt this is the problem since you are rotating 90 degrees in 15 seconds, that is 6 degrees/s or 12 angles/s. 10kS/s should definately be able to capture that. So maybe you should actually lower your sample rate to possibly 100S/s.
07-18-2016 02:23 PM
OK so i Put it into a producer consumer loop and I believe I did it correctly please let me know id i didnt and heres what i am getting.
for some reason every now and again it will get a torque measurment but miss a position measurment than on the very next loop miss the torque but get the position.
i decreased my samples down to a hundred and it still did it and raised it to 100k and 1M and all it did was cause it to miss more data. I am wondering if its my hdd but i need to be sure before i go get a 250gb ssd to either run my program on and log data or just log data my cpu wasnt being over taked by the 10k or 100k and my memory seamed to be ok as well.
again ithank you so much for your time and any ideas would be greatly appreciated.
Josh Combs
Sewell Machine
07-18-2016 08:48 PM
I think what might be happening is a very slight race condition. Both DAQmx Reads are set to read all available data. But if one read happens just enough before the other, you could have an extra sample from the second one. So the solution to that one would be to have the DAQmx Read read a specified number of samples. I would start with something like 100 samples. At 10kHz, that would be 10ms worth of data.