LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to define COM port?

When I run " Varispec serial test.vi" after the selecting the comport, I get Error -1073807343 from varispec write.vi. I get this error even when I don't connect my device with the system. I don't understand why it happens.I am attaching the library files and also .ini file for running the vi. Paste both of them in same location. Please help somebody.

Download All
0 Kudos
Message 1 of 13
(4,822 Views)

Hi canzie,

 

a lot has changed since LabVIEW4/5: not just LabVIEW itself, but also the underlying OS has made several evolution steps!

 

Don't you think it would be a great idea to get rid of that old VariSpec driver and replace most of it's functionality with up-to-date versions of VISA and INI file functions?

This way you don't need to open the COM port with each and every "VISA" function!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(4,808 Views)

Could you please tell how i can do it?

0 Kudos
Message 3 of 13
(4,782 Views)

Hi canzie,

 

by programming!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 13
(4,778 Views)

According to the Varispec manual, they provide LabVIEW Drivers that run on Windows 7, so they should be compatible with "modern LabVIEW" (say, anything from LabVIEW 2012 and higher, though I'd recommend LabVIEW 2016, myself).

 

I recommend installing a modern version of LabVIEW, installing the LabVIEW Device Drivers that come with the installation (particularly VISA, which you'll want for serial communications), installing the Varispec LabVIEW Drivers, and studying the example code they provide.

 

If you still need help after doing that, attach some VIs, your own if possible, but if you can't get the example to work, attach the example and tell us what problem you are having.

 

Bob Schor

0 Kudos
Message 5 of 13
(4,770 Views)

Could you please help me in this

0 Kudos
Message 6 of 13
(4,753 Views)

Actually the vi's that I have attached are been converted. So that they can be open in newer labview versions.But I am having problem connecting serially through the system, as it is unable to identify the port.

0 Kudos
Message 7 of 13
(4,751 Views)

Just download the latest driver and use it instead.  Don't try to use drivers that are decades old, even if somehow they "converted" without error.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 13
(4,739 Views)

Drivers are not available

0 Kudos
Message 9 of 13
(4,728 Views)

OK, I confess that I didn't open your attached files earlier.  I looked at the included DLL, which does, actually, contain LabVIEW code.  The Serial Test says "This Virtual Instrument program was written using National Instruments LabVIEW 4.0.1 for Windows 95".  Hmmm.  This may, in fact, be "the latest drivers", who knows?

 

I will say, however, that it uses functions I've never seen, but which seem to be in the LabVIEW Library.  The one that is probably throwing the Error is a function called Serial Port Write, a function buried in vi.lib\Instr\serial.llb.  Unlike the VISA functions, this function does not have an Error Wire associated with it, attesting to its ancient roots.

 

I'm going to assume that the VariSpec device follows VISA and Serial protocals.  My recommendation is that you find a LabVIEW Developer in your area who can come and develop for you a simple package that will completely replace the two-decade-old and very obsolete VariSpec routines with much simpler and more robust VISA code that can reside right in the code you are developing to run this Instrument, without needing any DLLs (you may also want to reconsider the structure and use of the .INI file).

 

You can (and should) also test your device using MAX.  When you plug your device into a Serial Port (are you using COM1?  are you using a DB9-style plug?  are you plugging into a USB port?  and, if so, do you have a USB-to-Serial adapter/converter?), you should be able to "see" it in MAX, configure it (Baud Rate, Termination Character, etc.) and communicate with it (send it a command, read its response, as per the Manual).  If you can do this, it will be very simple for a knowledgable LabVIEW Developer to give you a modern, working set of routines to "do what you want to do" with this Instrument.

 

Bob Schor

 

 

0 Kudos
Message 10 of 13
(4,723 Views)