09-04-2013 01:16 AM - edited 09-04-2013 01:16 AM
You should read the file as 1D (e.g. as shown in the picture) and you should NOT autoindex on this array at the FOR loop boundary.
(currently you get an array with 1 element at each iteration, just probe it!)
I can't comment on the rest of the code for now.
09-04-2013 01:31 AM
The problem is i 'am' not getting any values. even if i got one value at a time i could have changed the code. earlier i entered all the coefficients manually as you can see in the code. But this time the polynomial is of of the order of 35 and to enter 36 coeffieients would be a hassel. So i wanted to get these coeffiecients from a file. Could you please help. I am really not getting it.
09-04-2013 02:39 AM
If I use your code unaltered, I get values in the 2D array. Are you saying you get an empty array instead?
09-04-2013 02:50 AM
Yes, i am getting an empty array.
But when i change the instance to main application the code works gives the array but nothing on the real time side. It gives the error as shown in the pic if i press continue for all the errors the code array code runs and give me the the values but then the real time part is useless.
I somehow have to feed all the elements of array array into the polynomial evaluation in the loop.
Thanks
09-04-2013 08:24 AM
That error has nothing to do with reading this file. It is a DAQmx configuration error. If you are propagating your error cluster, then you will not read the file due to the previous error.
And I am noticing your keep saying "real time". Are you using a cRIO or an actual LabVIEW Real-Time target? If so, your problem is likely that the target cannot get to the file if the file is on your Windows computer. The RT system is a computer in itself. So you need to push the file to the RT system in order for it to read the file.
09-04-2013 12:22 PM
@Sachindian wrote:
Yes, i am getting an empty array
If you are getting an empty array from the read operation on the top left, let's isolate the problem and troubleshoot that part. Delete the for loop and everything after. Now modify the code as shown earlier until you get a 1D array with all coefficients.
09-05-2013 07:59 PM
Thank you for your time on this silly problem. But it is still not solved. As cross rulz suggested i am using cRio (NI PXIe 8108) platform.
I have copied the file into the directory on cRio where i am writing the output data in the main code. I have given the same path but still it is not working.
I have removed the main code and just tried to run the readfrom text from the cRio. Its not giving me anything.
09-05-2013 08:22 PM
Dear Sir,
I am trying to evaluate what is going. I concentrated on the read from txt part of it and removed the main code. What i have found out is:
There are 3 instances which i can chose from
a)when I use Main Application Instance and give the file path on my Computer the code reads the data.
b) when i use Inputoutput.lvproj/Mycomputer adn give the file path on my computer again the code reads the data.
c) Input_output.lvproj/RT PXI Target and give the file path of the Crio as i mentioned in the previous post its not reading the file it shows ERR7 when I highlight the execution.
My main code runs when it is on the Third instance.Hope this helps to evaluate my problem.