LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED status is not change,during RS232 detection.

one more thing that We also made one RS485 connection on device and its work fine menas when its not connected then its shows the error and when is connected then everything is ok menas no error and i have made same vi for RS232 but its not working properly.

i am totly confused now what to do to solve this problem....

thank you..

0 Kudos
Message 31 of 46
(997 Views)

@AnkitRamani wrote:

one more thing that We also made one RS485 connection on device and its work fine menas when its not connected then its shows the error and when is connected then everything is ok menas no error and i have made same vi for RS232 but its not working properly.

i am totly confused now what to do to solve this problem....

thank you..


That is exactly what the timeout error is for.  If your app times out before it receives a response from the equipment, it usually means that your device isn't connected, or is in some sort of weird state.  (A big caveat here is that you have to make sure that the timeout is longer than the longest response time expected from your device!  e.g., If you issue command to the equipment to do a two-second sweep, your timeout had better be longer than 2000 ms!)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 32 of 46
(980 Views)

RS485 is the differential version of RS232. Does your PC have a 485 port built in or is it an add-on card, e.g., NI? For RS232 is your cable longer than 50 feet? What handshaking signals are used if any?

0 Kudos
Message 33 of 46
(968 Views)

Thanks BillMe for reply,

I am not very much sure about RS484 connection but its given to com port 2 in my computer by using RS232 cable,and one more thing is that even when I open my NI in order to check the connection in that I also got same problem means I can write  but I can not read the *IDN? As my instrument is not IEEE488 standardize and I am confuse that I am using Modbus library to communicate with device and  should I have to concern on NI-Max???

 Even i have check with by increasing time but no change...

one more thing that even i have tried by removing the RS232 cable from port 6 and then i try to run my vi ,but i got no error ....its very strange !!!!

 

0 Kudos
Message 34 of 46
(960 Views)

Hello,

I was just trying to find out the solution with different ways....

So I have made one changes regarding to parity in that I have set parity any of mark,even ,odd ...instead of none and in that case when I keep my vi in while loop then its working correctly means which result I wanted that I got,but the thing is its not correct method means in this case  I have to set LED in such a way that when there is error then LED will be ON and when there is  No error then LED will be OFF, and in my instrument when RS232 is connected then I got error and and LED will be ON and when I remove RS232 then there is no error in my Vi and LED will be OFF.which is totally different thing which I want.

 

And if suppose I am not using while loop then when I run my vi then once its give no error and when I run my vi second time then its give me error and when I run it for third time then again no error and its going on..In case of RS232 is connected.

And when I remove RS232 then its work fine means there is error which I want ,doesn't matter how many time you run the vi,but when I connected RS232 then its not working correctly..

Hope you will get my point what I want to explain....

Can you please tell me that why its happen so...

Thank you very much in advance....

0 Kudos
Message 35 of 46
(948 Views)

@AnkitRamani wrote:

Thanks BillMe for reply,

I am not very much sure about RS484 connection but its given to com port 2 in my computer by using RS232 cable,and one more thing is that even when I open my NI in order to check the connection in that I also got same problem means I can write  but I can not read the *IDN? As my instrument is not IEEE488 standardize and I am confuse that I am using Modbus library to communicate with device and  should I have to concern on NI-Max???

 Even i have check with by increasing time but no change...

one more thing that even i have tried by removing the RS232 cable from port 6 and then i try to run my vi ,but i got no error ....its very strange !!!!

 


Holy cow, you really, really really have to bone up on instrument communication.  I don't even know where to begin...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 36 of 46
(933 Views)

The open port function in VISA reserves the serial port resource but does nort detect the port, thus it will happily open any port you wish but will not sense a cable connection.

 

To do what you want to do you must find some way to query the device after you open it and before the MODBUS module executes.

That means you have to figure out how to create the correct string to send to the device and then once sent you have to wait for a response.

 

If the response does not come in a reasonable timeout then you can make your own error and pass it on to close the program or alert the user.

 

You need to make some kind of query to the device yourself. This query will give you the ability to sense if the cable is connected.

Good luck with finding that query.

0 Kudos
Message 37 of 46
(926 Views)

And with this kind of explanation it is really really hard to say what you are doing and what errors you get.

 

Could you please give a detailed explanation on what you are doing. Give some pictures/vi's of your block diagram for each test.

When you say you get an error, you need to tell precise what error you get, the number and text. 

 

0 Kudos
Message 38 of 46
(908 Views)

Thank you very much for your reply,

here I am attaching my Vi ,and screen shot of my Vi and as well Screen shot of the software which I am using.

Now the thing is that I have made Vi in order to check the connectivity of RS232 with the instrument,means when RS232 is connected then LED will be ON and when RS232 is not connected Then LED will be OFF.

But I got the problem that even when I have not connected RS232 with instrument even though i didn't get any error and also same with com port what ever comport I give but its not generate any error.

Even I tried with by removing com port also but still my vi not generate any error means every time LED is ON.

So will you please tell me that what should I do in order to solve this problem,should I make My Vi by using VISA library and then try to run??

Form where should I start?

And will you please let me know is there any other information you need??

And will you please tell me about how to create string in order to find query??

Thanks a lot....

Download All
0 Kudos
Message 39 of 46
(897 Views)

Hello,

I tried with using VISA  also,but i got

Error -1073807339 is at VISA: Read occurred in Untitled 2
Possible causes:
VISA: (Hex 0xBFFF0015) time out before the operation could be completed.

 

0 Kudos
Message 40 of 46
(887 Views)