LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED status is not change,during RS232 detection.

Thank you Chrissy,

I didn't get you.

Will you please explain me in detail so I will follow that...

And I am not able to see any error code because that's the problem for me what ever com port I assign to modbus its detect and no error is displayed.

I will tell you once again that my device is connected with RS232 when ever we want to check the functionality of that device then we have special software for that and with out RS232 connection is not possible to check functionalities. Now I want to make one LED on front panel of my vi so one can check that weather RS232 is connected or not.for that I have to communicate with device so I have use modbus library.

Can you please let me know that is it necessary to use modbus or we can check the functionality any other ways also??

If any information is short then will you please tell me I will provide you.

Thank you very much for your kindly reply.

0 Kudos
Message 11 of 46
(974 Views)

@AnkitRamani wrote:

... if rs232 is not connected then its give time out error and when its connected then everything is working fine.

...

...

I have to make one functioning LED to check RS232 connection status in labview front penal and when RS232 is connected then LED status should be green (ON) and when its not connected then it shoud be off. 


Sorry, maybe I'm misunderstanding, but you said that you wanted to have an LED light when your device wasn't connected and that the timeout error was working. Is this right?

 

-CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 12 of 46
(972 Views)

Thanks for reply.

no no i dont want that.when ever error comes then my LED should be OFF otherwise LDE should be ON.

but in my case every time LED is remain ON wheather COM port adress is right or not.i Dont know why is it so.

did you get me??

Thank you again.

0 Kudos
Message 13 of 46
(968 Views)

Hello,

I tried with visa port but in this I got error in visa read operation I have conformed my serial setting its OK then I tried with increase time out even though I am not able to solve this error.

In attachment I have attach screen shot of my vi...

Will you please guide me....

Thank you...

0 Kudos
Message 14 of 46
(952 Views)

Hello,

still I am working on the same problem,

I want to know that if I want to communicate with instrument by using RS232 cable by using ViSA or MODBUS library, then is it necessary to have Instrument driver. Because In my case my device is Light guard basics and for that we don't need any driver we just have to supply 12v and 5 amp in order to make it power up and we have special software for light guard and we are using RS232 cable to communicate with that software,and now I want to make one LED in my front panel of Vi which use to show the connection between RS232 and Instrument.

Will you please guide me that is it necessary to have instrument driver or without it also  possible to do  communication.

I read all documentation regarding to visa and I came to one conclusion that we need driver but I am not sure about this.

Thank you very much in advance.

0 Kudos
Message 15 of 46
(938 Views)

VISA is simply an abstraction of the hardware layer. It is used to communicate in a generic fashion with devices that use any supported protocol. The serial port is already supported under the OS and you can send/receive on the serial port without the need for any special software.

 

So where is the "special software" you mention? On the Light Guard Basics device or on the "host" side?

0 Kudos
Message 16 of 46
(930 Views)

Thanks for reply,

special software means we have software in order to check functionality of light guard device.

And its installed in computer and I asked to design vi which give similar function as per software.

In that software we have to set only comport and baudrate etc..so its automatically connected with device by using RS232 cable and we can monitor all the data by using light guard software for example we can check ambient light sensor functionality, gps detection, infrared connectivity..Etc....And I am doing same by using labview , by using modbus I can easily communicate with it and everything is working good but I am facing problem in only RS232 cable detection. I don't know how to design vi for RS232 cable detection.because there is no any internal register address assign on the software so I though I have to use VISA library.

And also I tried to design subvi for RS232 detection but in that case even my device is not connected with RS232,LED is ON and if RS232 is connected even though LED is ON.And what ever port number I assign its never show me any error...thats why I am confused.... i tried with Serial read write operation in that i got error during visa Read operation and i tried to solve that but i didnt get any success.

Did you get me..???

Thank you very much...

0 Kudos
Message 17 of 46
(925 Views)

I'm sorry but I can't make any sense out of what you are doing. In your last image, you got an error in MAX. I have no idea what you wrote or if the instrument was connected or not. Your LabVIEW VI shows a *IDN? write but then you have a read set for 0 bytes. Obviously, the read will do nothing if 0 bytes is requested and you won't get an error. You certainly do not need a driver for communicating to an instrument. If you are able to communicate, then detecting a disconnected instrument should be easy. Just remember that just writing to a serial port tells you nothing.

 

0 Kudos
Message 18 of 46
(913 Views)

Thanks for reply...

I know that for 0 bytes there is nothing to read so there is no error in any case ,but i also try with by setting different bytes but i got error during visa read operation,..

thats why i am confused.

Thanks again for your reply...

0 Kudos
Message 19 of 46
(910 Views)

Thanks for reply...

I know that for 0 bytes there is nothing to read so there is no error in any case ,but i also try with by setting different bytes but i got error during visa read operation,..

thats why i am confused.

Thanks again for your reply...

0 Kudos
Message 20 of 46
(910 Views)