LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Distortion on convertion units

When I convert dynamic data to string using the following program bellow, I can see that the frequency is not same to that I selected (1Hz) and the amplitude of the signal is distorted. Why?! How can I solve this problem?!
0 Kudos
Message 1 of 11
(3,906 Views)
When you convert from dynamic data type to a numeric and then to a string, you've lost all of the timing information that is part of the dynamic data type. Similar to a waveform data type, the dynamic type contains a start time and dt (the sampling rate). Without it, the graph and tone measurement function assumes a sample rate of 1. Also, the dynamic data has a y array that defines the sine wave and you're converting this to a scalar. What exactly are you trying to accomplish with this conversion from and back?
0 Kudos
Message 2 of 11
(3,893 Views)
Dennis,

I think I may have missed some information on this conversion. I´m trying to complete a serial communication between two computers (transmitter and receiver) using the VISA Serial Communications Set  (VISA Write.vi , VISA Read.vi, VISA Configure Serial port.vi and VISA Close.vi) locatting on Functions >> All Functions >> Instrument I/O >> Serial (the input of VISA Write and VISA Read accepts only string data type, thus its my goal on this conversion). My LabVIEW version is 7.0 Express, and I´m trying to complete this job via interface RS-232. A previous solution that I tried the first time its not unique. I rewrote a new solution that I attached for you. I also attached a program that I´m trying to measure frequency of sine wave without all previous conversion and the frequency is not the same that I selected (1Hz), but when I increase the frequency (over 10 Hz) the measures improves much. Why?! How can I solve my serial communication?!

Thanks for ideas and please help me...

Rafael Rorato

Download All
0 Kudos
Message 3 of 11
(3,875 Views)
As Dennis said earlier you are not sending all the data. Look at this modification of your VI.

Lynn
Message 4 of 11
(3,869 Views)

Lynn,

Well the frequency is same, but not 1Hz. And where is the signal?!

Message Edited by 8144-9199 on 12-15-2005 12:13 PM

0 Kudos
Message 5 of 11
(3,860 Views)

Lynn,

Well, the

 

0 Kudos
Message 6 of 11
(3,859 Views)

Lynn,

Well, the frequency

 

0 Kudos
Message 7 of 11
(3,857 Views)

Lynn,

Well, the frequency is

 

0 Kudos
Message 8 of 11
(3,857 Views)
If you want a 1 Hz signal, open the properties and change the number of samples from automatic to 1000 samples. The automatic mode sets the number of samples to 1/10th the sample rate and you don't get a full sine wave at anything less than 10 Hz.  You can also use Sine Waveform on the Analyze>Waveform Generation palette.
Message 9 of 11
(3,851 Views)

Dennis,

Your idea is good. The frequency is detected correctely when I do hard tests. On Waveform Chart the signal wave is not completely viewed. Why?! Look.

Thanks for the idea...

Rafael Rorato

0 Kudos
Message 10 of 11
(3,842 Views)