Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
I am using the VISA pallete to acquire array of amplitude values (100 values) from CCS C compiler. Using this array, how would I generate a sine wave? I have attached what I have so far. Help would be much appreciated!

01-10-2017 08:14 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

01-11-2017 05:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

You need to explain what you are trying to do. Right now you are calculating the sine of your acquired data, is it what you want?

You will only get a 'sine wave' out of this if your acquired data is a ramp signal of some kind. Also your converted data is integer, so probably not a good resolution to use as input to a sine function. What is you data range and what are these 'amplitudes' representing? What is your end goal?

01-11-2017 08:28 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

01-11-2017 08:33 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi beginner,

I basically want to recreate that sine wave on labview.

I have written code to collect the values of the sine wave and now I have used the VISA palletes to get the array of values in labview and make a graph out of it.

And what's your problem when you already have written code?

Best regards,

GerdW

CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO

Kudos are welcome

GerdW

CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO

Kudos are welcome

01-11-2017 08:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

01-11-2017 08:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

01-11-2017 08:59 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

01-11-2017 09:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

ok, get it. Your data consists of your sine tone data but I guess you do not read the time array.

If you extracted the two columns in your spreadsheet and created X (time) Y(Voltages) data arrays then you could graph it on a LabVIEW XY graph and get the same look as in your spreadsheet.

In your actual VI I would suggest you to try the following (to start with)

1 - Remove the sine primitive

2 - Replace the **Decimal String to Number** primitive in your FOR look with a **Fract/Exp String to Number**

3 - Graph the array out of your FOR loop directly to a waveform graph

If it looks like a sine tone, then you can move on and work on the time information (dt)

01-11-2017 09:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

01-11-2017 09:34 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

From your XLS it looks like you are sampling at 3 kS/s (dt = 0.33 ms).

Use the **Build Waveform** (Waveform palette) and input 1/3000 to the dt terminal and your data array to the Y terminal and graph it (likewise on a Waveform Graph).

If you can't get it to work, try to post you **Voltage** string array with saved values so we can check your string formatting.