Jump to content

Unable to access serial port on PC


fbrandeber

Recommended Posts

Hi,

Calling the express r/w serial vi and entering setup parameters, followed by clicking on run, immediately gives me and error message window with no message. It just shows a large negative number, which appears to be coming from the error out port on the init subvi. The serial device, and cable works with a windows program written for it. A windows serial port monitor program and my serial port breakout box both indicate the express serial vi does not access the port. The machine I am using is a hp750n, software is LV8 30 day demo. I am a newbie, hope someone can help me over this bump in the road to working with LV8. :headbang:

Fred

Link to comment
It just shows a large negative number, which appears to be coming from the error out port on the init subvi.

If you post the negative number, we can have a better idea of the problem. You can also go in the Help Menu and enter the negative number under "explain error".

Did you configure the serial port? port number, rate, data bits, parity, etc...

JLV

Link to comment
If you post the negative number, we can have a better idea of the problem. You can also go in the Help Menu and enter the negative number under "explain error".

Did you configure the serial port? port number, rate, data bits, parity, etc...

JLV

Yes, as I mentioned in my post, I entered the parameters given in the device manual. I have tried variants with no peceptable effect. The vi does not seem to be able to access the port, for no apparent reason I can see... sigh

-1073807339 is the number, which seems to equate to "timeout before completion", which does not tell me much. I am expecting the "express serial r/w vi to access my machines' serial port.. I hope that is what is supposed to happen. Lots of things have changed in the 12 years I have been away from labview! I used to use something similar without difficulty in the early versions of LV.

Fred

Link to comment
Yes, as I mentioned in my post, I entered the parameters given in the device manual. I have tried variants with no peceptable effect. The vi does not seem to be able to access the port, for no apparent reason I can see... sigh

-1073807339 is the number, which seems to equate to "timeout before completion", which does not tell me much. I am expecting the "express serial r/w vi to access my machines' serial port.. I hope that is what is supposed to happen. Lots of things have changed in the 12 years I have been away from labview! I used to use something similar without difficulty in the early versions of LV.

Fred

Fred,

Are you sure you are adressing the port correctly? Also, are you sure that there is no other software that is blocking NI from accessing the port?

I might suggest this as a sanity check. Without having Labview open, try communicating with your RS232 connected device with Hyperterminal. If you can't get that to work, then Labview would probably never be able to see anything at the port either.

After writing the above, I checked the NI website and found the following statement about the demo:

The download for LabVIEW 8 is 450 MB and does not include hardware drivers for instrument control or data acquisition (drivers are available at ni.com/downloads). For other operating systems, please Contact NI.

Maybe this is your problem?

-Pete Liiva

Link to comment
Fred,

Are you sure you are adressing the port correctly? Also, are you sure that there is no other software that is blocking NI from accessing the port?

I might suggest this as a sanity check. Without having Labview open, try communicating with your RS232 connected device with Hyperterminal. If you can't get that to work, then Labview would probably never be able to see anything at the port either.

After writing the above, I checked the NI website and found the following statement about the demo:

Maybe this is your problem?

-Pete Liiva

Pete,

Thanks for the info! :oops: I sure missed that, I fully expected "fully functional" to include the serial port functionality.. sigh. Just to reiterate, I have used a windows program designed for it to access this device, so cable and port and device all work fine.

I located and installed without any apparent error the serial driver ver 1.71 ..... No change in the error message from the advanced serial vi... :-( I am beginning to think it is deliberatly disabled somehow.. I wish they had made that clear up front !

THANKYOU all, for you kind assistence! I had hoped to practice with a real world device, perhaps I should have known better. Guess I will just have to wait until our purchase goes through.

Best regards,

Fred

Link to comment

Version 1.71??? The latest VISA driver is v3.5. Get it here (for Windows, otherwise see the link I posted above).

When you get done installing VISA, you should also have something called "Measurement & Automation Explorer" (a.k.a. MAX)installed too. You can use that to do primitive serial communications tests. If you can communicate using MAX then you can communicate using LabVIEW if you program it correctly.

Link to comment
Version 1.71??? The latest VISA driver is v3.5. Get it here (for Windows, otherwise see the link I posted above).

1.7.1 is an old version of NI-Serial. That software however is only used when you have specifically installed serial boards from National Instruments. It is NOT NI-VISA but provides the drivers for the NI serial boards to be visible in Windows at all. NI-VISA sits on top of the Windows Comm API and is necessary to access any serial port (not just on the NI boards) from within LabVIEW.

Rolf Kalbermatter

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.