Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Lab Windows for DOS program using com port has probs with XP computer

Installed an old Lab Windows for DOS program on a computer with XP that has a com port.  When the LW program sends a byte to the system, the system sends back 3 bytes.  The first byte is an echo, and the next two are the response.  The LW program does not register the first byte, but sees the second byte.  Is there a new driver I need , if available???
0 Kudos
Message 1 of 8
(4,923 Views)

Hi,

 

Thanks for your post.  What driver are you currently using, and what is its version?  Did you originally write this program?  What does the program actually do?  Are you communicating with an external instrument of some kind?

 

Regards,

 

Todd V

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 2 of 8
(4,904 Views)

Not sure what driver I am using, but the LW for Dos version is 2.3.  I am not the original writer of this program, but I did inherit it from the original writer.  I have the source files.  The LW software talks to a system using the serial comport via RS-485 and using RTS as the control for the direction of the messages.  When the LW software transmits a byte to the system, the system echoes back this byte (uses this for handshaking purposes).  When we use the internal COM port, it appears the RTS signal is too short, and does not allow the transmitted byte to go out (only the start bit gets sent), and when we use an external COM port (use a USB to COM port cable), the RTS signal appears too long, and we miss the echoed byte back.  Does that make sense??

 

thanks

0 Kudos
Message 3 of 8
(4,877 Views)

Hi,

 

I would definitely recommend upgrading your program to a newer version of LabWindows/CVI.  Your version is almost 15 years old, making this issue very difficult to troubleshoot.  Additionally, the driver you are using is no longer available.  Using your source code and the NI-VISA and LabWindows/CVI help, it shouldn't be too difficult to rewrite the program using a new version of CVI.  I apologize for this inconvenience.

 

Regards,

 

Todd V

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 4 of 8
(4,863 Views)

If I go to the LabWindows/CVI, which one do we need (base, full or NI Developer Suite).  Most of the company is leaning toward /using Lab View (which I have an old version of), so this program that uses LabWindows may be the only program using this 2009 version of LabWindows.

 

thanks

0 Kudos
Message 5 of 8
(4,857 Views)

Hi,

 

If you are going to be using LabVIEW for other projects, it doesn't make much sense to use LabWindows/CVI for this individual program. I would just use LabVIEW since you have that already. You only need the base version of LabVIEW to communicate with hardware, but there are many advantages to using the full version including the ability to distribute applications. Refer to this page to compare the different purchase options for LabVIEW.

 

Regards,

 

Todd V

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 6 of 8
(4,834 Views)

I have since found out that we have a site license for LW/CVI Version 9.0.1 and have sucessfully loaded LW and activated it.  Now the fun part, since I don't have too much experience with LW/CVI, is there an example somewhere where it will at least get me started in converting my Lab Windows for DOS program to the new LW/CVI.

 

thanks

0 Kudos
Message 7 of 8
(4,815 Views)

Hi,

 

There is no example that shows how to convert your old code to a new version of CVI.  However, there are several examples that ship with CVI.  I would take a look at the VISA serial (RS232) examples.  This can be found at C:\Program Files\National Intruments\CVI90\Samples.  This is a great place to start.  Also you will want to look at the VISA help and leverage your existing source code as much as possible.  I hope this helps.

 

Regards,

 

Todd V

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 8 of 8
(4,800 Views)