01-24-2011 02:34 PM
I am measuring force values with my DAQ card and these values are always changing. However, in my programming something is not working right with the way I have things set up. After my DAQ I have a "Convert to Dynamic Data" and after that I have an "Index Array". When the program is executing and I turn on the highlight option I do not get changing force values after the "Convert to Dynamic Data" and therefore no changing force values enter my "Index Array". Whaterever the first value is that gets passed to the "Convert to Dynamic Data" is the only value that I get for the remainder of the program. I tried plugging in an indicator between the DAQ and the "Convert to Dynamic Data" and it did show varying values. Please help with my program. I have tried messing with the properties of the "Convert to Dynamic Data" and nothing has worked. I am stuck and cannot see how to fix this problem. I have attached my program as it is currently put together.
Thank You In Advance,
Gabe.
01-25-2011 11:13 AM
Hi Gabe,
You will want to convert to a 1-D Array of Scalars (Automatic) before you index the array. However, looking at your VI, you have it configured to read one value every one second. So you are just pulling off one single value. For this reason, you should just convert to a single scalar, and remove the index array function for it is redundant.
You might try to handle your errors by unbundling the status of your error cluster from the DAQ assistant and passing that to an OR function with with your stop control and wire the result to the conditional terminal.
Further, I am assuming hte value that is not changing is your Force value, correct?
Best,
01-26-2011 12:07 PM - edited 01-26-2011 12:10 PM
Thank you for the reply
Yes, you are correct that the force value is not changing and is there any possibility that you might be able to submit the program with the changes because I am much more of a visual learner or just send pictures of the components that need to be changed and where to go to make the changes. In addition I want to collect two data every one second I am just not familiar enough with the DAQ to know how to set that up.
01-27-2011 02:59 PM
Please know that the best option is to review the concepts discussed to further understand programming in LabVIEW. Perhaps you could take a look through ni.com/gettingstarted and ni.com/lv101 to have a look at some of the online help materials. I have included a VI snippet of the while loop containing the changes. Further, the code you attached contains a lot of customer controls and VIs, which are not common to all LabVIEW users. It is a best practice to only attach the code of value to the question/post, and to have the most simplified version of the problem.
Best,
01-27-2011 07:36 PM
Thank you for your help and I absolutely will study the program you sent so that I might bettter understand how the fix works. I will also make sure to visit the links that you posted to better acquaint myself with Lab View. Once again thank you for your time and expertise.
Sincerely,
Gabe Johnson