LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript error in an out clusters

It appears that Mathscript Nodes do not execute if there is an error at their error in cluster. This seams to be what I would expect to happen. The error in then feeds to the error out cluster. Again this seems to be what one would expect to happen.

However, I was curious if one has access to reading the error in cluster and/or writing the error out cluster within the Mathscript Node?

Kevin
0 Kudos
Message 1 of 4
(2,739 Views)

Hi Kevin,

 

While you cannot read the elements within the error cluster directly in the Mathscript Node, I have a couple comments that will likely help.

 

First, check out the link below, specifically sections 5 “Debugging Your Code Within the MathScript Node” and 6 “What Does This Yellow “Exclamation Point Mean?”  This describes the functionality of the error cluster you wire into the error input.

 

http://www.ni.com/white-paper/3256/

 

Second, I think your best bet, if you would like to actually use the information contained in the error cluster, is to simply unbundle the error cluster and pass the individual items into the Mathscript Node.  The error cluster contains a status (Boolean), code (integer), and source (string).  Use the Unbundle function to extract one or more of these and pass them into the Mathscript node individually.

 

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/unbundle/

 

http://digital.ni.com/public.nsf/allkb/BF72229C53F7633386256EDD0069331B?OpenDocument

 

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,710 Views)

 


@Ryan-C wrote:

 

   ..."you cannot read the elements within the error cluster directly in the Mathscript Node"...

 


Thanks Ryan,

 

I could not find a way to do it either, however, I was currious if anybody new of a way to access the ErrorIn and/or the ErrorOut Clusters of the Mathscript Node from within the node itself.

 

Your other comments, do not relate to the the posted topic.

 

Kevin.

 

 

PS.  Sorry, my original post should have bee titled "Mathscript error in and out clusters"

 

 

0 Kudos
Message 3 of 4
(2,704 Views)

While it isn't possible to directly access the error in/out terminals on a MathScript node, you can connect an error cluster to manually created terminals on the node, then you can access the cluster elements from inside the node:

mathscript_error.png

Message 4 of 4
(2,675 Views)