LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using the Mathcad Interface, my worksheet won't recognize the data as numbers

While using the Mathcad Interface Library, I've written a 2D Matrix, but although the Mathcad Worksheet does display the data, it won't recognize it as numbers, hence I can't do any operations with it. However, if I declare the very same matrix in mathcad, my worksheet works fine. What can I do?
0 Kudos
Message 1 of 5
(3,127 Views)

Sometimes MathCAD casts an input as a string for no apparent reason.  When you display the data, are the numbers surrounded by quotes?

You could try using the str2num() function in MathCAD to convert it, if this is the case.

 

Can you give me some more information on the Mathcad interface library??  I'm actually working on porting my MathCAD worksheets to Labview...

0 Kudos
Message 2 of 5
(3,118 Views)

Hi, thanks for the advice. Sadly, my problem is not about Mathcad displaying data as strings. I've tested other worksheets, and some work OK with the LabView program, and some don't. Can't say why.

I've just began using the library though. It enables you to write, read, open and close a Mathcad Worksheet. You are able to write and read a number or a matrix. It also has OLE should you need it. So far, those are the options I've been studying. If you need more details, once you've downloaded the free library there are some example VIs that you may find helpful.

0 Kudos
Message 3 of 5
(3,112 Views)

Hi ali84, did you tried using the examples that are in the library? Do you get the same error? Could you post your code to see how you are sending the data?

If manually defining the worksheet as numbers will make your program work, you could use directly the VIs for Active X and change the properties directly

http://zone.ni.com/devzone/cda/tut/p/id/2983

Best Regards

 

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 4 of 5
(3,058 Views)
Hi, I've solved the problem by sending each of the datum as numbers instead of the whole array. It still has problems recognizing a zero value though.
 
Thanks for your help.
0 Kudos
Message 5 of 5
(3,016 Views)