Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a multiplexer with digital outputs

Hi again,

I tried using the split signal function and I have 16 different wavefore graphs wired at the output of the split signal function but when I run the vi it only displays the first graph all the time and never steps into any of the other graphs. Can you tell me if I have done anything wrong?

Cheers
0 Kudos
Message 11 of 17
(1,709 Views)

In the example I posted, it takes one channel at a time and placing the split signal inside the loop will do nothing because it would only show the last capture.

I'm not sure if you want to display data as it's being acquired or just wait until all channels have been captured. The picture below shows it both ways. There may be a way to use the signal data type inside the loop instead of the waveform data type but I never use the signal data type because I hardly ever use the Express VIs.

Sorry again for the misunderstanding.

0 Kudos
Message 12 of 17
(1,706 Views)
Thats no problem thanks again for the help i will give both methods a go and see what the results are like.
 Cheers
0 Kudos
Message 13 of 17
(1,703 Views)

Hi again,

So I tried to use the methods you explained and I can get the second method to work thanks for that. would you mind explaining the first method I cant find the array block you have or the two line with the arrows you have inside the loop. Thanks again

0 Kudos
Message 14 of 17
(1,693 Views)
The first example uses a shift register. Just right click on the edge of the for loop ans select Add Shift Register. It also uses the Build Array function.
0 Kudos
Message 15 of 17
(1,688 Views)

That worked a charm thanks again. Do you know of any method to speed up the digital outputs from the DAQ because it takes 16 seconds to scan through the sensors at this rate and if one of those sensors was to change value between this time it is not noticed. Thank again

James

0 Kudos
Message 16 of 17
(1,674 Views)

Part of the 16 seconds is probably due to the analog acquisition. What is your sample rate and number of samples? The higher the number of samples your request, the longer it takes. If the number of samples equals the sample rate, you've got it set to take a measurement every second.

Other than that, you can probably speed things up a by not using the DAQ Assistant for both taks and using the lower level DAQmx functions. There are a large number of shipping examples that show how these functions are used. You also can look at the code inside the DAQ Assistant. Right click on the assistant and select Open Front Panel. This converts the assistant to a regular VI. What you would want in your VI is just the DAQmx Write for the digital and the DAQmx Read for the analog. Everything else like the Create Channels, Start Task, Stop Task, etc, belongs outside the loop because these thing only need to be done once.

Message 17 of 17
(1,667 Views)