LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using the serial read and write, I only get my commands echoed

Solved!
Go to solution
Sorry for this easy question...this seems like a very hi end forum....  I am just a n00b.
 
I purchased a ELM327 OBDII interface, works great with some freeware out there...  but i wanted to take a crack at my own program...
 
I can talk to the interface/CAN no problem with HyperTerminal.
 
I fired LABVIEW up with the built in "Basic Serial Read and Write.vi"....  match all the settings to what i use in hyperterminal...  COM2, buad rate, etc...
 
When I go to send a command, I only recieve the command back... just the echo, no other info.  just a simple ATZ command returns ATZ, where in hyperterm it returns "ELM327 vX.X" 
 
I do get traffic on the LEDs.
 
Please help in my noobness.
 
thanks.
 
-Ben
 
 
0 Kudos
Message 1 of 9
(6,485 Views)
Have you looked at the serial communcation examples by doing a search within this forum?
What about the serial communcation under the Help menu, under Find Examples and search for serial communication?
 
R
0 Kudos
Message 2 of 9
(6,477 Views)
Yes, but it was some fast skimming of the various places to look...  
 
I went back, on a thread someone supplied there own rs232 read and write .vi.....   I am still getting the same result with that vi file....
 
Is there some obvious setting in LABVIEW that I am missing?
 
Also, when I type in hyperterminal each letter in the command i type "at rv" or "atz"  flickers the PC Tx Rx LEDs...  then i hit enter, the OBD LED flicker and get a result.
 
In LabView nothing until i hit run, which i know is normal.,..  but i do get a OBD LED flicker...  hmmm  Its close, something on the VISA read side is wrong..
 
 
I will keep looking.
0 Kudos
Message 3 of 9
(6,473 Views)
Solution
Accepted by topic author benjansky
In the shipping example called Basic Serial Write and Read, the default string to write is *IDN?\r\n. Did you leave the \r\n there or did you delete it. My guess is that you deleted it when you entered your own command. The \r\n is the way to enter CR\LF when the string control is set to '\' Codes Display. A CR\LF happens when you hit the return key in Hyperterminal. Try again with the above example and make sure you leave the \r\n alone.
0 Kudos
Message 4 of 9
(6,469 Views)
wow... my noobness is really showing now. Smiley Surprised
 
that was the trick...   after i tried the \r\n,  it returned the command echo and the response string from the OBD...   i sent "at e0\r\n" that kills the echo from the interface, now i am getting just the string I want.
 
Thank you!!  I'm sure I will have plenty more questions later on.  Its been a couple years since I used LABVIEW back in school...  and that was just to do labs using premade .vi's, never had to actually make the software talk to hardware.  This is some pretty sweet software, you guys are lucky to be flunent in it.
 
thanks again
 
-Ben
Mechanical Engineer
0 Kudos
Message 5 of 9
(6,463 Views)

Hi benjansky,

 

I have a ELM327 OBDII interface and I would working with Labview, if you want we can work together and share code.

 

Thanks,

 

Ivan

0 Kudos
Message 6 of 9
(6,295 Views)

Hi,

 

I know that it makes long time that this topik died but I need help...

 

I successfully connected my computer to my elm327 chip but where can I find commands to read PIDs?

0 Kudos
Message 7 of 9
(5,694 Views)

Sorry, I have the same issue, can you share your .vi please. Thank you very much

0 Kudos
Message 8 of 9
(2,681 Views)

The code is the LabVIEW basic serial example that ships with LabVIEW.

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 9 of 9
(2,678 Views)