10-05-2009 02:27 PM - edited 10-05-2009 02:31 PM
This is the first in a series of posts highlighting new and overlooked features of MathScript.
On the surface, the MathScript Node looks much the same in 2009 as it did in LabVIEW 8.6. We've still got the svelte blue border and within it the white ocean of possibilities where you enter your script. And as you could since LabVIEW 8.0, you can right-click on the border and place inputs and outputs to connect your MathScript node to the LabVIEW world around it.
But the input and output terminals that you create in LabVIEW 2009 are powerfully different from those that you've grown accustomed to. Let's start with the inputs. In earlier versions, the inputs allowed only a few basic data types: arrays and scalars of Boolean, String, CDB, and DBL (plus Real and Complex Matrix and a few add-on data types provided by the Control Design and Simulation Module). Try to wire in any other numeric data type and you'd get a coercion dot. The 2009 MathScript RT Module has expanded data type support to include all integer and floating point types. Now if you wire arrays or scalars of these types, MathScript will keep them in this format just like LabVIEW does.
Not wanting to be left out, the output terminals on the MathScript Node have a new talent of their own. Previously, you had to manually configure the data type of each output by right-clicking on it. This tedious process was necessary because MathScript had no concept of what data type each variable would be until you ran your VI. In 2009, MathScript is able to determine and adapt the data type of each output automatically, just like most other LabVIEW functions. This is a great time saver when you're developing as it lets you quickly get your data out of MathScript with minimal navigation through fussy menus.
As a bonus if you don't like the data type that MathScript has selected, you still have to option to change it to any type you please by using the "Choose Data Type" right-click menu on the output. LabVIEW will draw a coercion dot on the terminal to indicate that it's converting to your preferred type and it will stop trying to adapt if the type changes in the future (unless you re-enable this feature by selecting "Auto-Select Type" from this same menu).
Stay tuned in the weeks ahead for more tasty MathScript Nuggets!
jattas
LabVIEW MathScript R&D
10-08-2009 08:05 AM
10-08-2009 11:16 AM
Hi Randall,
Excellent question. Support for higher dimensional arrays is on our roadmap, but unfortunately not planned for the immediate future (2010). To help guide our develpment, would you use all higher dimensions, or would 3D arrays be sufficient for your use cases?
In the meantime, the best workaround I can offer is to write your MathScript code to operate on 2D arrays and put it inside LabVIEW for loops to index the higher dimensions. It's not ideal, but you can probably still accomplish what you'd like.
Thanks,
jattas
10-09-2009 02:17 PM - edited 10-09-2009 02:20 PM
jattas wrote:This is the first in a series of posts highlighting new and overlooked features of MathScript.
.
.
.
Stay tuned in the weeks ahead for more tasty MathScript Nuggets!
jattas
LabVIEW MathScript R&D
Message Edited by jattas on 10-05-2009 02:31 PM
jattas,
This is the first in a series of responses to a series of MathScript Nugget posts.
Jattas, many of us in the LabVIEW community acquired MathScript as part of one the NI Developer Suites. It was part of the core package. When we received our LabVIEW upgrades, we were shocked and horrified that National Instruments had confiscated our ownership of MathScript. Even thought we were, and are still now, on current SSP, we were not given the the Upgrade to LabVIEW 2009 MathScript RT.
Paying for the SSP means that you get shipped each quarter the DVDs containing the updates and upgrades. The most recent shipment in early August 2009, at the time of NI Week, came with all the upgrades to LabVIEW 2009. This was a big upgrade with many new happy features.
However, MathScript was taken away from us, and we were told that we need to purchase it again.
MathScript IS something that we OWN, and is something that you simply can not take back.
This just can not stand.
We own MathScript. We are on current SSP. This entitles us to the upgrade. We have paid for it.
This is what "The Promiss" is all about for the SSP. We pay for the upgrades, and then you let us have them when the come out.
I just can't not figure out why you are not including the upgrade to the 2009 MathScript.
To add insult to injury, you have confiscated our old 8.x MathScript.
This is absolutely abominable.
Horrific.
Shocking.
What a nightmare for those upgrading to LabVIEW 2009 with developed programs that use the MathScript.
They just won't go now more.
Tell me jattas, what will you be taking away next that we have paid for?
Shame on you National Instruments. You broke The Promiss.
You need to do the right thing NI.
You need fix this.
jattas, what is the point of these Nuggets if we purchase MathScript, and then you take it away again?
jattas, how can you in your right mind invite everybody to a MathScript Nugget party, when there is no MathScript to be had?
jattas, Even though we purchaced 10 copies of MathScript as part of NI Dev Suite, all still on current SSP, and watched horifically as you have taken it away, and were to purchase MathScript RT 2009 again, then would you take it back again when LabVIEW 2010 comes out?
Kevin.
10-14-2009 11:39 AM - edited 10-14-2009 11:42 AM
3D would be enough. I already do use a for loop to read in 2D segments of the overall array, but in some cases, it isn't feasible.
kmcdevitt, give your NI rep a call and see what they can do to fix this situation you are in. You will find them very cooperative. Now back to the real topic of conversation.
10-14-2009 01:58 PM
rpursley8 wrote:3D would be enough. I already do use a for loop to read in 2D segments of the overall array, but in some cases, it isn't feasible.
kmcdevitt, give your NI rep a call and see what they can do to fix this situation you are in. You will find them very cooperative. Now back to the real topic of conversation.
10-14-2009 02:33 PM
I also have a volume license of LabVIEW. When I installed the new version, I also saw that Mathscript was missing in previous versions of LabVIEW. I contacted NI, they gave me licenses of Mathscript for my copies of LabVIEW free for the very reason you are talking about. I installed it off the disks I was provided, activated it. Once again, I have Mathscript available for the current version of LabVIEW and all previous versions I still need to support earlier developed applications.
You might have an arguement about whether Mathscript should be a separate toolkit, but NI did not cut me off from previous support. I guess I have about a year to decide whether or not I need to add Mathscript to my set of tools.