11-03-2008 03:48 PM
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
Solved! Go to Solution.
11-03-2008 03:57 PM
11-03-2008 03:59 PM
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.
11-04-2008 02:26 PM - edited 11-04-2008 02:27 PM
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.
11-04-2008 02:51 PM - edited 11-04-2008 02:51 PM
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.
11-04-2008 02:54 PM
11-04-2008 04:11 PM - edited 11-04-2008 04:13 PM
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.
11-04-2008 05:08 PM
I've got it all working. Thank you so much everyone for all the helps.
Max