This is a complex application. I think that performing an analog input operation with an analog level trigger along with a retriggerable pulse train application is your best bet.
So, your pass/fail signal will come in and will trigger an analog input operation which will acquire a finite amount of points. From there, read those points finite points and determine if it is pass/fail.
The original signal will also trigger a retriggerable pulse train for one of your counters. You will need a delay in this part of the application to allow time for determining if the analog input was pass/fail. This retriggerable pulse can be used as the signal to both move the stage and as the signal back to the tester to begin the next test.
There are a couple of examples that will help you get started. I recommend taking a look at these 2:
In LabVIEW >> Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Generate Digital Pulses >> Generate Digital Pulse Train Finite Retriggerable.
I hope that this information helps you with this application.
Hi Hal, thank you very much for replying.
According to what you suggest:
1. Shouldn't the analog input operation be retriggerable aslo ? For every analog reading, there should be a response back to the tester, and if the pulse is retriggerable, so is the analog input...
2. How do I take care of the stage move part ? I did not entirely understand where it should be placed (as a next frame in a sequence structure after reading an analog sample ?)
3. I need to make sure that the pulse is sent back to the tester only after the analog read in has been done and the stage being moved one step. Therefore, I cannot tie the stage and the back pulse together, can I ? I understand that you suggest to use a constant delay for sending the pulse back, so those 2 actions would have time to be completed. But in case the stage fails to stabilize within this delay time, can I make the pulse wait somehow ?
4. You said that I should use one of the counters of the 6025E as the pulse output. Is it possible to use other ways to output this singal, regarding the needs of our program ? (via Serial port, Usb, other 6025E channels or any other ways )?
5. Before I've read your answer, I've built an application, but used only one trigger for both tasks - the analog read in and the pulse out (I've used the sequence structure to make sure one is executed after another. I've left the stage part frame empty at this time). I ran the program but instead of receiving a pulse after each trigger, the pulse was at a very low fixed frequency of about 10 Hz, although the trigger was at 20Hz - 1kHz. I'm attaching this vi, I would be very thankful if you could please take a glance.
Thank you very very much.
I looked into this a bit further and it turns out that the 6025E does not support analog triggering. So you will need to use a digital trigger for your analog input operation. There are two ways to make this retriggerable:
1. use a counter for a retriggerable pulse train as the clock
2. Modify the " Acquire & Graph Voltage - Internal Clock - Hardware Trigger Restarts example to use a digital trigger.
I think that using a sequence structure is a good idea for separating the stage 1 step and sending the signal back to the tester. You can still use a retriggerable counter for one of these signals. You could use a digital output line for the other signal, but then you need to develop a way to trigger this at a later time based on then when the step is completed. Also, if you want to use other hardware (serial, usb, etc) for other parts of this application, then that will be fine. Finally, I took a quick glance at your code and it looks like you are off to a good start.
I am little unclear as to what you are getting at here with respect to the back pulse and I didn't see any code attached. If you post it, I can take a quick look, but I can't make any guarentees that I will find anything. This will also give some other users a chance to look at it and maybe one of them will notice some things as well.
With regard to the digital output on the 6025E, you can set the line to high and then use the DAQmx Tristate Property to drive the line to a state of high impedance (neither high or low) and that could function as your output pulse. Otherwise, you could simply output the line to high and immediately output it to low again.
What other USB/Serial hardware do you have available for this application? I can't really say what is possible without knowing what equipment you have.
I'm sorry if I was not clear enough about the program.
What I'm trying to do now is basically a program which does the following:
receives a trigger - then reads an analog sample (only one sample for the matter) and then outputs a trigger back.
The code, I'm attaching now, is a program which was built by me to do just this. Only, the problem is that it does not work properly - somehow the output trigger does not follow the input trigger. The output triggers are always sent with the same frequency (10 Hz) no matter how high the frequency of the input triggers.
Any help would be highly appreciated.