12-19-2005 03:26 PM
12-19-2005 03:37 PM
12-19-2005 03:41 PM - edited 12-19-2005 03:41 PM

Message Edited by altenbach on 12-19-2005 01:42 PM
12-20-2005 10:11 AM
Hello,
Thanks everyone for your suggestions. They are very useful.
I am having problems with an error that has motivated my subvi from an array to a cluster.
This is the error:
"Argument error; the number of columns does not equal the number of parameters."
What does this mean? I looked argument and parameters up in the dictionary, and I believed I fixed the issue but it tells me I still have the above problem.
Thanks again for your input.
12-20-2005 10:31 AM
12-20-2005 12:25 PM
Hello,
I have attached in Word, the error I am getting in the code.
I have also attached the subvi slope-yintercept.vi and the calibration in notepad that I am getting my slope/intercept.
Thanks for your input.
12-20-2005 03:30 PM
Hello!
From the attached documents it is unclear to me what your program is doing (or
how the database operations are/are not related to the first question), but I
believe that the problem is the number of parameters you are passing to the
database function. This error is a runtime error meaning that you
(probably) have everything wired correctly, and are just passing an incorrect
number of arguments to the VI.
From the help of the Database Insert VI:
"The insert is performed on the columns in the columns array, or if the
columns array is empty, all columns in table are used. The data input can
either be a single element or a cluster with each cluster element corresponding
to a column in the table. The order of the elements in the cluster determines
which column each element is inserted into. Thus, the number of items in the
cluster must equal the number of elements in the columns array, or if the columns
array is empty, the number of items in the cluster must equal the number of
columns in the table. In the case where data is a single element, the columns
array must have one element, or there must be one column in the table. If
create table? is set to TRUE, the VI attempt to create the table if it does not
already exist."
I would start with this and make sure that everything matches up.
Hope this helps,
12-21-2005 08:34 AM
Hello,
I believe your observation is correct. I have one idea for a solution and it is this:
For my slopeintercept.vi (found in first comment above), I believe I have to divide my data in notepad in 2D array or 1D array from my existing data in calibration which is 3D. This I believe would solve the parameter/argument problem.
Do you have any suggestions on how I can do this?
Thanks.
My data in notepad is enclosed to show you what my I mean by 3D.
12-21-2005 04:07 PM
Hello!
I do not exactly know what you need to do with the data, but if you are asking
about reading the information from the text file for use in LabVIEW, this can
be done quite simply (on smaller files like this) with the read characters from
file, then read from spreadsheet string. Once you have the file of data
represented as a 2-D array of numbers it’s just up to you to extract the
information you are interested in for storage. If the VI expects a
cluster with 3 numbers, you can create a cluster with three elements from the
items in the data array. The attached example reads your text file and
stores the numbers in a 2-D array of double-precision numbers. From that
point -- for demonstration purposes -- this VI converts each row in the array
into a cluster of 5 numbers.
Hopefully this helps!