LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA: Communicate​ion with "imar sensor " via serial port[

Solved!
Go to solution

Hello

I have problem in communication. I have one sensor imar sensor that can be easily communicate in Hyperlink but if I send same command for example "show conf" it doesn't responses It is connected with rs232 in com port 1.  it will be nice if you give me some suggestion thanking you

regards

0 Kudos
Message 1 of 13
(3,389 Views)

All the usual basics with serial communications:

 

  • Check baud rate, data bits, parity etc. are correct
  • Use the correct termination character
  • Make sure that Hyperterminal isn't still using the port - you'll need to close hyperterminal before LabVIEW can use it.

Can you post your code (LabVIEW 2010 or earlier if possible)?

 

-CC

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


0 Kudos
Message 2 of 13
(3,383 Views)

What is "Hyperlink"?    Do you mean Hyperterminal?

 

Are you sure you have all the baud rate and serial settings correct?

 

Do you get an error message when it fails to work in LabVIEW?

 

Are you sending the proper termination characters with the command you are writing when you do it in LabVIEW?

 

Please send the VI you are using in LabVIEW.  Make sure you have the commands saved in it.  If  you have them in controls, then do a Save Values as Default before saving the file and attaching it to your message.

0 Kudos
Message 3 of 13
(3,382 Views)

here is my code it has baudrate 57600

0 Kudos
Message 4 of 13
(3,376 Views)

Yeah I can't open that (needs to be 2010 or earlier - see my first postSmiley Wink)

 

Is 57600 baud rate the one specified in the manual for your device? This needs to be absolutely correct for the serial communications to work properly.

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


0 Kudos
Message 5 of 13
(3,372 Views)

You don't need the sequence structure or the case structure.

 

When you are in Hyperterminal, do you need to hit the enter key after typing "show conf" to make it work?

 

The string you are writing is "show conf".  It doesn't have any termination character at the end of it.  Try adding \r or \n or \r\n when the string constant is set up to display \codes.

Message 6 of 13
(3,371 Views)

ya in hyperterminal i have to hit enter after command

0 Kudos
Message 7 of 13
(3,368 Views)
Solution
Accepted by topic author kalu

In that case, try adding \r or \n to the end of your "show conf" string (ie "show conf\n") like Ravens Fan suggested and see if that works.

 

-CC

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


0 Kudos
Message 8 of 13
(3,365 Views)

thank you so much it works now

regards

0 Kudos
Message 9 of 13
(3,359 Views)

Excellent, glad we could help. 

 

Well done for marking a post as a solution (although I think Ravens post is more deserving)

 

Remember that giving Kudos is a great way to show appreciation for any help you recieve.

 

Good luck with the rest of your project.

 

-CC

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


Message 10 of 13
(3,354 Views)