06-04-2012 12:25 PM
I have two VIs that do the same thing: they take an 11 channel task for a DAQ device and send the waveform from the DAQ acquire VI and send the waveform to a few select signals express VIs to select the needed signals for charts in a for loop. This works well. So I added in a polymorphic add VI into the waveform wire before the select signals VI and with the waveform input and a waveform constant into the other input. I used a dt of 0 and entered a bunch of constants into the data array, 2 & 1. Upon running the code it did exactly what I thought that it should do. However, the other, duplicate VI, that uses the split signals and merge signals VIs instead of the express VIs were used the send the appropriate signals to the various charts for signal display. Again all went well and the VI worked exactly as expected. However, upon installing a polymorphic multiply VI into the waveform before the split signals VI , and adding in a waveform constant to the other input of the add VI, and entering constants into the data array just as in the first VI, I had a wierd problem! The charts show no plot lines, only one value at the very begininng of the chart! Disabling the multiply VI again shows the charts working as expected! This is totally wierd. The probe tool does show the selected values going into the chart and the amplitutes look OK with and without the multiply VI. Any ideas?
06-04-2012 02:02 PM
The dt of 0 is a flag to me. I'll have to play to see exactly what this would do to a waveform. Other than that, show us some code so we can help debug this thing.
06-05-2012 04:32 PM
Hi hounddog, what is that you are trying to achieve with the multiply function, there may be other ways to make it work?
Eric NI
06-05-2012 04:45 PM
I've included a code capture of the VIs in question: one front panel and two block diagrams. Both of these worked before I installed the polymorphic multiply functions into both of these VIs. The express version worked as expected: however, the split and merge VI version does not work. Before I modified both VIs to add the polymorphic multiply VIs they worked,and the problem occured after modifying them. I can't think of anything that I did wrong.
06-05-2012 04:51 PM
The signal into the DAQ device was beyond the input range so we cut the signals in half. After retrieving the signals I added in a polymorphic multiply function onto the waveform to chang the signal levels back to where they were. I know I could have gone into Max and set up a scale of two to fix up the inputs at half scale to begin with, but I didn't think of that until I added in the multiply function. You can see the other post if you want to see the code.
06-06-2012 03:13 PM
Hi cuthbert, what about using probes in the wires before going to the second "merge signals" do you see the correct data? Or maybe even after the "merge signals". By the way I am sure you noticed it too, but the multiply VI is in the "disabled" selection case, rigth?
Eric NI
06-07-2012 05:29 PM
There are two VIs that do the same thing. The VI with the express select VIs has the multiply enabled because this VI works. If you look at the other VI the enable diagram has a the multiply function in the disabled portion since the VI does not work when this is enabled. And that is the question, why doesn't this VI work when the multiply VI is enabled in this code! The code in both VIs is the same!!
06-08-2012 03:59 PM
Since you are dealing with waveforms, there is an error in and error out terminal on the multiply. Have you checked what the error out is when it doesn't work?