Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read a waveform conditionally after start trigger

Solved!
Go to solution

hello to all,

I need to communicate with PXI-6541 card using three wires.

The Setup is as follow,

The first line is trigger line.I need to wait untill get falling edge.

The second line is active signal line which is output line of card.I need to make this line high after some delay when i get trigger.

The third line is data line, which i need to acquire by reading waveform.

 

The problem is that when when trigger hits, it starts acquiring waveform data, which i need to filter later because valid data is only when active signal line is high.

So i want to get rid of filtering data.

when trigger hits, the data acquisition should wait for active signal to go high.Only after that it should start Acqusition.

thanks in advance..

KAMRAN

SS_Hunter
0 Kudos
Message 1 of 7
(2,609 Views)

Hey KAMIJI,

 

It sounds like you need to use both a Start Trigger and a Pause Trigger. Still use your start trigger just like you are, but add the pause trigger to your code. You can use your "active signal" line as an input into a PFI line for the Pause Trigger, and it looks like you will want to use the digital level. Here is the HSDIO help on the Triggers Summary. The Start Trigger will be set up using Digital Edge, and the Pause will be set up using Digital Level.

 

Now one thing that is confusing to me is that you say the active signal is output line of card, so does this mean that you are doing generation on some other lines that is not your 3rd line for data to be acquired? Or is this line like a handshake line that you need to send to your DUT to tell it to start sending data? If your device is sending out this second signal to the 6541, then see the Pause Trigger info in the first paragraph. But if you are needing the 6541 to output a signal to your dut, you can do this in a couple of ways. One being you could use a data line to generate the signal, and you can run at the highest rate for the generation session, and use the actual data to determine the "time" you output a high to your dut, meaning 0,0,0,0,1,1,1,1,1,1,1 etc. for this "active signal" line from the 6541, and the timing will be based on the generation rate and number of 0's before the 1's. I can give some other ideas for this, but I think if you need this, you will have to verify that the 2nd signal you mentioned is an input into the 6541, or an output from the 6541 to your dut.

 

Hope this helps. Let us know if you have further questions after trying this out and playing around with it to see if it works like you need it to. Thanks, and have a great day.

 

Regards,

DJ L.

0 Kudos
Message 2 of 7
(2,608 Views)

Thanks for reply DJ L.

The 2nd line "active signal" is output of 6541 card to DUT.

I am exactly doing what you have suggested by generating and acquiring the active signal simultaneously.

Than filtering the Data by comparing.

However this is what I do not want to do. Filtering data in this way just dont look like an optimum solution.

I want control over the start of acquisition.

Thanks in Advance

 

SS_Hunter
0 Kudos
Message 3 of 7
(2,597 Views)

Hey KAMIJI,

 

I am a little confused to what you are trying to do. You say that you are generating and acquiring the data active signal at the same time, but how does this affect your dut? If the 6541 is generating the signal, why would you need to acquire that signal that you are generating on the same line if you know what you are generating? How are you filtering data if you are controlling the data active signal? If you want to control the start of the acquisition, then set up the start trigger to only start when you have valid data. If your DUT sends a start trigger before valid data is there, then you should consider other trigger sources to start the acquisition.

 

Another thing you can consider is to only fetch the data that you want. If your DUT sends data before you want to acquire it, you can use the fetch offset (same in LV) position of to tell the 6541 which sample you want to start fetching on.

 

If this doesn't help, then maybe you should post a timing diagram of what you are trying to do, and then we can make a suggestion based on your timing diagram. The reason I am suggesting a timing diagram of your system is because I am still unclear of exactly what you are wanting to do. Either give a timing diagram or a better explanation of what you are trying to do so that we can help you out. Thanks, and have a great day.

 

Regards,

DJ L.

0 Kudos
Message 4 of 7
(2,567 Views)

Thanks for reply DJ L.

I have sorted out the problem using PFI lines, however now i am stuck with another problem.

I am using 6541 for both acquisition and generation.

Both acquisition and generation sessions uses falling edge trigger.

I need acquisition session to operate on half the frequency of what generation session is using (generation session is using Onboard clock).Otherwise I get redundant data by using same onboard frequency.

Is 6541 is capable of doing this?

have a nice time.

KAMIJI

 

SS_Hunter
0 Kudos
Message 5 of 7
(2,542 Views)
Solution
Accepted by topic author KAMIJI

KAMIJI,

 

Unfortunately you will not be able to run the generation and acquisition at two different clock rates without using an external clock of some sort. If you look at the Clock Sources Summary of the HSDIO Help you will see that there is only one On Board Clock available. If you need to acquire at half the rate you will need to provide your own clock that runs at this rate. Now, you could take the generation clock and export that clock to the CLK OUT terminal or DDC CLK OUT terminal and then use some external circuitry to divide the clock frequency in half and then import the clock signal into the STROBE line.

 

Another option is to use a data line and just write a 1010101010 pattern. This would effectively give you a clock signal that was half the rate of your generation session on a data line and you could then wire that channel to the CLK IN or STROBE line and use it as a clock. This would just require you to use one more channel as digital output.

 

Let me know if you have questions about my suggestions. Thanks!

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 6 of 7
(2,522 Views)

Thanks Aaron

Second method did workout for my case by writing a 1010101010 pattern and wiring it back to STROBE.

 

SS_Hunter
0 Kudos
Message 7 of 7
(2,500 Views)