LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in NI example ActiveX to MathCad12

On the NI website you have an example how to interface with Mathcad. (Search on MathCad). In this example you find a VI called "getting started with MathCad.vi". Within this example it shows you how you can read/write variables to/from MathCad from Labview. However when I try to read an Matrix/Array from MathCad I get an error. (Writing a Array works fine, writing/reading a single variable goes fine)

The error is in a sub-vi found under "MathCad_easy_Matrix_Get_1D.vi" -> "Mathcad_Matrix_Get_1D.vi" -> "Mathcad_Matrix_Get_Elmnt.vi". In there there is a "Variant to Data" function that cannot regonize the Variant that comes from the Invoke Node before it. If you look at the variant with a probe you receive Hex data. (f.i "2C85A50" (Always start with 2C8 and always 7 digits))

Questions:
Does anybody have a solution?
Is this the fastest way to send/receive variables from MathCad

Details: Labview version 7.1.1, MathCad version 12.1
Installed Builder and PDA Module

Thank you in advance!

Paul de Waal
0 Kudos
Message 1 of 9
(4,713 Views)
The error is probably related to a change in the ActiveX Interface of MathCad. The VI's where build for MathCad 2001i and not 12. you should be able to find more information on the activex interface in the MathCad Documentation.

As for the fastest way, this depends on the features supported by MathCad, ActiveX is one way of controling extrenal applications. another would be to driectly write files that can beused with MathCad. But for interprocess communication at the moment activex is the most used option.

Met vriendelijke groet / Kind regards,

Karsten
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,690 Views)
Hello, I use MathCad 8.0 and LabView 7.1

I got Examples how to use MathCad in LabView from NI-Site, but I cannot use it, because used ActiveX objects are not available.
Then I tryed to open Mathcad with another ActiveX object from Selection. It names IAuto and the method open. And with success.
But I cannot find more methods to write or read data to/from Mathcad.
Can anybody help me?
0 Kudos
Message 3 of 9
(4,672 Views)
This is a real bugger of a problem indeed... Using the "Variant to Flattened String" vi, I found out that the type descriptor for the variant data coming out of the IMatrixValue.getElement(row, col) method shows a type code of 0x84, which according to the Data Storage Application Note (datastrg.pdf, under manuals directory) is not listed on the table as a valid type!!  I suppose this would explain the 'type mismatch' error.  The Mathcad automation interface does not appear to offer any way to cast or reformat this data either, nor is there any way to really control data types in the Mathcad worksheet itself.  Hmm...
0 Kudos
Message 4 of 9
(4,613 Views)

It's really a pitty!

I was so glad finding those MathCad-VIs and now....

How can you work with MathCad without reading matrices ?

Does anyone know, if there will be an update of those VIs, so they will work with MathCad 12 again ?

Best regards

Fluxgate

0 Kudos
Message 5 of 9
(4,559 Views)
Yeah, I would like an update as well!
 
About getting them to work in labVIEW 8, we asked a question here
0 Kudos
Message 6 of 9
(4,537 Views)
No response yet on our request for support. I found the maker of the the MathCad VI See http://forums.ni.com/ni/board/message?board.id=170&message.id=156177#M156177
 
Please show NI that you need support as well!
 
 
Paul de Waal
0 Kudos
Message 7 of 9
(4,483 Views)
HI
 
I too facing the same problem Mathcad while fetching vales from Matrix ,,....
 
Sending and Recving to a single varibales are working fine ... Only Type Mismatch in Matrix part
 
Any please help in this case
 
Regards
 
Jai
0 Kudos
Message 8 of 9
(4,182 Views)

Hi Jai,

What versions of LabVIEW and MathCAD are you using?  Also what have you already attempted?

Brian K.
0 Kudos
Message 9 of 9
(4,160 Views)