01-16-2017 06:24 PM
Lately I am using this plug and play driver to control a oscilloscope but I am not sure I understand how this Read Multiple Waveforms VI works. In my programe I firstly let user configure all channels using Configure Channel VI and then try to read the waveforms from enabled channels using Read Multiple Waveforms. The description for Read Multiple Waveforms says "Initiates an acquisition on all channels that you enabled with the Configure Channel VI." However it doesn't work that way. It seems it only accepts specified channels from the channel input and if you don't input anything the default value is channel 1 and 2. It doesn't matter what you do with Configure Channel VI. Even you specify that the channel is not enabled, as long as that channel is input into the Read Multiple Waveforms, that channel would be automatically enabled. Am I misunderstanding something or I didn't use it correctly.
Solved! Go to Solution.
01-17-2017 12:57 PM
I took a look at those drivers, and I agree that it's a little odd how they are set up. However, you are describing the expected behavior. Have you taken a look at the examples that are shipped with the driver? The Acquire Multiple Waveforms example shows how to set up a multi-channel acquisition. You do have to wire the channels you want selected into both the Configure Channel VI and the Read Multiple Waveforms VI.
01-17-2017 01:27 PM
Thank you! and yes I looked at the examples. They didn't use the "Enable Channel" port in the Configure Channel VI because it seems irrelevent. Whether or not you enable a channel doens't affect how the Read Single/Multiple Waveforms VI works (you still need to wire the channel number into that VI). I want the user to be able to choose channels for reading without changing the code. This would make it harder to add this feature but maybe there is a way.
01-18-2017 05:42 PM
Agreed, I don't think the driver is as modular as it could be. Since the source is available, you could rebuild them to contain a "task" cluster that has the relevant VISA session and a channel list in it. That would be the simplest way to make the code a bit more modular, and would let you add those features.