LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

looking for an solution on pausing generation and acqusition

We need an application on PXI 6551 to send stimulus and acquire data back. Then compare with the expected response data. All the stimulus and response data are saved in an HWS file. What makes it difficult is that, we need a way to pause the generation and acquistion somewhere in the middle so that we can measure the current on the DUT. I have looked at the document on NI digital waveform Generator/Analyzer Help. The only VI that seems to be able to pause the generation and acqusition is the Pause Trigger. However, when I read that VI (niHSDIO Config Trigger - Digital Level pause trigger), it need a trigger source, which could be PFI<0:3>, etc. The question here is that, in my application, I don't know how to create an external event on PFI<0:3>. All I have is the HWS file contains the stimulus, and we want to pause it somewhere in the middle. So is there a better way to pause the generation and acquisition? Is there any good example?
 
Tieling
0 Kudos
Message 1 of 15
(3,715 Views)
Tieling,

When do you need to pause?  Is it always on sample 100, for example or is it in response to some external event?  You could use scripting and implement a "wait" instruction to wait for some number of cycles or for some external trigger.  I think there are a bunch of options for you but it all depends on your application so it would be helpful if you could respond with some details about the application.
0 Kudos
Message 2 of 15
(3,699 Views)
I have thought about that. Here is the detail application I need. We want to verify the SCAN IDDQ pattern is good or bad. Normally, this test is done on ATE in production. However, we do have times when I need to debug it on bench level. So PXI 6551 is our only choice to test the SCAN IDDQ pattern at bench level. What this test does is that, I have a bunch of stimulus (or patterns we prefer to call). These patterns are applied to the chip. At the end of each pattern (normally, we have around 20 patterns), I need to measure the current on the power rail. If the current is above some threshold, there is a problem on the chip.

So what we currently do is that, we manually cut the whole 20 patterns into 20 hws file, and run a Labview program. At the end of generation, we know all the generation channel is using NRZ format when they are  sending stimulus to DUT, which basically means at the end of the pattern, each generation channel will remains whatever value it left over. So as long as I keep the power on for the PXI 6551, all the stimulus are already applied on DUT, and keep the last value when the Labview program is done, right?  At that time, we measure the currect, and record it. So we have to rerun the same program (load a different hws file from front panel) for 20 times and write down the currect 20 times, which is tedious. Now what I try to get is an automated program to perform all the 20 pattern, and pause the generation at the end, and measure the current, then start the next pattern. Ideally, we would like to have all 20 patterns be put into one large hws file, and let program to create an event to say, hey, please pause at a particular time, we need to measure the current. And once current measurement is done, start from where it is left off.

I have my old program that is not automated process. Will you be able to help us modified it to get what we want? I am going to attach the VI here. Thanks.

Tieling
0 Kudos
Message 3 of 15
(3,688 Views)
Tieling,

Scripting sounds perfect for this application.

For example, you can download a single HWS file containing all of your patterns.  Scrippting would then allow you to generate subsets of that waveform in any order to would like.  You can certainly break up your HWS into separate files but scripting does not require that.  Additionally, you can insert waits between the various subsets or waveforms.  The waits can break on a timeout or some trigger.  The trigger can be some hardware trigger or can be generated in software using the "Send Software Edge Trigger" vi configured for Script trigger.

We ship a utility with NI HSDIO called the "Script Editor" (found in <Start Menu>\Programs\National Instruments\NI-HSDIO\Script Editor) that lets you piece together complex scripts.

See the attached screenshot where I have a script that would take a long waveform called "WaveformName" and generate subsets of that waveform based on various conditions including waiting on script trigger, waiting a number of cycles, and even conditionally generating different subsets.  Scripting is a very powerful tool allowing you to piece together some intricate applications.

For your application, during the wait cycle, the 6552 will be paused.  If you have the Idle vector configured for "Last Value" (default) then the state of the line will not change during this time.  You can set alternate behavior but it sounds like this is exactly what you are looking for.

the Script trigger could either be some done event from your current measurement.  For example, the NI 4070 has a "Measurement Complete" signal you can route to the 655x across the PXI backplane that could be use to trigger.  Otherwise, you can use the software trigger to fire the next step in the script.

There are several scripting examples shipped with HSDIO.  If you have any questions about them, let us know.


Message Edited by Ryan M on 07-17-2008 11:51 AM
0 Kudos
Message 4 of 15
(3,682 Views)
Thank for your suggestion. While I am looking at the VI - niHSDIO Write Script, it require a string parameter as the script to be excuted. However, if the script is saved as file by using script editor as you recommended, how am I able to pass the script file to that VI that needs string as parameter?

Tieling
0 Kudos
Message 5 of 15
(3,652 Views)
Hi Ryan,

I try to use the way that you recommended to me. However, I am still a little confused when I try to use the VI - niHSDIO Send Software Edge Trigger. Assume I got following script.

script myscript
generate mywave subset (0 1000)
wait until scripttrigger0
generate mywave subset (1001 2000)
wait until scripttrigger1
generate mywave subset (2001 3000)
endscript

So now, I configure the generation mode to be "scripted", and call niHSDIO Write Script VI. And also call niHSDIO Send Software Edge Trigger to send scripttrigger0 and scripttrigger1. But what I confused here is that, when does scripttrigger0 and scripttrigger1 are sent out? I don't see a control or input parameter that can direct niHSDIO Send Software Edge Trigger when to sent out script trigger. In other word, I want the trigger to be sent after I finish the measurement on the current. So I would expect there is either any control button on front panel or some kind of mechanism to tell niHSDIO Send Software Edge Trigger, ok, it is time to send out script trigger so that the next subset of the waveform can start to be generated. But how can I do this?

If possible, will you be able to tell me your contact number or give me a call? It may much better to talk on the phone than just email exchange. Thanks for your help.

Tieling
0 Kudos
Message 6 of 15
(3,640 Views)
Hi Ryan,

There is one more question. When should I call niHSDIO Send Software Edge Trigger? Should it be called after niHSDIO Write Script and before niHSDIO Initiate?

Tieling
0 Kudos
Message 7 of 15
(3,632 Views)
Hello Tieling,

If you are configuring your script to use a software script trigger, the trigger will be sent out when you actually call the Send Software Edge Trigger function. Therefore, you will want to call this function in your code after you call niHSDIO Initiate. You will want to place the Send Software Edge Trigger within some kind of case structure or other conditional branch such that it will only be called when the proper condition is met (whether it be completion of something else or a button press).

There is a great example in LabVIEW which illustrates how the Software Script Trigger is utilized. To find this example, open the Example Finder under Help » Find Examples. Within the Example finder, navigate to Hardware Input and Output » Modular Instruments » NI-HSDIO » Demos » "Dynamic Generation Software Script Trigger.vi". This example shows how to configure the session and will send a software trigger when a button is pressed. I hope this helps,
Daniel S.
National Instruments
0 Kudos
Message 8 of 15
(3,602 Views)
Hi Dan,

I did exactly the same as the example you pointed to me. But, it does not seems to generated the waveform controlled by the script. My script is attached. What happened is that, if I click the button on front panel to send a trigger, it still generates the all the samples contained in the hws file. What I expect is that, it should generate only 500 sample the first time I click the button, and generate another 500 sample when I click the button the second time. After that, no matter how many time I click on the button it should not generate any more data. But it seems like, as soon as I click the button the first time, it already generated all the data contained in the hws file.

Can you give me a call to help on that. Maybe, we could have a some sort of vnc to let you see how the program is executing strangly.

Tieling


0 Kudos
Message 9 of 15
(3,581 Views)
Hi Ryan and Daniel,

I have some question regarding how to synchronize acquisition and generation on 6551. I briefly described my application in above posts. Basically, what we want to do is that, we have a couple of patterns, say 20, that needs to send to DUT. At the end of each pattern, we need to measure the current on the DUT, then send the next one. So we import those pattern into one HWS file. Let's say, the whole file has 10,000 sample. I have written a VI, so that it use script to control the generation. Let's say I want the generation channel to send out 1000 sample each time, then pause it and wait for a click on the button to send the next 1000 sample. I've already got this part done. And it is working. Now, the question becomes how do I synchronize the acquisition? Specifically, what I mean is that, I want the acquistion engine starts to acquire data when generation engine starts to send data. Once generation engine is paused by the script, then the acquisition should be paused as well until the generation starts again. So the kind of effect I want is that, when I click on the button on front panel, generation engine starts to send out the first 1000 sample then paused. Acqusition engine starts to acquire data immediately and stops after obtains 1000 sample. They are both waiting on the click of the button again. Once I click the button, the generation engine starts to send the second 1000 sample, and the acquistion engine starts to receive the second 1000 sample. Once it is done, they both stop. Such process repeated until all 10,000 sample is done.

Unfortunately, I found that acquisition engine does not support script trigger. Only generation engine supports script trigger. So I don't know how to make that work. What I currently have is that, I export "DATA READY EVENT" from generation channel, use that exported signal as start trigger for the acquisition channel. So what I ended up is, the first 1000 sample is matched between generation and acquisition. But after generation is stop, acquisition does not stop. It keeps to acquire the rest of 9000 sample, then stop. So when I click the button again. generation engine starts to send a new set of 1000 sample, but acquisition channel does not acquire any more data since it has already obtained 10,000 sample.

What can I do to get what I want? Thanks a lot.

tieling
0 Kudos
Message 10 of 15
(3,561 Views)