01-13-2015 05:16 PM
Hey all,
I'm doing a simple excercise on producer / consumer loops. In my producer loop I'm aqcuiring audio and in the consumer loop I'm projecting it on a chart
Everything is working as I had in mind, the only thing bothering me is the way that I had to set the element type to the 'Obtain Queue' block in the beginning.
I knew of no better way to get the data type that I was using than just taking another 'Acquire Sound' Express VI and hooking that up. But that can't possibly be the only way to get this done, right?
Note: I know that I might not need to use a producer / consumer design pattern to get this done but I need to get a hold of the technique for some school work so I just came up with this excercise to get a hang of it.
Thanks in advance,
Al.
Solved! Go to Solution.
01-13-2015 06:27 PM
Al,
You just need to feed the correct data type into that input, which you did by getting the output of a second Acquire Sound Express VI.
You can also use the "Convert to Dynamic Data" function to do this. When you drop down the function you will be prompted to give the input type. From the tests I did, it does not seem to matter, but for instance if you chose the input type to be a single scalar you would need to feed a numeric constant (change type to double) into the input and use the dynamic data output as the Queue Element Data Type.
I dislike the dynamic data type because it is not very obvious as to what it is. Something else you could do would be to use the "Convert From Dynamic Data" function to change the output of the Acquire Sound VI to a different data type to more or less avoid the original problem all together.
01-13-2015 07:35 PM
Thanks for the clear answer Matt!
Got rid of the dynamic data type as you said, when I came across it for the first time I found myself wondering aswell what it exactly was.
Looks a bit cleaner now with not some random VI just sitting there.