05-07-2009 09:08 AM
I have a Problem accessing two different Interfaces at the same time.
One VI is using a serial port and a second VI uses a USB-GPIB interface.
Both VIs run just fine when executed alone, but I need them to run at the same time.
Shouldn't it be possible in Labview to access two different Interfaces from two different VIs at the same time?
regards,
Joerg
05-07-2009 09:19 AM - edited 05-07-2009 09:19 AM
Yes, and it's quite simple to access them at the same time. You just need to have them in parallel with no data dependency between them. Of course, your subVIs need to be written correctly and should not have something silly like their own while loop.
05-07-2009 10:10 AM
I'm not sure that I understand that right.
I have this two VIs, each one accessing a different interface. They don't have any dependency, but the gpib VI freezes when run parallel to the serial one.
After closing the gpib vi I get a message "resetting vi: gpib.vi" that doesn't go away. I need to kill Labview in the Task Manager to be able to work again.
05-07-2009 10:14 AM
It would have been much better if you had attached the actual code.
You have at least one while loop in the serial subVI and obviously, that has to terminate along with everything else in the subVI before code in the main can continue. That's basic dataflow.
05-07-2009 10:29 AM
So the gpib vi and the serial vi cannot run at the same time?
They don't have the same main vi. Is it not possible to run two main vis parallel?
05-07-2009 11:30 AM
05-08-2009 03:50 AM
Perhaps I make this more complicated then it is.
I'll try to explain in full detail.
Ok, have attached the read_write_serial.vi and the gpib.vi
I have a main VI that calls the read_write_serial.vi and the gpib.vi is another main VI that I want to run parallel.
It is NOT the main vi (calling read_write_serial) that freezes, but the gpib.vi IS the one freezing.
It can't be a data flow issue, because gpib.vi doesn't exchange data with read_write_serial.vi or other VIs calling it.
05-08-2009 08:57 AM
05-08-2009 11:32 AM
What I have been trying to say is, that gpib is no subVI. Gpib is running and not waiting for the serial.
I didn't write the main and the serial part and I don't have time to understand the whole application.
Now I have created a Virtual Machine and I run the serial part inside that VM. That was the fastest way for me to solve this.
Thank you for your help.