Jump to content

Visa serial comm (use event ) problem at loopback but virtual port OK


Recommended Posts

I am new to Labview!

I build a Vi to perform serial comm to test the visa info.

First, I test this vi at virtual ports ,comm1 for serial program, comm 2 for this vi,one for transmission and one for receiving. OK!

but when I use it at single Comm3 (Prolific USB serial port,MAX's view is OK) and loopback ,I got

Error -1073807298!

 

I Don't figure out what's the problem, Could Give me some advice? Thanks!

 

 

serial.jpg

serialnew.vi

Edited by Alexleung
upload vi
Link to comment
On 28-8-2016 at 5:44 AM, Alexleung said:

I am new to Labview!

I build a Vi to perform serial comm to test the visa info.

First, I test this vi at virtual ports ,comm1 for serial program, comm 2 for this vi,one for transmission and one for receiving. OK!

but when I use it at single Comm3 (Prolific USB serial port,MAX's view is OK) and loopback ,I got

Error -1073807298!

 

I Don't figure out what's the problem, Could Give me some advice? Thanks!

 

 

serial.jpg

serialnew.vi

Your problem is most likely that you can't open the same serial port two times! When you add an Error Handler.vi to the end of both error cluster wires, you will get a more descriptive error message than just an error number.
 

Link to comment

A common thing with VISA is that you open the port then press the Abort on the diagram toolbar. This leaves the VISA session open so when you try to run again, the Open will fail (because it's already open but you don't have a reference anymore).

If you go to the LabVIEW options (Tools>>Options>>Environment) and check the "Automatically Close VISA sessions" you shouldn't fall foul of that. (IMO this should be the default.)

    • Automatically close VISA sessions—Automatically closes VISA sessions left open by the application when the top-level VI becomes idle. This checkbox does not contain a checkmark by default.
Edited by ShaunR
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.