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: 

Getting Mathscript formula to output audio question sal22

Greetings all
 
I'm trying to use a mathscript formula to produce an audio wave form however all I get back is a blank line.
 
I've attached my vi to show you what happens
 
tia sal2
0 Kudos
Message 1 of 2
(6,531 Views)
Hello,

The second line of your mathscript is actually performing the waveform generation for you.  If you change the output type of b to a 1D array of double, you can wire this directly to the output sound VI.  Choosing to have b output as a string causes MathScript to convert the first element of the array (0, in this case) to a character.  The ASCII character for 0 is a null character.  Consequently, the Formula Waveform VI doesn't have anything to work with.

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
Message 2 of 2
(6,527 Views)