07-19-2010 02:22 PM
Hey everyone,
I'm quite new at labview
I hooked up a rs 232 serial device to my computer and installed the drivers for it and all that good stuff. I opened hyperterminal and had no problems communicating with the module.
When I opened one of the serial example VIs in labview I tried sending commands and I kept getting an error message saying it had timed out.
BUT
When I sent the same command 5 or 6 times at once i.e
VM 1 0
VM 1 0
VM 1 0
VM 1 0
VM 1 0
my module recieves the command and functions fine.
What did I do wrong???
Solved! Go to Solution.
07-19-2010 02:26 PM
What is the exact string you entered into the 'string to write' control? Did you include the CR and LF (\r and \n)?
07-19-2010 02:39 PM
I tried it like
VM 1 0
which worked in hyperterminal but labview timed out.
I just tried
VM 1 0\r\n
and it still timed out.
When I type
VM 1 0
VM 1 0
VM 1 0
VM 1 0
VM 1 0
my module clicks and valve #1 closes like the code told it to but the read string says "VM 1 0VM 1 0 ERROR: WRONG # OF ARGS".
07-19-2010 02:53 PM
Perhaps you need to add some inter-character delay like Hyperterminal. Try the options here.
07-19-2010 03:15 PM
Thanks for the suggestion but I still couldnt get it to work.
Someone else suggested that the reason it times out when I send the command once is because the vi might be expecting a certain amount of bytes. The more I type in the string to write box the quicker it responds but I dont know how to change that.
Is that a possibility?
07-19-2010 03:20 PM
07-19-2010 03:28 PM
THANK YOU!
I switched to codes display and it works perfectly now!