03-14-2014 10:57 AM
Hi, I am trying to connect my microcontroller kit which will measure the current and voltage. I was provided with rs232 port to connect with labview to read the voltage and current data that is measured by my controller. How to make it display both current and voltage value by acquirng the data from rs232. I tried some programming but it doesn't work or it was wrong. How to make it work ?
03-14-2014 11:02 AM
Hi bala,
probably your programming is simply wrong!
- Your while loop runs as fast as it can, so you will read either 0 or 1 byte from port. That will not give meaningful data…
- Your indicator is outside of the loop and will display only the last reading…
- You configured your port to use the TermChar. Why don't you use it later on? Read a sufficient high number of bytes to get your full message!
You need to know the format of the transferred data. How many bytes do you expect per message? How are the data formatted in a message?
03-14-2014 12:25 PM
As we said in the other thread, you need to talk to whoever is designing the microcontroller and decide on a specific format for it send you the data. Once we have that, then we can start talking about how to program this up.
03-14-2014 12:31 PM