01-08-2009 04:45 PM
I have a built a simple Send and Recieve VI that implements RS232. I have an issue where I am sending a command, waiting 2.5 seconds (I have tried many different wait times, not sure if it matters here, I just like it in there for my piece of mind), I have a property node after the wait that is telling me the # of bytes at the port, then I read the buffer.
What is happening is I am not getting anything besides a carriage return in my read buffer output. My property node is telling me that I have 67 bytes in the buffer, but it is not displaying the 67 bytes in the read buffer display.
I will try and step by step my code here, because I am not overly sure how to post a VI on these forums.
1.) I configure my com port, 9600 baud, 8 data bits, 1 stop bit, no parity bits, no flow control.
2.) Flush I/O buffer, 16 mask
3.) Write my command
4.) Write a carriage return
5.) time delay of 2.5 seconds
6.) Property Node, serial settings: Number of Bytes at Serial Port
7.) read buffer
8.) close
Real simple and works on other commands, the other commands do not reach the size of 67 bytes though and the highest I have seen this work with is 24 bytes.
I just find this odd that it tells me the number of bytes at the port yet all my VI reads is the carriage return.
Any ideas
Thanks,
Bill
To Administrators: I apologize if I am in the wrong forum, feel free to move if I am.
Solved! Go to Solution.
01-08-2009 04:51 PM
The forum is fine. To attach your VI, use the Add attachments link that is located below the edit window. Which browser are you using? There is a bug with attaching files with 2 letter extension in the filename when using Safari or Chrome, so I'd recommend going to a more standard browser such as IE or Mozilla.
What kind of device are you trying to communicate with? Do you have a link to its manual?
01-08-2009 05:00 PM
01-08-2009 05:11 PM
Here's my code, real simple, I am using COM 1 and COM 3 on the board I am using, but for this issue I am seeing I am seeing it on COM3 (If that makes a difference)
I am using IE on this comp
The device I am trying to communicate with is a power board for a medical application. I can not hand out the whole PDF, but if there is a more specific question I may be able to dig it up (it is a roundabout way, and I apologize, I just am not able to give the whole PDF)
I should have also stated that using hyperterminal I can see exactly what I want to see, is there some information that could be construed as an termination character? I wouldnt think so, but I am a novice.
01-08-2009 05:26 PM
Dennis,
You were correct, I had this funny feeling I was doing something fundamentaly wrong; I put the enable termination character to false and by golly there's my data 🙂
Thanks for the help guys,
Bill