LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining Two VIs

Joe,
 
I will try to send those VIs again, but as you said, let me try again and if I get any more problems, will holler you. thank you.
 
Nishant
0 Kudos
Message 11 of 19
(1,800 Views)

just copy the code from the one and paste it side by sdie with the other, you can run parallel while loops.

MJBhrem,

I guess this will not work since from what Nishant describes, he has a a single PCI 4452 and that device cannot have two seperate Acquisition loops running simultaneously

Will get  a 'device reserved' error, if you do so

0 Kudos
Message 12 of 19
(1,762 Views)

Dev,

I just have one PCI--4452 DAQ board, want to run two different VIs simultaneously. How to correct the error, is there any way? would you plz eloborate on this.. thank you.

Nishant

0 Kudos
Message 13 of 19
(1,743 Views)

It's all pretty simple. In both of your VIs, do you see the AI Config function? This is where the channels are specified and they are configured. The channel list is an array and so is the 'input limits' and 'coupling & input config' inputs. The sound and vibration VI is creating this information with the svx_Get DAQ Info function. Presumably, this will create the channel information for just the s&v channel you are using. To add the voltage channel, just append this information to the arrays created by svx_Get DAQ Info. So, if right now, svx_Get DAQ Info returns a channel array with channel 0 in it, you would append your voltage channel (i.e. 1) to this and have a new channel array with element 0 = 0 and element 1 = 1. Do the same thing with the limits and coupling arrays.

DAQ from NI has always supported multiple channel acquisition. You can have an array of channels or a single element can define multiple channels (i.e. 0:4). When you use a single channel per array element, then you can define a separate limit and coupling for each channle.

If you were to save the Cont Acquistion VI with your default setup, then I could post an example. All you have to do is go to Operate>Make Current Values Default.

0 Kudos
Message 14 of 19
(1,735 Views)
Dennis,
 
I appreciate if you can post an example, thank you.
 
Nishant
0 Kudos
Message 15 of 19
(1,728 Views)
Well, I was hoping you would do what I asked so that the example could reflect what you are actually doing but here's something that should be close. I made the modification to add the additional channel information and the voltage graph is just the second element out of the AI Read. If you want both waveforms on the same graph, you can do that as well.
0 Kudos
Message 16 of 19
(1,725 Views)
Well, I was hoping you would do what I asked so that the example could reflect what you are actually doing but here's something that should be close. I made the modification to add the additional channel information and the voltage graph is just the second element out of the AI Read. If you want both waveforms on the same graph, you can do that as well.
 
Dennis,
 
Thanx for the reply, I will try that VI. I would love to have both waveforms on the same graph. Would you plz explain how to do that, I appreciate your efforts.
 
Nishant
0 Kudos
Message 17 of 19
(1,716 Views)
Making a graph display multiple waveforms is all explained in the help files and shipping examples but to put is imply, you wire a 2D array of your waveforms to the graph. I have no idea what waveform data type is created by the s&v functions so you will have to do this yourself. Either change the datatype of the voltage waveform to match the s&v waveform or vice versa. Both appear to be similar. You have the Get Waveform Components and Build Waveform functions on the Waveform palette that you can use to go from one to another datatype.
0 Kudos
Message 18 of 19
(1,713 Views)

Dennis,

I used the VI, you sent me, and it worked well. I got the results what i was looking for. I think, number of samples for two VIs is different, I still have to work on that. I haven't dont anything to get the graph, once I get it I will let you know. Thanks for the VI.

Nishant

0 Kudos
Message 19 of 19
(1,704 Views)