Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

closing the serial port

Hello there .. 

 

i am trying to close the serial port but it does! i do not know if it's my fault cause am still new in this field 😕

 

could anyone help???

 

 

0 Kudos
Message 1 of 4
(3,585 Views)

Hello mideast,


I have looked at your VI - calling the "VISA Close" function will only close a communication session if you provide a valid VISA session as a resource! But you never opened one, as you are using a third-party DLL for communications.

What you will really need to call is a "WiMOD_Close" function from your 3rd-party DLL...


Additionally, you will definately want to attend the LabVIEW Core I training course, as it does not only cover basic LabVIEW skills, but also introduces you to the VISA API used for instrument control. More information on the course topics can be found here:

LabVIEW Core 1

Best regards,
Sebastian

0 Kudos
Message 2 of 4
(3,571 Views)

first of all thanks alot for your answer 🙂

 

i thought i do not need to open a visa session  as it was referred in some conrner here in the forum!!

i only thought that i need to choose one using the visa available resources then i tended to use my dll functions .. the thing which makes me crazy is that i've used the closing function from my dll but it does not help although i've tested in some other platform and it worked!!!

 

have you any other idea??

 

wish you a nice day!

0 Kudos
Message 3 of 4
(3,563 Views)
The only other idea would be to not use a VISA resource on the DLL open function (you can see that it is cast to a String anyway), but a native String Control or String Combo Box filled with "COM1", "COM2", ... to allow the user to chose the COM port. 

Best regards,
Sebastian
0 Kudos
Message 4 of 4
(3,545 Views)