03-07-2012 08:08 AM
I am using a NI USB DAQ 6009 for a project. Sensors are attached to the daq and then I am building a program on LabVIEW to look at the sensor information. I am using 4 channels from the daq. When building a program to use two different daq assist the program will not run why?? Is the anyway to have two daq assistances working in one block diagram??
Thank you
03-07-2012 08:12 AM
could you post a screenshot of the vi, or the vi itself please. People will be able to help better if they can see the code
03-07-2012 08:21 AM
@Ails26 wrote:
I am using a NI USB DAQ 6009 for a project. Sensors are attached to the daq and then I am building a program on LabVIEW to look at the sensor information. I am using 4 channels from the daq. When building a program to use two different daq assist the program will not run why?? Is the anyway to have two daq assistances working in one block diagram??
Thank you
You can have more than one assistant running in a loop as long as they address different types of channels. You could have one analog and one digital for example. Or you could read four analog and ten digital and have to analog out. But you can not have two analog input channels and two analong input channels.
03-07-2012 08:24 AM
Here is the code
Thank you
03-07-2012 08:29 AM
I think that's must be the problem them Tim my FSR is coming into a analogue terminal ((ai1)and the accelerometer is coming also into analogue terminals (ai3,ai6,ai7) how can I fix it? Can I just move the fsr to the digital side?
When are there so many channels if u can only select on from each side (analogue and digital)? What would happen if I had 3 sensor linked to the daq?
Thanks TIM
03-07-2012 09:19 AM
03-07-2012 09:31 AM
When you add all of your analog channels into one assistant then you will need to index the array of data that is coming out to get the channel that you want for control and use the other for the graph. This will not be hard. Move all of your controls in the top while loop inside the bottom loop. Add the additional channel to the daq assistant there. Index the array to get the data that you need for each process and you are working.
03-07-2012 09:35 AM
It should look like this when it is done.
03-07-2012 10:31 AM
Thanks Tim
03-07-2012 12:15 PM
By the way if you are going to design code this way you need to add a wait to the loop to keep from over loading your processor(s). Even adding a 10 ms wait would help (unless it takes longer than that for your code to exicute).