Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Data

Hi all,

I'm currently sending voltage levels from my 10 bit ADC to my com port. The microcontroller then converts the ADC output to a float and sends it through the serial port using the statement

printf("%04.3f\n\r",result);

and in hyperterminal i receive values like 2.500 2.501 2.501 etc etc..

I've tried using Visa and plotting the info but i keep getting problems. Pls refer to image.

I'm getting the correct readings from the READ STRING in indicator (2.500 2.501 2.501) but my VOLTAGE READINGS gets the first reading correct 2.500 then flats out at 0 from then on.....


image

Message Edited by ghostz13 on 02-27-2007 02:02 AM

0 Kudos
Message 1 of 13
(4,875 Views)

Hi,

I posted a COM vi that I always use for serial communication. Take a look.

In your VI your are reading x bytes every few milliseconds without knowing how many and if there are bytes ready with the time-out you specified earlier.

Let me know if this VI works

 

 

0 Kudos
Message 2 of 13
(4,862 Views)
Hi KC,

Eric has been helping me out http://forums.ni.com/ni/board/message?board.id=170&message.id=211464&view=by_date_ascending&page=2
and it kind of works for me except for the way it displays as bar charts. Could you teach me how to change it to a single line graph such like the output from an oscilloscope.


Regards,
Gerard
0 Kudos
Message 3 of 13
(4,832 Views)

Hi Gerard,

Try it with a waveform chart.

0 Kudos
Message 4 of 13
(4,827 Views)

Hi KC,

I'm currently using a waveform chart to plot my values. Problem is that it plots one point, goes to zero, plots another point and results in the "bar charts" i mentioned.

Regards,

Gerard

0 Kudos
Message 5 of 13
(4,812 Views)

Hi Gerard,

 

Indeed you mentioned the ‘bar charts’ but with fast reading ….. Smiley Wink

 

Right click on the plot legend of your graph and select ‘bar plots’ Here you can select the type of plot. But what you want is the default, so you must have changed this before  Smiley Surprised

 

Message Edited by K C on 03-06-2007 09:05 AM

0 Kudos
Message 6 of 13
(4,804 Views)

Hi KC,

The waveform chart now displays line values. But I'm having problems changing the X axis time scale. I've tried changing scalefit, increment, maximum, minimum, multiplier through a knob connected to the property nodes with no success. Any other way to do it ? Thanks!

Regards,

Gerard

Message Edited by ghostz13 on 03-12-2007 09:52 PM

0 Kudos
Message 7 of 13
(4,761 Views)

Hi Gerard,

Can you post the VI you made ?

0 Kudos
Message 8 of 13
(4,755 Views)
0 Kudos
Message 9 of 13
(4,723 Views)

Hi Gerard,

I added a property node with some of the items you want to change. Can you try this ?

Message Edited by K C on 03-19-2007 10:20 AM

0 Kudos
Message 10 of 13
(4,711 Views)