12-28-2010 10:37 PM
Hello,
I am working on a task in which i am getting three different data which i have to display on three seperate indicators.
The description is as under
I am using 8051 controller and 8 bit adc. Sending the data through RS232. The data can have any possible value from 0-255.
What technique should i use.
Thanks
12-29-2010 02:14 AM
pls give some solutions
Thanks
12-29-2010 07:55 AM
Use the built-in Find Examples function of LabVIEW.
The example you shuold look at should be under
hardware Input adn Output >>> Serial
Read the help on thos examples.
Tread the help on the functions used in that example.
Break-out the protocol document for your widget and set your baud rate start stop bits and termination character as indicated.
If you still have trouble, post your code and screen shots along with data and someone will give you another push.
Note:
NI Spy is a utility that installs with NI-VISA (I think!!!) and will let you monitor and log the data from your port so use that if you need to "look at the wire".
Ben
12-30-2010 03:34 AM
i am already fimiliar with serial communication with labview. But at the moment the task is to receive different data and plot it seperately for simplicity i explain it further.
I have three types of readings coming
1- Stress
2- Ressistance
3- Rate
The values for all the three types is calculated through the controller. And then it is required to send it on the P.C. for display and recording.
The question is how to decode it seperately so that they could be displayed and recorded.
Thanks
12-30-2010 07:34 AM
The following images show how I handled a similar (???) situation. THis code monitors a serial port to which is attached a 3-axis anemomter that gives me three values that record the air speed as vector of (U,V,W). Depending on the model it may have a 30 degree offset in the UV plane or could be mounted upside down (inverted).
When the time comes to check the port the following code is invokde.
after reading all of the bytes waitng at the serial port (Visa Property nodes >>> bytes at port tells me the count) the new data is passed to a sub-VI (see below) that determines if we have a complete frame of data coming from the widget. If so the packet is parsed for the data using "Scan from String" (Note: Packet also contains anemometer name that I used to make sure users did not connect wrong widget to port). The thrre values of the vector are then passed to another sub-VI where the values are adjusted and packed into an array of waveforms that can be plotted on a chart or pltted to a 3D garph to illustrate the wind direction and magnitude.
Images of the two mentioned sub-VIs follow
FInd Frame
This sub-VI uses a shift register to accumulate the data from the serial port into complete packet that start and end as we expect by seraching for the "Terminator". Whn a complete packet is found the packet is returned andthe caller flagged that a packet was found. If there are extra bytes left over, they get strored in the SR for use in the next packet.
THis sub-VI does the adjusts and then builds an array of waveforms that can be plotted on a chart. I like the "waveform" (WF) data type because it lets me control the time stamp (see above) so that when the data gets plotted, it is ploted at the correct time (since serial is seldom periodic). WF data types also allow assign attributes to the data. One attribute I use is the name so that the charts will automatically pcik-up the name for the plot legend from the data and it will automatically adapt when another set of data is presented to the chart ( but now I digress)..
So that is how I typically handle serial. I hope it gives you some ideas to work with.
Ben
01-03-2011 10:35 PM
Thanks alot Mr. Ben for sending the solution.
Could you pls also send a simplified solution of it too.
Thanks
01-04-2011 07:03 AM
@Intelligent wrote:
Thanks alot Mr. Ben for sending the solution.
Could you pls also send a simplified solution of it too.
Thanks
No. I am allowed to answer q's but not provide code*.
If there are items that are unclear, ask about them. This forum is all about "teaching to fish" and your questions will help others.
Ben
* If you go back through my post history you will find working code to be rare. Those post that did contain code where almost always "worthless examples" that can not be used in applications with work adaptation by the user.
01-04-2011 11:10 PM
Actually its hard to understand from that example. So i requested if you have any simpler form of explaination for the task of multichannel.
Thanks
01-05-2011 07:07 AM
If working from my end toward yours is not to your liking, then start working from where you are.
Post images (or code) of what you have done or have attempted and start asking questions.
Sooner or later we'll meet in the middle.
Ben
04-14-2018 10:04 AM
Hello sir, I am also working on the same project (multichannel DAQ using 89c51) but in my case the sensors are different, can you please send me your vi code for references. I got to succeed in a single channel but I got stuck in multichannel