08-14-2005 10:23 PM
08-15-2005 06:09 AM
08-15-2005 07:23 AM
On the signal manipulation pallette there is a function called to DDT use this and set it to the type of data you want. then all you have to do is right click on the input of the, ToDDT vi and create a control this will be your input.
Hope this helps
08-15-2005 09:19 AM
08-15-2005 09:38 AM
Joe, I must confess my ignorance about this. I thought "Spiderman" wanted a DDT terminal (the dark blue one), but your method gives a standard control. Why is that good for him? I assume it's because the DDT knows to automatically convert (as I've seen).
In that case, what's the point of the DDT? What is it good for? The manual says that it holds some additional data, but it also says that it is used mainly with express VIs, which I believe are not used by most serious programmers. So what's the point of the DDT (not that I really care, since I don't do anything in this area)? Is it worth anything?
08-15-2005 10:03 AM
Hi tst,
Actually what I wanted to do is for my subVI to be able to "accept" a signal coming out from a DAQmx. Before Joe's pointer, I wasn't able to add an appropriate terminal that will accept DAQmx signal which is DDT because I was limited to only numeric or boolean input only (whith my limited LabVIEW knowledge).
08-15-2005 12:28 PM
I am really surprised that this worked for you, It was just a shot that hit I guess. I do not understand really why you even need the to dynamic data terminal anyway. I am very curious. what function in Daqmx are you using. Are you using the Daq assistant. Post a snap shot of your code.
Hey tst how can we find out what type of information is added to dynamic data. It is probably timing info, name, sampling info. Not sure though.
Anyone know what the true benefit is if it is a benefit at all.
08-15-2005 03:10 PM
08-15-2005 04:27 PM
Here is one of the coolest things about LV, and one of its major advantages over languages like VB - it has automatic memory management and it compiles whenever you make a change. This allows you to be very free in the way you handle data and change your code. In this case, you should note the small gray dot that appears when you wire the dynamic data into the Array of Waveforms input. This gray dot means that LV coerces the source data type (DDT, in this case) to the target data type (Array of waveforms). If it wouldn't match, you would get a broken wire, the VI couldn't run, and if you hover over the wire or press the broken run button you would get an exact description of the error. Cool, eh?
This can also be seen in other things. For example, you can change an array's data type or number of dimensions by simply doing it. This will automatically be reflected anywhere the array is called in the program, and if anything won't match, the VI will be broken. If you change the # of dimensions of an array, any array function which that array is wired to will adapt. This allows you to be very safe in the way you write code, because you have LV watching all that annoying stuff for you. You don't have to worry about misspelling a variable here (for the most part).
One important point about coercion - it does take processor power. This will usually only be evident in large arrays or loops, but it is an important point. Another thing is that coercing numeric types can cause you to lose data - coercing a DBL to a U16, for example, will cause you to lose all the fractional data.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).