Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a DAQ Card 6533 in externally triggered Pattern Generation Output Mode

Hello

I have a DAQ Card 6533 which I am using to generate an output pattern when triggered from an external source. I am usinf visual c++ and NI-DAQ. I fill an array with suitable values for the pattern, set up the card for externally triggered pattern generation and run the program. All seems to work as expected but all is not as it seems...

Initially I set the PG for external triggering Low, so when the falling edge of my trigger signal appeared I generated a pattern. I configured the card for a timebase of 1uS and a request interval of 10uS and filled my pattern array with 5 zero's (i16 type) and then some data (1,0,512,0,0)

On running the program I saw what I expected on a scope. Follwing the application of a trigger, 100uS after the falling edge I saw data (due I guess to the first 5 zeros in the pattern array. i.e. 5 i16 zero's = 10 8 bits = 100uS)

However, I ideally wanted the pattern of data to be visible immediately after the falling edge (with no zero's) so I removed the zero's and filled the array accordingly (1,0,512,0,0) When I ran the program I got the appropriate triggering, however, the pattern generation output seems to default to high after the data has been output. This wouldn't matter if I was only running the pattern generation once, but I hope to run mutliple outputs combined with some inputsand would like the pattern output port to be at zero before the next trigger occurs. Why does the output from the configured port default to high some 2.6mS after the last bit of pattern data has been output? How do I ensure the output is always zero unless I set it!!

Can anyone help? Assuming of course you can understand my ramblings. I don't know if this is a problem with my code or just my understanding of the programming of the DAQ Card 6533 using NI-DAQ. Basically my triggers appear every 30mS and last for 100uS. I trigger on the falling edge and then generate, through a pattern, 200 10uS pulses on DIOA0, one evry 100uS. This is then repeated for the next trigger, some 4000 times in total. I would prefer the DIOA0 output to drop to zero once the pattern has been output. If I load the pattern array with 5 zero's at the start, then the output from DIOA0 defaults to zero...... but I don't want the zero's straight after the trigger....HELP...
0 Kudos
Message 1 of 3
(3,561 Views)
Hello;

After the pattern output is complete and no other REQ pulse clocks new data out to the port, the last state of all digital lines will be kept. Then, if you had a high state in some lines, those high states will stay till another REQ pulse clocks out new data.

Having that in mind, if you want all your data lines to come back to low after the last valid data, the way to go is to include an extra digital word, composed by zeros, and clock that extra word out after the words of interest. That will make all lines to stay in low till the next pattern to start.

Hope this helps.
Filipe
0 Kudos
Message 2 of 3
(3,561 Views)
Filipe

I am still having problems. The problem I am faced with is as follows. I have externally generated triggers of 100uS duration, repeating every 30mS. I want to trigger a pattern generation output from each one of these triggers. I pass these external triggers into the ACK (StartTrig) pin on my DAQCard 6533. I hope to then trigger my pattern output after each external trigger and wait for the next one to repeat the pattern output. I repeat this for some 4000 external triggers. The pattern output consists of 200 10uS pulses, with a period of 100uS. I achieve this by setting the group up with a timebase of 1uS and a request interval of 10. I then fill a 16 bit array of 1000 elements with the desired output (1,0,0,0,0....repeating throughout) to generate my 10uS pulse at the desired rate. I set the count number in my output using DIG_Block_Out to 2000 so as to output all the array data. Consequently the pattern output should take 20mS. This works fine. The problem occurs at the end of the pattern output before the next external trigger. Some 1 to 2mS after completion of the pattern output the output from the pattern generation group goes high and remains high until the next trigger. Ideally I want this to remain low!! I have tried increasing the elements in my output array, filling them with zero and increasing the count accordingly. This has the affect of reducing the time the output is high before the next external trigger but does not remove it all together. Am I doing something fundamentally wrong? Is there a way to ensure that the lines that show the pattern output default to zero? It is necessary for me to do some processing in the 10mS or so following the pattern output, before the next trigger pulse.

I am not faced with the same problem if I fill the first five elements of my output array with zero's, but this has the affect of shifting my first pulse in the pattern output to some 100uS after the falling edge of the external trigger. HELP.....

I have attached a timing diagram that may help to explain my problem.

Kind regards

Tired and Alone
0 Kudos
Message 3 of 3
(3,561 Views)