Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Ommiting results from Find VISA Resource

Hello,

 

Problem:

I have a third party software communicating with two COM ports, when i run my VI this interferes with labview VISA and throws out an error. I'd like to find a way of running both programs at the same time.

 

Details:

The relevant part of my VI is very similar to the example "http://www.ni.com/example/27757/en/". A find resource function creates an array of all resources using the command "ASRL?*::INSTR". This array is fed into a For Loop and read by an Open VISA function. However because the third party app is running in the back ground, when Open VISA tries to open the COM port, it throws out an error.

 

Due to the nature of the devices involved everytime the devices get plugged into the computer they may be assigned different COM port entries, hence I believe I have to you the above method. 

 

I am trying to find a solution that will either;

a) allow Open VISA to communicate with the device at the same time as the 3rd party app or

b) filter the results of the VISA Find Resource Function before they are fed into the Open VISA function. The only difference in the devices are the "VI_ATTR_INTF_INST_NAME" attribute and come in the form "ASRLXX (COMXX - USB Serial Port), ASRLXX (COMXX - USB COM Port) and ASRLXX (COMXX - Prolific USB-to-Serial Comm Port)", where XX is the COM Port Number. It is the "ASRLXX (COMXX - USB Serial Port)" ports that i am trying not to feed into the Open VISA function.

 

Any help would be appreciatted

 

Cheers

 

Pete

0 Kudos
Message 1 of 6
(3,364 Views)

option a is out of the question. VISA cannot access a device in use.

option b is to use the errormessage to see that that device is in use,

and use the other one.

you can detect the correct error and clear the error.

if you have only two devices it is easy, the first or the second should be working.

greetings from the Netherlands
0 Kudos
Message 2 of 6
(3,360 Views)

The third party s/w is using both ports simutaneously (talking to two pressure sensors), not an either/or case. Sorry didn't make that clear.

0 Kudos
Message 3 of 6
(3,332 Views)

Then it is clear, remove the third party software from the system.

greetings from the Netherlands
0 Kudos
Message 4 of 6
(3,315 Views)

I could possibly remove the 3rd party S/W but was struggling on how to incorporate the sensors into VI (hence why i was using the 3rd party s/w). It requires knowledge of .NET or some form of command line access... (these are the PT's for reference http://www.omega.com/pptst/PX409-USBH.html) . Any help on an example VI on how to incorporate these pressure transducers into a VI would be appreciatted.

 

Cheers

 

Pete

0 Kudos
Message 5 of 6
(3,306 Views)

It seems like a normal serial port device via USB.

see:https://www.newportus.com/software/PX409-USBH/PX409USBH_Firmware_Commands_RevAA025002.pdf

It takes some time to write vi's but you could try to see what happens with basic serial IO example that is delivered with each LabVIEW version.

greetings from the Netherlands
0 Kudos
Message 6 of 6
(3,296 Views)