I am trying to serially communicate with a micro controller. One of the command that the micro controller response to is "version". When i write the command "version" in hyperterminal I get a response from the chip "v1.0....". How can I used/setup labview to mimic what hyperterminal does? When I setup labview and type "version", I get no response. Please help.
If you're using LV 7.0 or later (don't know if this example is present in LV 6.0) try using the following example code. On the Menu Bar goto Help >> Find Examples ..., switch to the Search tab and type in "serial" Try loading the example "Labview <-> Serial.vi" Select the baud rate & COM port. Then transmit a string like "version" and see if you receive a reply.
There's a couple of ways. On the string control that you're using to enter the command, right click and select '\' Codes Display. Then you can add a \n (line feed) or \r (carriage return) to the end of your command. You can also do this if you've got a string constant on the diagram. Another way is to use Concantanate to String on the diagram. Wire your command to the first input and wire the appropriate constant from the string palette to the second input. The output is wired to VISA Write. Another way is to set the VISA Property Node to append a character with each write. Open VISA Configure Serial Port to see the VISA Property Node. Add another write property of Serial Settings:Serial End Mode for Writes. Right click on it and create a constant for that and select TermChar. To the termianation character input, wire a x0A (LF) or x0D (CR).
One thing to try is to flush the serial receive buffer before you send the command. It's possible that the garbage you're seeing is something left over from a previous command or when the micro boots up. The functions is on the Instrument I/O>VISA>VISA Advanced>Interface Specific>VISA Flush I/O Buffer.