LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout and Framing errors with VISA Read

Hello,
I have written a driver for LabVIEW to communicate with the Polhemus Fastrak device. I have two versions of the driver, a simpler one and the actual driver. I am able to communicate with the Polhemus errorless with the 'Test Driver Nov 10.vi'. I however get errors when I am using the 'Polhemus Driver.vi'. The errors are either timeout or framing errors. I am wondering if the problem lies in the fact that I have so many branches of the VISA reference and they all end in a dead end.
I appreciate any help that you can give!!!

Thank-you!

Ivanka
Download All
0 Kudos
Message 1 of 3
(3,118 Views)
The biggest problem I see is that you have no data flow. You have the possibility od doing reads before writes. None of the VISA Reads or Writes in the main VI have their error in/error out connections wired. By not doing this, it's hard to know where and when an error occurs. Also, putting a VISA Read to the right on the diagram of a VISA Write does not mean that the VISA Read will happen second. LabVIEW will try to execute in parallel and which one actually executes first is a matter of chance. You're using the event structure (which is good), but not for all of the controls that you could. It would probably be more reliable to have all of the Booleans at least, in the same event structure. You should take the VISA close out of inside the while loop a
nd put it outside so that it is only done when the VI stops. I wouldn't give the user the ability to configre the pc's serial port. Do the parameters on the intrument get changed? If they don't, then all you're doing is giving the user the ability to set the pc up incorrectly.

I think you can simplify things immensely and make it robust but I think it's going to take a lot of reprogramming.
Message 2 of 3
(3,118 Views)
Thanks Dennis,
That's great input!
0 Kudos
Message 3 of 3
(3,118 Views)