02-22-2016 05:58 AM
Hi!
I am quite new in LabView. I am trying to control stepper motor PRM1/MZ8 with TDC001, shutter SH1/M with TSC001 and powermeter pm100a as the following:
Firstly, I need stepper motor to rotate for 5 degrees. Then I need to open the shutter in front of a laser for a certain time, measure power of the laser with powermeter and then close the shutter. After that the program should do all the above again and again. But I don't know how to make the powermeter measure power exactly after opening the shutter. I attach the current code. Here I incorporated flat sequence programming rotating of the motor and opening the shutter into the case structure, which codes work of the powermeter. Unfortunately, in this case powermeter can't get the measurement in time when the shutter is open. HOw can I synchronize it? Please, help me!!!
Thanks in advance.
02-22-2016 10:05 AM
Hi Baronett,
I couldn't open your VI for some reason. Is it LV 2015? I usually get a warning if it is, but this time I just saw a window flash open and close.
Often, the error wires are best for making sure VIs operate in the order that you wish. If you need extra time, then you can use the "Wait (ms)" function. I like to use the modified one in the OpenG pallette (download from LabVIEW tools network). It has error wires. You can also use the sequence structure with a Wait function inside it.
02-22-2016 10:52 AM
02-22-2016
10:57 AM
- last edited on
05-13-2025
01:53 PM
by
Content Cleaner
Hi Baronett,
It sounds like the state machine might be perfect for you! They work great when you can describe your program similar to the following (for example):
Do State 1
If something, Do State 2, otherwise do State 3.
Do State 4
If finished, exit, otherwise Do State 1.
You can have any number of states, I just wanted to give an example of when they are useful. Yours might look like:
Open Shutter
Check Shutter Position
If Shutter is Open, Take Power, If Shutter is not in position, Check Shutter Position
Close Shutter