02-02-2009 12:48 PM
Dear All, SOS.
I got to built a sys with 2 GPIB instruments and 1 Serial RS232 instrument.
The VI runs well with high light execution. But when I run the program normally with out highlight step by step, what I can get is only the GPIB data flow. The serial data can not be found following the readout of the GPIB data.
I wonder if this is a non-synchronization issue. If so, how can I get those two data flow synchronized?
BTW: I was trying to use the RS232-GPIBCVA convertor to connect GPIB, but always got error6 at visa read. I still can not figure it out. Without the RS232-GPIB convertor, data can be read with the serial socket.
I have fighting the this case many days, hope you guys can give me some suggestions! Many thanks!
zhenxing
Solved! Go to Solution.
02-02-2009 01:00 PM
02-02-2009 02:13 PM
Thanks dan!
I just figured out the connection of RS232-GPIB,
I'm going to run the sys with all GPIB data flow to see how is going to be.
I will post the result later.
Many thanks!
02-02-2009 02:37 PM
Who's dan?
Using an RS-232 adapter when you have an available com port and when the instrument has a serial connection, does not provide any value, imho. The connection speed is still limited to RS-232 rates and the box is pretty expensive.
02-02-2009 03:23 PM
Thanks! Dennis!
Attached is my VI.
There is a serial data flow for Temprature, GPIB for Resistence.
I'm going to draw a R-T 2 array plotting at the end. without highlight execution, always only Resistence but Tshow a "0.0".
Could you pls help check it? Or maybe there is some local variables setted wrong?
I appreciate your great help!
zhenxing
02-02-2009 03:28 PM
Please try to follow a basic LabVIEW course and try to modularize your program.
Make specific vi's for each instrument and call those in your main vi.
Also look at better structures than a bunch of case statements that completely hide all your doing.
It is not really bad but impossible to read for somebody else.
02-02-2009 03:38 PM
thank you for the suggestion...
but it really works with highlight execution,
Just want to find where is the bug...
Thanks.
02-02-2009 03:59 PM
A quick look and I'm not sure why you need any local variables. And while you have the error clusters wired inside all of those sequence structures (which you should also get rid of), you don't have any wired to indicators or passing them from sequence to sequence. I question some of your other code. With each iteration of the inner loop, you are resetting each instrument. It's highly unlikely that you need to do reset or initialize serial port more than once.
You also need to get rid of the constant wired to the outer while loop's termination terminal. Using the abort button is not the correct way to stop a program.
Highlight execution slows the program down by quite a bit. You may need to add some delay. Run in normal mode and set some breakpoints so that most of the code runs at normal speed. By process of elimination, you will eventually find the problem area.
p.s. If these are Keithley instruments, you should really try the drivers that are available.
02-02-2009 04:15 PM
Thanks for all the comments,
I just start to learn labview couples of weeks and this is really all I can do for a real system now.
The program runs well with highlight execution, I think that tell me at least it can be run.
You mean breakpoints can be set on the data flow in normal mode?
I will try like that!
Thanks for your detailed suggestions instead of just blabla like someone else...
best
02-18-2009 11:41 AM
I reorganized the loops, and the sys runs well now.
Thanks all for the help!