Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

The VI VISA:Write does sometimes not finish execution! What can be the reason for this?

Hi everybody,

 

I have got a problem with the VISA:Write VI in LabView 2009 SP1 32bit (WinXP). When using it to communicate with a serial RS232 device the VI sometimes does not finish execution. Sometimes this happens after 2 or 3 consecutive calls, sometimes only after some thousand calls. When using the "Highlight-Function" one can see that the VI gets called correctly but it will NEVER finish, issue any kind of error message and of course also not hand any output-arguments to the subsequent VIs what causes the whole application to freeze. The Win Task-Manger shows no increased CPU-Load while "permanently executing" VISA:Write. The only possiblitiy to stop the execution is to push the "Close Button" of the Top-Level VI Window. The "Stop Execution" Button will be ignored. When forcing the application to quit, LabView shows a small message window that it is "Resetting" the Top-Level VI. This will also never finish. LabView can only be stopped by using the Win Task-Manger.

 

As this happens when using the Built-In COM Ports as well as when using those provided by a PCI Port Extension Card I am quite sure that it is no IRQ or Memory collision problem.

 

Can anybody give me a hint what is causing this problem and how I can find a workaround?

 

Thanks in advance and best regards,

 

Robert

 

0 Kudos
Message 1 of 5
(3,220 Views)

Hey Robert,

 

I have never seen such a behaviour, so I could only guess:

 

You could try to reduce the timeout and see if this changes something.

What Version of VISA are you using? Maybe you can upgrade to the latest one, NI-VISA 5.0.2.

 

Do you have any other software running which might poll the COM ports?

Does your mainboard have any "unusual" chipset for COM?

Did you change the VISA I/O-Buffer Settings?

 

 

Christian

0 Kudos
Message 2 of 5
(3,150 Views)

What about the flow control settings? XON/XOFF? RTS/CTS?

 

Is the device you are writing to controling the flow by controling the CTS line or by sending a Ctrl-S?

 

If you are sure the device you are writing to can read your data faster than you can send it, then check that the flow control is set to none and see if that makes a difference.

 

Omar

Omar
0 Kudos
Message 3 of 5
(3,129 Views)

Dear Christian, dear Omar,

 

thanks for your hints and advices. Unfortunately non of them worked out.

 

To summarize:

The device is not using Flow-Control and the serial Port is initialized with NONE ... so this should be o.k.
A reduction of the Time-Out had no effect at al, the serial ports are polled by LabView exclusively and the I/O Buffer Settings are unchanged. I upgraded to VISA 5.0.2 what also did not solve the Problem.


Concerning the "unusual Chipset" ... I'm not that much into Hardware that I can determine what an "unusual Chipset" is. The Mainborad has a Winbond W83627EHG, what kind of Chipset the Korenix JetCard 1208 (8 Port PCI Card) is using I do not know. In the meantime I have also tested it with a Prolific USB to Serial Converter. It's hard to be sure as the error is hardly reproducible but this Converter does not, or at least much less, show this problem. This is some kind of success but as I need more than one COM-Port on this machine I'm still quite desperate to find a solution. Any further suggestions?

Best regards,

Robert

0 Kudos
Message 4 of 5
(3,070 Views)

Hey Everybody,

 

I think I found a workaround but still I do not really see it as a solution ...

 

To have control over the "sampling rate" I used a timed while loop as provided by LabView with a period of 1000ms (not more necessary as it is only meteorological data). I don't really know for what reason but I had the idea to try and rework the timed while loop to a conventional while loop and calculate the wait times myself for every loop iteration. I have no idea what the difference between these two solutions is but with the "conventional loop" the problem is gone. Can anybody tell me what may cause a VISA:Write not to finish when used inside a timed while loop? Especially when used at such low loop iteration times? Are there any known issues with that combination?

 

Best regards,

 

Robert

0 Kudos
Message 5 of 5
(3,039 Views)