03-20-2017 09:29 PM - last edited on 03-30-2017 05:51 PM by karina.barles
Dear Lsbview experts,
I am attaching a measurement vi that currently should do the following:
1. Initializes a spectrograph, a camera, & a linear stage (moves to a starting point after zeroing out/homing the motor).
2. Moves the motor (forward then backward) & captures the spectrum with each movement with a sufficient wait time while saving all the data to one sheet (one wavelength column "x" & multiple spectra columns "y's"
My questions are (and please bare with me):
1. How do I stop the motor after moving forward & close the sheet then move in reverse while recording data in a new sheet?
2. I used a local variable corresponding to the start of movement to (start the measurement) in the motor. After I enter all the required values if I press on the START Measurement Knob the VI crashes at "Get Acquired data" vi on the camera ((Highlighted at the VI)). If I remove the local variable the camera & motor run simultaneously until I stop them. Why is using the local variable problematic in this case? How do I connect them properly?
I would really appreciate any guidance or help. Thank you,
03-21-2017 07:54 AM
I'm uncertain why, but when I attempt to download your attachment, nothing happens. I don't want to say too much without seeing the code, but Local Variables should be used rarely, if at all ... They are not really designed for "asynchronous communication".
Bob Schor
03-21-2017 08:12 AM
Hi Mr.Schor, thank you for replying. Do you mind telling me which edition of LabVIEW you use I can download a compatible version. I downloaded mine off the post and were able to open it (Most likely because I run the same edition which is LabVIEW 16). Thank you,
03-21-2017 08:31 AM
Please do NOT use sequence structures. They make your code hard to read....
As all subVIs are missing, i cannot provide detailed information.
You should consider using a producer/consumer architecture.