LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Channels with Single Digital Edge Trigger

Solved!
Go to solution

Okay, I waited 100 seconds. I did get an error...200284.

 

I don't think the start trigger as it works with 1 channel.

 

Perhaps it is the sample rate or samples to read.

0 Kudos
Message 11 of 18
(1,946 Views)

The digital trigger is a 30 us, 4V pulse. I am connected to PFI0 and COM.

 

The digital trigger does work with 1 channel. It is when the second is added the vi does not work.

0 Kudos
Message 12 of 18
(1,944 Views)

In your VI, you have an analog input and a trigger.  What second channel are you referring too?  Is there something else going on that is not accounted for in the code you sent?

m

0 Kudos
Message 13 of 18
(1,917 Views)
Yes, two analog inputs with different physical addresses. One on ai0 and the other ai1. When I say channel I am refering to the analog inputs.
0 Kudos
Message 14 of 18
(1,913 Views)
So, this works for one but not two?  How are you entering the physical address?  They should both be working off the same task, so you can set the physical address to cDAQ1Mod1/ai0:1.  Is this what you are doing?  Or are you trying to add another task?  If the latter, you can not do this.  Can I see the code you are now trying to run?  m
Message 15 of 18
(1,898 Views)
Solution
Accepted by topic author MgDAQ

Yes, this does work with one but not two. That is because when I added the second input my trigger board stopped working.  Which is weird because the highlight execution appeard to have the program enter the while loop.

 

Anyway, it was my trigger circuit which broke between testing only one input and adding the second. I caught on when I backtracked to the beginning retracing my steps over realizing the program with only one input was also not working now. Keep in mind, this is after verifying everything before I added the second input. So I got a back up trigger circuit and volia! This also explains error 200284.

 

Thank you for your help.  The code provided works correctly, and I did not need to time out the DAQmx Read. 

0 Kudos
Message 16 of 18
(1,887 Views)

Hello,

 

I am working on a similar issue where I need to collect data from two channels: Dev1/ai0 and Dev1/ai1. In your original VI,  Analog Input with Digital VI trigger, you have two DAQmx create channel icons, one for channel 0 and one for channel 1. From what I understand, did you fix the problem by eliminating one of the start tasks? Would you be willing to post or send me the VI that was edited and works properly to collect data from both channels simultaneously?

 

Thanks very much,

0 Kudos
Message 17 of 18
(1,340 Views)

Given this thread is 3 years old - here is what I can remember:

The problem was a hardware issue on my end. While developing I added a second input. During the time between the first input testing and the second input added - a hardware failure occurred on the trigger circuit. I got a replacement trigger circuit and everything worked properly. Therefore the vi provided should work properly. 

 

If your situation is the same, retest your trigger input independently. 

0 Kudos
Message 18 of 18
(1,336 Views)