02-17-2011 01:13 AM
I am using PMD-1208LS to obtain 2 inputs through 2 different channels, using AInScFg.vi
How ever, the values obtained in in 1D array [of numeric(single 32-bit real)].
After applying several equations to the array it still 1D array but [of numeric(double 64-bit real)], now I want to send it to output channel using From Eng.vi --> Aout.vi.
The problem is, that can on happened if my data is in the scalar data type [data of sink is unsigned word (16bit)] not array type?
So how can I convert 1D array to scalar (word)?
Thank you
Solved! Go to Solution.
02-17-2011 01:18 AM
Index Array??????....
02-17-2011 01:21 AM
thank you for the fast replay,
using an index array will let me return only one element of the array ?
what about if i have 1D array, size:1200
is index array will return all the 1200 elements if i left the index undefined?
02-17-2011 01:26 AM
Oh.. You mentioned 2 inputs from two channels.
Anyway my fault. You can use for loop...You can send one element at a time..and for loop will run for number= Array size
02-17-2011 01:46 AM
In this case problem solved,
however I thought there was a single block that can do the mission faster instead of using a while loop 😉
Thanks a lot for your effort.
02-17-2011 07:31 AM
02-17-2011 08:32 AM - edited 02-17-2011 08:36 AM
What is happening here is that I am taking 1200 samples per sec from 2 channels which means 600 per each channel in a while loop for 20m sec.
Those 1200 sample are obtained using PMD1208-LS as a 1D array (contains the 1200), so I had to split that array into two array 1D each (600 samples each).
Then I did my calculations and when I am wiring the final output 1D array (size of 600) to the "From Eng" then to "Aout" to give it to my real system using PMD1208-LS.
Its keep telling me wrong wired terminal as their type doesn't match as the type of the source is 1D array of unsigned word 16-bit int. , and the type of the sink is unsigned word 16-bit.
So the problem is how can I extract the elements from the array and feed it to the "from Eng" one by one as if it is continuous.
Any suggestions ?
02-17-2011 09:18 AM
You can do it the way I suggested or Gaurav's method. Up to you.
05-24-2013 05:58 AM
I am attaching my labview code. I want to convert 1D array of data into scalar values. I tried using index but the output value was not the same as input. I want to give this scalar value to a meter.
Please help
02-19-2023 03:03 PM
I have attached a file that converts all the data in an array to scalar. understanding this file would enable you to use the concept in your project.
Kedar G M
gmkedar24@icloud.com
Mtech Student, IITK