LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

start VI simultaneously

Solved!
Go to solution

Hello,

 

I'm have created two different VI's for my experiment, one is for controlling the power supply (Kepco.vi) and the other is for taking measurement from it (Kepco.measurement.vi). Because of problems regarding the memory buffer of the power supply, I need to make it so that when I start the Kepco.vi, the Kepcomeasurement.vi would also start about 5-10ms right after that. If anyone could help I'd greatly appreciate it.

 

Thanks,

Max 

0 Kudos
Message 1 of 8
(3,907 Views)
You could use a Rendezvous structure to make sure both parts start at the same time.  But put a 5-10 msec delay in the path after the Rendezvous for the one you want to delay.  What operating system are you running on?  If you need precise control of timing, 5-10msec on Windows may be just a little too low.
0 Kudos
Message 2 of 8
(3,902 Views)

If you have written your VIs correctly, you will have an error in/error out connection on each and a VISA reference in and a VISA reference out. Wire the outputs of your first VI to the inputs of the second VI. That is called dataflow and is the basis of LabVIEW. If you need a delay between the two, use the delay function and wire the error out of the first VI to the error in of the delay function. The error out of the delay function gets wired to the error in of your second VI.

 

As I mentioned, understanding dataflow is basic to LabVIEW. You might want to review some of the on-line tutorials.

 

0 Kudos
Message 3 of 8
(3,901 Views)

Thank you Ravens Fan, I will try that method. 

 

Dennis, it needs to be two separate VIs. I can not integrate them as using subVI because there are different parameters that need to be controlled such as running different time cycle, or having the controller VI stopped while measurement continues. And YES I have read the tutorials but there were nothing on linking/starting, using application control to start two different VIs at the same time.

Message Edited by oioi on 11-04-2008 02:27 PM
0 Kudos
Message 4 of 8
(3,853 Views)

Thank you Ravens Fan, I will try that method you recommended and I'm running Labview 8.6 on Windows XP.

The timing doesnt needs to be that fast/accurate, it could be off by as much as 1 second. I just need it to start in sync so that the volt setting command doesnt erase the volt measurement command's buffer.


The actual process goes like this:

Volt 10                      %%no return needed

Meas:Volt?               %%buffer return needed

** VISA return 10V

 

but if the volt command comes after like this

Meas:Volt?                %%buffer return needed

Volt 10                       %%no return needed

* VISA return times out (error 0xBFFF0015)

 

then there would be no read back because the volt command erased the measurement commands' buffer.  So as long as I set the measurement-VI time in multiples of controller's volt command and start them at about the same time then they should proceed in succession and there would be no VISA time out.

 

I have attached an NI-Spy text of the run and the errors shows up on line 6, 12, 27, 33 where volt command comes after meas:volt? while there are no error in line 21 as the meas:volt? got a returnreading.

 

 

Message Edited by oioi on 11-04-2008 02:51 PM
0 Kudos
Message 5 of 8
(3,841 Views)
Okay, I thought you were talking about two VIs in one top level which based on what you have just said, may be possible.
0 Kudos
Message 6 of 8
(3,839 Views)

I'm trying to modify my measurement VI so that it would issues the meas:volt? command again if there is an error but it's not resending the command. I have attached it here with the driver made, so please let me know if you have any idea why.

 

Thank you. 

Message Edited by oioi on 11-04-2008 04:13 PM
Download All
0 Kudos
Message 7 of 8
(3,812 Views)
Solution
Accepted by topic author MaxXx

I've got it all working. Thank you so much everyone for all the helps.

 

Max 

0 Kudos
Message 8 of 8
(3,801 Views)