LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Plotting the Same Waveform Twice

Hi, I was using the Continuous Measurement and Logging Template (DAQmx) and I made some modifications for it to also read from a serial device.

 

Now for some reason, LabView is plotting the analog input data twice on the same waveform (See "Upstream Pressure" graph in attachment). Is there a way to remove this?

 

Much thanks,

Ben 

Download All
0 Kudos
Message 1 of 6
(3,681 Views)

I could not open your project because I'm using LV 2012. You can expand the graph legend and hide the red line, but I'm guessing there is a deeper problem with your code if you can't figure why it is plotting 2 lines instead of 1.

0 Kudos
Message 2 of 6
(3,677 Views)

In the subVI where you create the notification, you are acquiring "N sampes,N Channels", Maybe you have it configured for 2 channels?

(sorry, I don't have DAQmx installed, so I cannot look at it in detail)

0 Kudos
Message 3 of 6
(3,623 Views)

It seems like I created the same task twice. If I allow the user to select a DAQmx task created in MAX in the Settings dialog, is there really any purpose for Initialize Hardware References.vi?

0 Kudos
Message 4 of 6
(3,610 Views)

Congratulations -- this is one of the nicest pieces of code I've encountered on the Forum over the past several months.  Thank you for organizing it in a Project (although "Untitled Project 2" lacks imagination), and also thank you for including the entire Project.

 

You use the Hardware Configuration Cluster (kudos, as well, for TypeDef-ing all of your Clusters), so if you do not initialize it somewhere, you won't have a Task to reference!  However, since you are using LabVIEW Project, you might consider defining the Tasks inside the Project, rather than in MAX.  To do this, right-click "My Computer" in the Project Explorer, choose New, then New Task.  It will open a MAX-like window where you configure the Task.  This Task will appear as a Drop-down option on your Task Constant, using a slightly different Icon to distinguish it from a MAX-defined Task.

 

Hmm -- I just re-read your question.  What do you mean by "the Settings dialog"?  Was that something I missed?  [Probable answer -- yes, Bob, you missed it ...].

 

Bob Schor

0 Kudos
Message 5 of 6
(3,601 Views)

Hi Bob,

Please see the attached screenshots. The first one is the Settings Dialog vi. It seems I can load the task I have defined there, or in Initialize Hardware References.vi.

 

Currently my Settings Dialog.vi is what is shown, and I have removed the "Task to Copy" input of DAQmx Create Task.vi. This seems to have removed the double plots.

 

Also I will definitely get around to defining Tasks in the Project if it is recommended.

 

Much thanks,

Ben

 

 

0 Kudos
Message 6 of 6
(3,594 Views)