LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Troubleshooting my control vi.

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,

 

0 Kudos
Message 1 of 4
(2,998 Views)

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

0 Kudos
Message 2 of 4
(2,989 Views)

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,

0 Kudos
Message 3 of 4
(2,985 Views)

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.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(2,981 Views)