Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

programatically determine the Port and COM mapping

Hello all,

 

I am using NI PCI 8433 card. I would like to programatically determine which Port is associated with which COMx. or which port is associated with which serial resource. We can check this using MAX. I would like to do this using labwindows/CVI so that I can open the session for that resource using NI VISA. Any kind of help is appreciated.

Thanks in advance.

 

Sri Vidya

0 Kudos
Message 1 of 9
(5,300 Views)

Well, If you were using LabVIEW you could use the NI system configuration API.  Hmmmm When will this API have LabWindows/CVI support?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 9
(5,294 Views)

So dont we have any api to get the mapping for the NI PCI 8433 ports to the corresponding resources in labwindows/cvi?

0 Kudos
Message 3 of 9
(5,292 Views)

It does not appear to have support in cvi.  


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 9
(5,288 Views)

Hi!

 

I have quite the same problem. I want to know to which board are belonging my COM port. I have a PXI 8433 board, i use labview, and using visa functions i can retrieve lots of informations about the differents board present in my chassis i.e. the resource Name (ASRL6::INSTR), the Interface description (ASRL6  (COM6 - PXI-8433/4)) .... . The probleme is i can't determine to which board are attached the COM port. When i look in MAX, we can see that :

 

 

How can i know that programmatically ??

 

Thanks for your future answer ...

0 Kudos
Message 5 of 9
(5,235 Views)

I don't have hardware available to test this but this snipette should get you headed in the right direction in getting max information from LabVIEW

aa.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 9
(5,222 Views)

Hi jeff, thanks for your answer!

 

I checked your code, i've done quite the same using visa properties. I also tryed with the system API, but it doesn't work.

 

With your code i get the error (-2147220623: NI System Configuration:  (Hex 0x80040371) The property does not exist for this resource) when i call the property node ConnBusType with a serial interface. I think this property can't be access with COM port.

 

And that's all the problem, a lot of properties are not avaiable for serial port, you can see that from MAX, when you open a visa test panel. For example the attributes VI_ATTR_MODEL_NAME, VI_ATTR_SLOT, VI_ATTR_PXI_SLOTPATH... doesn't appear in the list... The only interesting propertie is VI_ATTR_INTF_INST_NAME i read : ASRL10  (COM10 - PXI-8433/4), so i know my COM port com from a 8344 board... but if i have more than one 8433 board, i can't make the link ...

 

So i'm still searching, but i think it's just not possible and i wonder how MAX can do that ...

0 Kudos
Message 7 of 9
(5,213 Views)

Sounds like a problem.  perhaps the system hardware API could use some additional functionallity.  Good thing there's an Idea Exchange


"Should be" isn't "Is" -Jay
Message 8 of 9
(5,207 Views)
I found solution to the problem by reading niserial.dbs
I posted subVI that predouce this mapping in the folowing link
https://decibel.ni.com/content/docs/DOC-48473

Please Kudo if you find my code useful

Or Hirshfeld
Application Engineer
SK Electronika
אור הירשפלד
Or Hirshfeld
Application Engineer
Certified LabVIEW Developer
SK- Electronika
+972-545844555
Or.Hirshfeld@SK-Advanced.com
il.linkedin.com/in/orhirshfeld
0 Kudos
Message 9 of 9
(4,650 Views)