08-07-2009 12:46 PM
Hi,
I'm having an application where I want to sample the AI input and issue the AO output based on the level of a counter measurement. The counter measures the angle of a circular movement. When the angle passes certain levels, e.g. every 30 degrees, we want to take in the AI measurement and issue the AO output. Could anyone tell me how to realize this application? Thanks!
Solved! Go to Solution.
08-07-2009 01:04 PM
Hello Lucy,
It seems that for this application a simple trigger should do the trick. How the trigger is set up will depend on the your hardware configuration:
If you can give more details about what and how you are trying to run this, I think I might be able to provide help that is more useful.
Cheers, Matt
08-07-2009 01:12 PM
08-07-2009 01:48 PM
08-07-2009 02:09 PM
Hi mtat76,
Thanks for your suggestion. However, I think my case is a little different from Eric's case. Probably I didn't make it very clear in the previous post. The time lag between the AI sample and the AO output is not very critical in my application. I understand that there will be some delay between the two due to some calculations carried out by the controller. The most cirtical part of my application is how to generate a trigger when the encoder measurement passes 30 degrees. Since the signal from an encoder is an analog signal with jumps, I don't know if this signal can be used for a timed-loop as the timing source. For example, if the encoder has a resolution of 3600 pulses per revolution, can I have the timed-loop to excute with a period of 300 ticks based on the encoder (counter) measurement? Can this analog signal from the encoder be used for this purpose? Thank you!
08-07-2009 04:38 PM
Lucy,
Can you not just pipe the encoder signal to one of the counters on the board, then have the counter count down the 300 ticks and generate a pulse on the internal counter that triggers the AO for one shot?
And what is the reason for recording the voltage that the encoder sends out? Is not the level always the same (saturated) or is there some information that can be captured here? If necessary, you could send the encoder signal to one counter and one AI.
Matt
08-07-2009 05:57 PM
Hi mtat76,
Yes, you are right. I think I can just use the pulses generated by the encoder as the timing source and trigger the AI and AO every 300 ticks. I do not necessarily need the encoder (counter) measurement although it will be better if I can know the specific reading of the angle at the sampling instance. Thanks for the help!
-Lucy
08-07-2009 11:36 PM
OK, Lucy. Try this - I haven't done this before, so I don't know how this will work out. But let me know if this is what you are looking for. I didn't add an AI, but that is simple enough - it should also be triggered off of the same ctr0/InternalOutput on the 6211.
You might also look at this post - not exactly what you are doing, but they are using a linear encoder to trigger a DAQmx event.
Cheers, Matt
08-07-2009 11:37 PM
08-08-2009 01:43 AM
Hi mtat76,
It seems that I can not open the file since I only have Labview 8.5 and the file was written in Labview 8.6. 😞 Could you please convert it into 8.5 version? Thank you so much!
-Lucy