From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript error: "Output datatype has not been selected"

Hello,

 

I was trying to use the mathscript to make my life much easier but it seems stupid issues are not far around the corner in LabVIEW. I've attached the snippet of the code below. The error is that the output datatype is not recognised. Fair enough! I go and try to set the data type of the output. From all the possible options, none of the categories are 'selectable'. Any suggestions you guys can give would be greatly appreciated.  

image.png

 

0 Kudos
Message 1 of 6
(4,112 Views)

Something odd I see.  Right where your output terminal for kT is, there seems to be another terminal hiding underneath it.

Could it be another kT?

 

If you had attached a VI, we could have played around with the code and possibly helped out more.

0 Kudos
Message 2 of 6
(4,103 Views)

Adding to RavensFan I also see that underneath the top Rm output (middle) there is also another output, and there is even a second Rm third-last in the list.

Normally the behavior is that the first output node get's linked to an existing variable and the second one stays black. Maybe remove all outputs and add them again?

 

Unfortunately your snippet does not come through as a snipped (when dragging it onto my Block Diagram it stays an image, does not converted to code). So I cannot check it. Can you maybe upload a VI containing this piece of code?


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 3 of 6
(4,069 Views)

Thanks for the reply guys. I've found the mistake. It was due to an unrecognisable function (ss2tf) in the block. I initially thought the whole MATLAB control toolbox was supported by mathscript but i was wrong. 

Message 4 of 6
(4,060 Views)

I'm glad you figured it out.  Mathscript is not equal to MatLab.

 

Did you clean up the overlapping output boxes?

0 Kudos
Message 5 of 6
(4,051 Views)

Thank you for reporting back what you found. This might help others. Please don't forget to mark your last reply a solution, as that is what it contains!


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 6 of 6
(3,996 Views)