12-09-2009 12:23 AM
Hello,
I am fairly new to labview, I am trying to get a Newport HS Stage to work as a laser beam block and shutter my beam at 1Hz. The stage will simply scan into place, then back to its reset position at a rate that hopefully I can adjust in the VI.
Currently, I am having trouble writing the software using the PA - VI for the ESP300 motion controller.
I have set up a VI that contains two PA - VI's, each of these have their own set of numerical user entry boxes to set parameters. They are seperated with a Timer VI which has its own numerical input. My intention was that once the program started, PA - VI would run the stage to position A, the timer would initiate and then PA - VI (2) would run the stage back to B (and another timer would be added at the end to pause...), then i could simply run this program in loops.
The problem I am having is that when i run the program, data is sent to both PA - VI's immediately; once the PA - VI (1) and the timer has finished, PA - VI (2) does not run its course. Can anyone suggest a better programming method than what I have created to simply scan a stage back and forth at a desired frequency?
Thanks in advance for any help.
Chris
12-09-2009 03:53 AM - edited 12-09-2009 03:54 AM
Without seeing the Pa-VI it's not easy, but you need to prevent the second one starting before the first one. With Labview, you should do that with dataflow. There may be (should be) an 'error in' and 'error out' terminal on the PA VI. If there is wire them together so when the first PA VI finishes it sends 'ok' to the second, which should wait until it gets it. You may need to use the time delay vi between the two PA-vi's. This also has an error in terminal which you can trigger from the first PA.
However, there may be a better way but without seeing what PA-VI is (and what it can do), it's not easy to advise.
12-09-2009 03:35 PM
Thanks a lot, chaining the error nodes together did the trick!
I am getting a small error on my ESP UTIL now that is setting the controller in demo mode but the stage continues to run and will be able to block the beam now. I'll try to solve that problem another day, Thanks again.