05-13-2018 09:29 AM
Hello,
Basically my project is based on Multi-channel Data acquisition system in LABVIEW. My requirement is to get the data of various sensors in LABVIEW through micro-controller (89C51).
The micro-controller transmits the data serially which I am supposed to get in LABVIEW.
The controller part is ready, it is transmitting data of various sensors(channels) serially in a fixed time period i.e 10 sec for each channel (for this I have used ADC0808).
But the main problem is that I am not getting the data of all the channels in LABVIEW, only first channel output is coming in the serial buffer.
At present I have used Array to Spreadsheet Converter to get data of various channels in the serial buffer, but it is not working properly (only showing data of first channel).
Please help in this regard whether to use any other Function block and provide valuable suggestions / guidelines.
Solved! Go to Solution.
05-13-2018 11:42 AM
There is now way to give valuable suggestions or guidelines because we have no idea what you are doing now.
Attach a VI!
05-14-2018 02:16 AM
I have attached the Proteus file, LABVIEW block diagram, LABVIEW front panel so you can get a better idea of the concept.
The 3 data's seen on the virtual terminal (figure 1) are the data from different sensors(here potentiometers are used), and we are supposed to get the data serially in LabVIEW as different serial readings.
For that, we have attached the LABVIEW block diagram (figure 2) so that you can get a clear idea.
our aim is to get a data in 3 individual arrays Please see the LABVIEW front panel (figure 3), we are not getting data in the individual arrays but getting in the same array.
We have used Spreadsheet string to Array and after that the Index Array to get data in different arrays but we are not getting the proper result.
So please suggest what additional we have to use to get data of individual sensors in individual sub-array.
Please help in this regard as soon as possible.
05-14-2018 02:27 AM - edited 05-14-2018 02:28 AM
05-14-2018 04:25 AM
Hello,
I used the given vi file but there is some error occurring in the "Scan form String function block".
I have attached the screenshot of the error occurring.
Please help in this regard.
05-14-2018 04:50 AM
Hi pd,
I have attached the screenshot of the error occurring.
That screenshot is "nice", but hides all the relevant information!
What does the "received" string contain?
Which code is hidden behind the error dialog?
Why don't you handle the error output of the ScanFromString function?
Why does your VirtualTerminal now contain much more characters than what you have shown before?
What is the exact data format you want to receive from your "proteus"?
Did you think about using some delimiters between your data values?
Lots of question, but (nearly) no answers…
05-15-2018 08:44 AM
I am reading a decimal serial data from a microcontroller, where 3 data is coming serially and I want to separate that data. so I am using a SCAN FROM STRING as shown in below image.
but error 85 occurred
how to solve this error 85?
05-15-2018 08:51 AM
Your incoming data string has spaces. But your format string does not account for that. Add spaces to your format string.
05-15-2018 08:59 AM
For simplicity, you could even use "spreadsheet string to array" with a 1D I32 array as type, %d as format, and "space" as delimiter. Now you would get an array of three elements and 3x fewer terminals and clutter.
05-15-2018 09:14 AM - edited 05-15-2018 09:15 AM
Hi pd,
it's nice to see you took the suggestion to put some delimiters between your values!
But you need to adapt your format string to those delimiters…
Or use (as suggested before) SpreadsheetStringToArray instead!
(I merged your threads to allow others to see the history of your VI development.)