ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sine wave plotting - issue

Hardware setup :

PCI-6229 in a Windows Desktop running LV2017 and DAQMx18.5.

Channel AI-0 externally linked with AO-0

Generating a 10Hz sinewave at 10kHz rate and 1000 samples. 

AI-0 channel configured for 20kHz rate and 2000 samples ( also tried 1000 samples ) 

 

The VI snippet is as below. While the 10Hz gets generated it does not get plotted. Maybe there is something wrong with the way I am using the FG express VI ? 

 

SineWave Plotting.png

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 3
(1,671 Views)
  • The xscale multiplier is for all points, and not per point (or per array segment). the chart assumes equal spacing as used here.
  • The xscale multiplier is the time between points, not the time between loop iterations. There are orders of magnitude differences between the two.
  • Clearing the history is typically done by writing an empty array, not an array containing one element of zero.
  • You chart history is only 2000 point (0.1 or 0.2 seconds), so setting the max at 10 seconds seems odd.
  • ...

 

Sorry, I cannot test because I don't have your hardware or any DAQmx installed. Can you create a pure simulation for testing to show the point you are trying to make.

0 Kudos
Message 2 of 3
(1,624 Views)

Apologies for this late a reply.  For some odd reason I don't get Notification on my posts from the forum and today I checked to see if there is any. 

 

I have been trying various troubleshooting methods and one is this : Disconnected the AO0 output from the AI0 input and instead fed a 10Hz sine wave from an external Function generator. The Plotting was happening as expected.  But when I try the same by looping the AO0 to AI0 via the terminal board I just get some spaced out spikes.  See the pics attached. 

With External FG FeedWith External FG FeedWith Feed from AO0With Feed from AO0

 

I am now not sure if the AO0 can feed the AI0 of the same board ?/ 

 

Thanks so much for the points on the X-Axis markers and spacing. I just have one query - the chart history talks about "points" . What exactly is a point ? Is it a single point on the plot irrespective of the data type that creates the point ? 

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 3
(1,562 Views)