02-24-2016 07:03 AM
Hi,i am new in labview ,i am trying developed a data acquisition system where 5 sensors connected to the AD channel of PIC microcontroller and its sending data serially to PC .I am getting data in labview but i can't differentiate data ,how can i represent separately each sensor value in Labview.
02-25-2016 10:12 AM
Hi,
There's a few questions I want to ask to get a better idea of your application.
1. Are you using VISA commands to communicate with your microcontroller?
2. How is the data represented right now? Is it an array of numbers? Is it just a long list of numbers and you don't know what corresponds to what?
3. Can you clarify what you mean when you say you can't differentiate data? Are you getting all the data and just don't know how to put them into their own arrays? Or are you having trouble figuring out what data corresponds with what sensor?
02-25-2016 11:55 AM
Thanks for your replay
1. I am using VISA commands to communicate with microcontroller.
2.Microcontroller reading each sensor sequentially and it sending data in string format to PC,It not sending any sensor number with data.
3. I am getting all the data and just don't know how to put them into arrays and i do not know how to represent separately .As an example 5 temperature sensor connected to a microcontroller which reading each sensor individually then sending by serially .How i can represent that 5 temperature sensor value in labview by 5 temperature meter.
I heartly expecting your kind attention .
02-25-2016 02:30 PM
Start with separating all values by e.g. a tab character and each set of (you said 5) datapoints with a LF character.
Tab is ascii 9 and LF is ascii 10 both decimal.
In that way you have minimal overhead.
If you want to have the PIC an easier time don't send the data as strings but as integers and convert to floats in LabVIEW.
But that is an optimization in speed and size.
In LabVIEW start reading until you get a LF.
Then keep reading and put the data (until you get at a LF) into a row of DBL (floating point numbers).
The conversion of a row of numbers is easiest with convert spreadsheet string into array.
If it does not work out send us a long string with content and your subvi that tries to do the job.
02-27-2016 12:43 PM
Albert
Thanks for your help.Now i am getting separate value from each sensor by "LF" at the output of read buffer.But i having problem to put them into array and represent each sensor value individually . I want to represent five sensors value to five meters.Could u help me
02-28-2016 12:37 AM
this is what you want but i think you may have some problem in your code to read from visa are you sure your device do not need any comment to write to send the data?
02-28-2016 01:52 AM
Hatef,
Thanks for your replay .you got me what i want ,Your assumption is right now i am facing problem .All data going to first temperature meter only ,how to solve this issue.
02-28-2016 02:09 AM
02-28-2016 03:56 AM
Hatef ,
I read the PIC comment manual,The data coming from PIC are separate by "LF" also i am getting five separate value?I think u did not get me.Suppose I am getting five value Such as( 40,45,50,55,60) and there are 500ms Delay between two value now i want to put them five separate temperature meter.In your suggested program only first meter showing that five value sequentially.
02-28-2016 04:08 AM
do you get these 5 data Simultaneously from hatware ?or by to by?