03-01-2016 03:58 PM
Hi,
I am using a PIC microcontroller to sample temperature and humidity every minute. I want to display this data in labview. I can currently send one data stream and plot it using the visa serial block. But I want to plot both streams simultaniously, how do I do this?.
Lets say I transmit the temperature and humidity using the following structure via uart "010,050". This is for a temperature of ten degrees and 50% humidity. Is there a way I can split these in labview so I can plot both seperately?
Thanks,
03-01-2016 05:40 PM - edited 03-01-2016 05:40 PM
I would just use Scan From String.
03-02-2016 12:09 PM
Hi,
Thanks for the help,
I've tried what you suggested but all I get is the error attached. I can plot one waveform on it's own but can't split the 2. The serial uart string coming in to the visa is characters of the form "123,321", I want to split and plot 123 and 321.
Thanks
03-02-2016 01:56 PM
Is your microcontroller sending a termination character after those two values? A termination character is typically a Line Feed (0xA, 10). If not, can you make it send a Line Feed at the end of the message? That will make your life a lot easier. You can then get rid of the Bytes At Port and just tell the VISA Read to read many characters, like 25 or 50. I am almost certain that you are just not seeing all of the message due to a race condition caused by the Bytes At Port.