From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-03-2014 06:07 AM
I can't be the only person with this problem in LabVIEW and I still haven't worked out the solution.
Say for example I write a driver for a PSU, this device is off the shelf but the manufacturer supplied driver is ***!
Instrument is connected by GPIB. in this instance.
3 months later I want to re-use the driver but due to cost implcations I can't have the GPIB flavour of the instrument and have to have the RS232 version, so I re-write the driver so that all R/W functions are wrapped by a VI that uses the correct process for reading serial ports if it is an RS232 device and re-do the initialisation process too.
3 months later still I get hold of a USB version of the PSU - this will use the GPIB style code and doesn't take long to modify.
The question is this:
Is there anyway that anyone knows of (ignoring VISA aliases) that will allow me to determine the physical connection to the PSU from the PC if someone changes it and therefore use the correct part of the driver code to initialise and communicate with the PSU.
Specifiying the Intf Type is a SW fix for a HW problem that causes more issues if the connection is changed over, how can I allow someone to use RS232/USB/GPIB and detect the connection type myslef within LabVIEW before I do a *IDN and onpen the port?
Thanks in advance for any ideas
James
Solved! Go to Solution.
03-03-2014 06:38 AM
03-03-2014 06:55 AM
Hi Dennis,
OK, I thought, that's what I've been doing maybe I'm wrong as it doesn't seem to always work. I haven't found enough info on the Intf Type command to be sure that it will update from standard dependent on HW connection. Although I'm sure if you say it does then it does. (There are a few people on the forum whose word I am prepared to take as gospel when it comes to LabVIEW issues).
James
03-03-2014 07:04 AM