Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a PCI-6534 card, how does one write and read from the board simultaneously after being triggered on the StartTrig input ?

I've copied two NI-developed VI's into a single VI. The first VI is the LV 'Buffered Pattern Input-Trig VI' under examples/daq/digital/653x. Using an external data generator, I send it a pulse on StartTrig, a clock on REQ1 and data on DIOA0. The start pulse is negative going so I set the front panel input to trigger on "falling edge" with clock set to 'external'. This VI is configured as Port 0 and Group 0. Once this VI is triggered I need to then start another VI which is simply the Buffered Pattern Output VI that also ships with LV. This VI is configured on Port 2, Group 1. This VI is used to simply send out a previously d
efined array of data on DIO C0, C1 and C2.

So, I receive a Start Trig, then clock in data, and then immediatly want to send out data. My problem is that I can't figure out when my receiving VI gets triggered on the StartTrig input. If I know when the trigger occurs, then I can wire this condition to a case statement and activate the second, or write VI. Without having the Trigger condition be met to enable the output VI, the problem is that it always outputs without even be triggered. So, where or how do I tap to find out when the StartTrig happens ? In other words, how do I know when the receiving VI has received a StartTrig pulse. There's got to be a way to do this, and I need to run in continious mode, so I can keep receiving and sending out data over and over again. Any ideas ? If your answer is to look at the examples, please tell me exact and specific examples, because I have not been able to find any examples directly related to my goal. thanks.

Kirk
0 Kudos
Message 1 of 4
(3,604 Views)
Kirk,

You are using the "Buffered Pattern Input -Trig.vi" and configuring it to be in Group 0, so you use StartTrig (ACK1) as your trigger signal. So a simple way to accomplish your operation is that you use the "Buffered Pattern Output - Trig.vi" instead of the "not Trig" example and set this one to be in Group 1 so you'll use ACK2 as your start trigger, so if you hard wire (connect) ACK1 with ACK2 then you have synchronized the trigger of Group 0 (input)with the trigger of Group 1 (output).
Another workaround a little more complex is routing signals, the example (found in the same directory of these ones) named "Multi Board Synchronization.vi" shows a form of routing signals to the RTSI bus for multiple board synchronization, take a look to that example and you'll see t
hat in your particular case you can route the StartTrig (ACK1) signal to one RTSI line (i.e. line 0) and then in the second row (if you see the example you'll know what I'm talking about) you route the signal from the RTSI line to the StartTrig (ACK2) which corresponds to your second group, so this example is used for synchronizing two boards, but in your case you can set it up to be for the same board.
For the I/O connector diagram of your board refer to your manual or follow the path: ni.com > Technical Documents > Product Manuals > Search the Product Manuals Library > ... then type "6534"... and press GO, the result is the User Manual for your board and in page C-2 there is the pin diagram.

Good luck!...

Nestor Sanchez
Applications Engineer
National Instruments
Nestor
0 Kudos
Message 2 of 4
(3,604 Views)
Nestor-
I tried your first suggestion of connecting ACK1 to ACK2. But, I get Error 10010 at Digital Buffer Control when I run the VI. I've added an array of 32 ones and zeros to the output VI so that I have some data to write. What's really interesting is when I have a scope probe on ACK1 and ACK2 which are now common, the voltage level is less than 5 volts, around 4.7, but there is something wrong with the signal, a few spikes, I've seen this before, like 2 signals are trying to drive the same output or something. When I remove the connection between ACK1 and ACK2 the signal looks perfect since ACK1 is being driven by my data generator. This leads me to believe that you can't connect ACK1 to ACK2, or atleast you can't do it with the way I have the VI'
s configured. Also, I have a scope probe monitoring DIOC0 (since I'm writing to Port 2,which is Port C) and I don't see any data coming out, which makes sense since I get the error mentioned above.

In terms of my configuration, I have 2 VI's on the block diagram. I have Buffered Pattern Input-Trig.VI with the following settings:
Group: 0
Device: 1
Port List: 0
Buffer Size: 1000
Clk Soruce: External
Trigger Type: Start Trigger
Trigger Condition: Trigger off Falling Edge
# of pretrigger points: 0

For the 'writing VI' I copied the Buffered Pattern output-Trig.VI with the following setup:
Device: 1
Group: 1
Port List: 2
#of updates: 1000
Clock Source: Internal
Trigger Condition: Trigger on falling edge

So, do you have any ideas on what might be wrong ? Just realized that I can attach files, so my VI is attached.
thanks.
Kirk
0 Kudos
Message 3 of 4
(3,604 Views)
Hello-
It's been a few weeks since I posted this question, I still have the problem, does anyone have a solution ? This has got to be a fundamental use of a DAQ card, right ?
thanks
0 Kudos
Message 4 of 4
(3,604 Views)