05-09-2013 01:41 AM
Hello,
I'm using VISA serial communication in my vi to communicate with hardware. My laptop has two COM ports COM1 and COM2. I will be using VISA configure serial port to set particular Com Port.
COM port will be indicated using VISA resource name. I should know the com status before other operation is done. i.e say I have selected com2 in resource name while configuring COM port, but I have connected serial cable from hardware to COM1.How can I know the difference?? I tried checking the error line,but unfortunately its not giving any error since COM1 is present in laptop.
Thanking you,
sushmith
Solved! Go to Solution.
05-09-2013 05:40 AM
Hi,
Did you try the IsConnected Property Node?
05-09-2013 07:48 AM
Hello,
I have tried using property node immediatly after configuring VISA configure. But eventhough my COM port is connected its still giving error. Is connected is showing FALSE. error code of property node was -1073807331
I have connected reference out and error out of VISA configuration to reference in and error in of property node..is it not the right way? find the attached figure.
Thanking you,
sushmith
05-09-2013 10:50 AM
Hi sushmith_ks,
Refer to this URL for Error
http://digital.ni.com/public.nsf/allkb/8EFBA8A3A660A53686256FEB006C47AB
Sorry, do not have immediate suggestion for hardware other than NI.
05-09-2013 11:51 PM
Hello,
The URL shows that is property node can be used only for NI hardware. but COM port hardware is not from NI. Is it the reason why property node not working in my vi? what other option I have?
Thanking you,
sushmith
05-10-2013 12:11 AM
Hi,
Another way could be to write serail data to return the Instrument Identification using the *IDN? command.
based on the response from the COM port the appropriate case to display error message could be executed.
Hope this helps.
05-10-2013 12:29 AM
Hi naru,
Sorry, I didn't understand. Can you please elobarate..??
Thanking you,
sushmith
05-10-2013 01:40 AM
Hi
The idea would be to write *IDN? (or you could select the command based on expected response from your hardware device connected to the COM port) command to the COM port individually,
This should return the device identification (or a known response) of the device connnected to the COM port when one tries to read the data for No. of bytes available at port.
If the return string is empty (or not the expected response) then that would mean no device is connected to the COM port.
06-10-2014 09:36 AM
hello all
I am currently doing a project on ''wind power plant using SCADA and control'' and I have been asked, by my project supervisor, to use labview to represent serial data in graphic form. However I am not very familiar with this software alot. I am using a simple serial write and read program that i obtained from the examples of the NI.but am not able to design our requried program.plzzzz anybody help me.
I am relying completely on your kind consideration to help me out of this.
Kind regards
Engr Faisal
06-10-2014 12:46 PM