Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

digital I/O on 6534 in C++

okay I successfully start triggered from a 32-bit pattern on port0:3.

If it sees that same pattern again, will it start trigger again and start over?  Is there a way to stop trigger on a pattern?

0 Kudos
Message 11 of 17
(1,959 Views)
is there a way to wait infinitely for a start trigger or is it strictly limited to the default of 10 seconds?
0 Kudos
Message 12 of 17
(1,958 Views)
Hi Ryan,
 
To change the timeout you actually change it in your read function DAQmxReadDigitalU32, not the trigger function.  You want to specify a timeout of -1 to wait indefinitely for the read to begin. 
 
When you configure a start trigger, the task will only trigger the first time the pattern is received.  You should look at the function DAQmxCfgDigPatternRefTrig if you want to implement a stop trigger (also known as a reference trigger). 
 
Hope this helps!
Laura
0 Kudos
Message 13 of 17
(1,955 Views)
Hello!

I've been using my PCI-6534 card successfully for about a year now, see above discussion.  I've been taking data streaming from 32 pins into my 6534 using a pattern to start trigger.  I need to modify this system.

I now need to take this same data on only one pin.  ( so that the data will be streaming in on one pin at 32X the current rate ).  Current rate is a maximum of 140 kHz, so now the sample rate will be 32*140kHz =  < 5 MHz.  This should not be a problem correct?  I believe 6534 is capable up to 40MHz?

Also, now instead of using a pattern to start trigger on 32 pins, should I continue to use the CfgDigPatternStartTrig() function (and the pattern will be "1" on one pin), OR should I instead be using the function CfgDigEdgeStartTrig()?  If I use CfgDigEdgeStartTrig(), to start taking data on the rising edge, can I also use this same pin to get the subsequent data, or does it have to be a separate pin?  ( Currently I get 32 pin pattern on the same 32 pins that data comes in after the pattern has started the acquire, does that make sense?)

thanks so much
0 Kudos
Message 14 of 17
(1,820 Views)

Hello Ryan,

I am happy to hear that your application has been working well.

As for your new application, you should continue to use CfgDigPatternStartTrig() because you cannot use the same pin for triggering and acquiring data when using CfgDigEdgeStartTrig.  With the pattern start trigger, you can use the same pin when acquiring from only one line. 

I think that this is the answer to your question, so if not, or if you have additional questions, please let us know!

Regards,
Laura

0 Kudos
Message 15 of 17
(1,799 Views)
OK so with the pattern start trigger, I will use only one pin for the pattern, so in that case I cannot use my current pattern (which is 32 bits long).  In fact there are only two possible patterns that can be used with a one bit pattern, which are "0" or "1"  Correct?
0 Kudos
Message 16 of 17
(1,790 Views)
Hello,
 
That is correct.  If you try to use your original pattern you will get an error that the number of values in the pattern don't match the number of digital lines you specified.
 
Regards,
Laura
0 Kudos
Message 17 of 17
(1,769 Views)